-
1. Re: Required field validation
nbelaevski Jan 29, 2009 5:49 AM (in response to ramki9977)Hi,
Create your own converter that will trim string and use it with the component. -
2. Re: Required field validation
ramki9977 Jan 30, 2009 5:43 AM (in response to ramki9977)hi,
thanks for reply. i created my own converter to trim the strings. and i have one more requirement in my app. when ever the required message thrown it will display beside the text box or other component. but i want a error icon to display beside that text box and when ever i move mouse i need to show error message. can you please help me how to do this.
thanks,
ramki. -
3. Re: Required field validation
nbelaevski Jan 30, 2009 6:16 AM (in response to ramki9977)"ramki9977" wrote:
Can you please post screenshot somewhere to help e understand what's necessary?
hi,
thanks for reply. i created my own converter to trim the strings. and i have one more requirement in my app. when ever the required message thrown it will display beside the text box or other component. but i want a error icon to display beside that text box and when ever i move mouse i need to show error message. can you please help me how to do this.
thanks,
ramki. -
4. Re: Required field validation
ilya_shaikovsky Jan 30, 2009 6:22 AM (in response to ramki9977)Next code should works for you. There when we getting error only red marker occurs. And after you over this marker - tooltip shown with the error text.
<h:form id="form"> <h:outputText value="Name:" /> <h:inputText label="Name" id="name" required="true" value="#{userBean.name}"> <f:validateLength minimum="3" /> </h:inputText> <a4j:outputPanel id="message"> <rich:message for="name" showDetail="false" showSummary="false"> <f:facet name="errorMarker"> <h:graphicImage value="/images/ajax/error.gif" /> </f:facet> </rich:message> <rich:toolTip attached="true"> <h:outputText value="Error:"/> <rich:message for="name" showDetail="true" showSummary="true"/> </rich:toolTip> </a4j:outputPanel> <a4j:commandButton value="Validate" reRender="message"/> </h:form>
-
5. Re: Required field validation
ramki9977 Jan 30, 2009 6:46 AM (in response to ramki9977)hi,
its looking good but its little lengthy in coding. any we have one <rich:message/> is there any option in that tag to show this error message through error icon. may be it would be good if we have that option in <rich:message/>. please comment on this feature.
thanks,
ramki. -
6. Re: Required field validation
gopib Jan 30, 2009 6:47 AM (in response to ramki9977)Hi
U have to keep the requiredMessage (requiredMessage="Please Enter Name") attribute in <h:inputText> -
7. Re: Required field validation
ilya_shaikovsky Jan 30, 2009 6:52 AM (in response to ramki9977)seems not bad feature.. but the case already could be implemented and we are mainly targeted to the features which still can't be done by the components composition and so on.. Seems like such features more preferable for future implementation :)
-
8. Re: Required field validation
ramki9977 Jan 30, 2009 7:17 AM (in response to ramki9977)so we can expect this feature in coming versions.
-
9. Re: Required field validation
ilya_shaikovsky Jan 30, 2009 7:39 AM (in response to ramki9977)I've tried to tell you just opposite thing :) you could rise the RFC in our jira.. but as this feature already has implementation via components composition it will not be near future versioned.
-
10. Re: Required field validation
ramki9977 Jan 30, 2009 8:03 AM (in response to ramki9977)ok thanks for reply