-
1. Re: Bind Map to h:inputText value
umk May 21, 2007 8:10 PM (in response to umk)Could someone please make a suggestion... Thanks!
-
2. Re: Bind Map to h:inputText value
umk May 25, 2007 10:33 PM (in response to umk)Am I asking a dumb question that doesn't warrant a reply :) ? Or is the answer readily available in the docs/samples? I've looked but I haven't come across an answer.
Thanks to anyone who can offer some assistance! -
3. Re: Bind Map to h:inputText value
matt.drees May 27, 2007 12:37 AM (in response to umk)Are you using a s:validate or s:validateAll on that h:inputText? If so, I'm fairly certain you can't do that.
-
4. Re: Bind Map to h:inputText value
umk May 27, 2007 12:50 PM (in response to umk)"matt.drees" wrote:
Are you using a s:validate or s:validateAll on that h:inputText? If so, I'm fairly certain you can't do that.
Nope. Not using either. I've posted the complete page code below. Any other ideas? Thanks.<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.ajax4jsf.org/rich" xmlns:a="https://ajax4jsf.dev.java.net/ajax" template="layout/template.xhtml"> <ui:define name="body"> <h:messages globalOnly="true" styleClass="message" /> <h:form id="dataEntryForm"> <rich:panel> <f:facet name="header">dataEntry</f:facet> <p>Welcome #{appUser.username}</p> <s:decorate id="valueDecoration1" template="layout/edit.xhtml"> <ui:define name="label">Map Binding</ui:define> <h:inputText id="asdf" required="true" value="#{biomarkers['waist']}" /> </s:decorate> <s:decorate id="eventdateDecoration" template="layout/edit.xhtml"> <ui:define name="label">eventdate</ui:define> <h:inputText id="eventdate" maxlength="10" size="10" required="true" value="#{record.eventdate}"> <s:convertDateTime type="date" dateStyle="short" pattern="MM/dd/yyyy" /> <a:support event="onblur" reRender="eventdateDecoration" /> </h:inputText> <s:selectDate for="eventdate"> <h:graphicImage url="img/dtpick.gif" style="margin-left:5px" /> </s:selectDate> </s:decorate> <div style="clear:both" /> <h:dataTable value="#{recordDatas}" var="recordData"> <h:column> <f:facet name="header">Name</f:facet> <h:selectOneMenu value="#{recordData.value}"> <f:selectItem itemLabel="-" itemValue="" /> <f:selectItem itemLabel="Yes" itemValue="1" /> <f:selectItem itemLabel="No" itemValue="0" /> </h:selectOneMenu> </h:column> </h:dataTable> </rich:panel> <div class="actionButtons"><h:commandButton id="dataEntry" value="dataEntry" action="#{enroll.thankYou}" /></div> </h:form> </ui:define> </ui:composition>
-
5. Re: Bind Map to h:inputText value
matt.drees May 27, 2007 2:26 PM (in response to umk)What's layout/edit.xhtml look like?
-
6. Re: Bind Map to h:inputText value
umk May 27, 2007 10:14 PM (in response to umk)"matt.drees" wrote:
What's layout/edit.xhtml look like?
Ok. Looks like you're onto something. Below is the code from edit.xhtml where you'll see validateAll is being called. I don't understand why validateAll is problematic. Maybe you can point me somewhere so I can educate myself. Thanks!<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib"> <div class="prop"> <s:label styleClass="name #{invalid?'errors':''}"> <ui:insert name="label"/> <s:span styleClass="required" rendered="#{required}">*</s:span> </s:label> <span class="value #{invalid?'errors':''}"> <s:validateAll> <ui:insert/> </s:validateAll> </span> <s:message styleClass="error errors"/> </div> </ui:composition>
-
7. Re: Bind Map to h:inputText value
umk May 27, 2007 10:28 PM (in response to umk)I've done some reading here:
http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/validation.html
There's no mention of using Maps. I suppose that's why you suggested that using s:validate may not work. How would one validate the inputField?
Appreciate your help... -
8. Re: Bind Map to h:inputText value
matt.drees May 28, 2007 11:54 AM (in response to umk)You'd have to use standard JSF validation (not Seam's specialized model validation). I found this article helpful.
http://www.ibm.com/developerworks/java/library/j-jsf3/ -
9. Re: Bind Map to h:inputText value
gavin.king May 28, 2007 2:29 PM (in response to umk)Please report this in JIRA, thanks.