[jboss-user] [JBoss Seam] - FacesMessages,Seam Ajax4JSF
grdzeli_kaci
do-not-reply at jboss.com
Tue Jul 24 03:14:18 EDT 2007
hi all,
i tried to use faces messages for ajax commandbutton (a4j:commandButton)
but message is not appears, i got warnind on server side :
| 23:15:48,021 INFO [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
| sourceId=null[severity=(INFO 0), summary=(Too Long Property Name. Please Trye Again), detail=(Too Long Property Name. Please Trye Again)]
|
here is my example :
1.xhtml view :
| <table border="0" cellpadding="4" cellspacing="0" width="100%">
| <tr>
| <td>
| <h:message styleClass="cntError"/>
| </td>
| </tr>
| <tr>
| td>
| <a4j:commandButton action="#{propertyBean.addProperty}" value="Add Property"/>
| </td>
| </tr>
| </table>
|
2.Backing Bean :
| public void addProperty(){
| try {
| if (property.getPropertyName().length()>10) {
| FacesMessages.instance().add("Too Long Property Name. Please Trye Again");
| return;
| }
| Users user = (Users)sessionContext.get("currentUser");
| property.setRecStatus(new Long(1));
| property.setRegDate(new java.sql.Date(System.currentTimeMillis()));
| property.setRemark("Property Parameter For User");
| property.setUserId(user);
| em.persist(property);
| } catch (Exception e) {
| e.printStackTrace();
| FacesMessages.instance().add("Could not Register. Please Trye Again");
| }
| }
|
but message is not appears,
any idea will be appreciated.
_______________________
Regards
Paata
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066901#4066901
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066901
More information about the jboss-user
mailing list