MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to General Development
View previous topic Printable version Log in to check your private messages View next topic
Author Message
amir55
Post subject: bug in displaying message in jsf context using tiles- URGENT  PostPosted: Apr 20, 2010 - 07:07 AM
Registered Member
Registered Member


Joined: Oct 15, 2005
Posts: 217

hi dear all

1 - I use myeclipse 8, win xp, mysql and jboss.

2 - I use strurs tiles with my jsf page.

3 - the bug with me that I could not get the error messages displayed on the jsf page near its related fields.

It seems I have to use the f:view which when using tiels I have to use it once only in the main-layout.jsp that insetes the tiles.

Is there any way to sort it out via a note from you or a simple example or code.

I use this code

MessageFactory mf = new MessageFactory();
FacesContext ctx = FacesContext.getCurrentInstance();
new FacesMessage(FacesMessage.SEVERITY_ERROR, mf.getMessage("errorUsername"), null));


in my faces-config.xml I use
<application>
<resource-bundle>
<base-name>bundle.messages</base-name>
<var>message</var>
</resource-bundle>
</application>


my class messages.java as next
package bundle;

import java.util.Locale;
import java.util.ResourceBundle;

import javax.faces.context.FacesContext;

public class MessageFactory {
ResourceBundle bundle;
Locale locale;

public MessageFactory() {
locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
bundle = ResourceBundle.getBundle("bundle.messages", locale);
}

public String getMessage(String key) {
return bundle.getString(key);
}

}


please do find me a way as it has bothered me for quite a long time

yours faithully

Amir
 
 View user's profile Send private message  
Reply with quote Back to top
support-shalini
Post subject: RE: bug in displaying message in jsf context using tiles- UR  PostPosted: Apr 21, 2010 - 07:53 AM
Registered Member
Registered Member


Joined: May 18, 2009
Posts: 1532

Amir,
I have escalated this issue to the dev team member, they will get back to you on this

_________________
Shalini
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits