You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 21 Members of 4546 |
| Forum: Seam Users |
27. Aug 2008, 23:41 CET | Link |
Hello,
I have the following form:
<h:outputText value="Pesquisar documentos inseridos entre " />
<rich:calendar value="#{gestDocuments.dataA}" datePattern="dd/MM/yyyy" required="true" requiredMessage="Insira o limite inferior na data"></rich:calendar>
<h:outputText value=" e " />
<rich:calendar value="#{gestDocuments.dataB}" datePattern="dd/MM/yyyy" required="true" requiredMessage="Insira o limite superior na data"></rich:calendar>
<h:commandButton action="#{gestDocuments.searchBetween}" value="Pesquisar"></h:commandButton>
<br />
<h:outputText value="Pesquisar na metadata: " />
<h:inputText value="#{gestDocuments.metadataSearch}" required="true" requiredMessage="Insira o valor a pesquisar.">
<s:validate></s:validate>
</h:inputText>
<h:commandButton action="#{gestDocuments.searchMetadata}" value="Pesquisar"></h:commandButton>
How can I validate this? If I press the first button, I don't want to validate the inputText and if I press the second button I don't want to validate the dates. I've tried adding the immediate attribute on the buttons, but that will not work in this case.
How can I fix this?
Thanks!
Will making them separate forms help?
You imply they are independent...
But I being poor have only my dreams. I have spread my dreams under your feet. Tread softly because you tread on my dreams...
Hmmm thank you. I had the idea that it only could exist one form per page. :)