This content has been marked as final.
Show 2 replies
-
1. Re: can't build jboss seam 2.0 beta
grdzeli_kaci Jul 23, 2007 12:50 PM (in response to grdzeli_kaci)is there anybody who can help me ? :(
i can't build seam manually from cvs repository. -
2. FacesMessages,Seam Ajax4JSF
grdzeli_kaci Jul 24, 2007 3:14 AM (in response to grdzeli_kaci)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