How do I make an "if" test in JSF? I'm trying to do like a did in JSP, but is not working.
<t:saveState id="savePrg" value="#{Prorrogacao}" />
Prorrogacao prg = (Prorrogacao) request.getAttribute("Prorrogacao");
if (prg.isPrgAberta()){%>
<h:outputText value="Já há prorrogação em aberto para este cliente: #{ Prorrogacao.nrPrgAberta}"/><BR>
<h:form>
<h:commandButton value="Gerar súmula" action=""> </h:form>
<%}else{%>
<h:outputText styleClass="label" escape="false" value="Abertura de prorrogação para #{Prorrogacao.cliente.NM_CLI}"/><BR>
<t:inputDate id="novo_vencimento" popupCalendar="true"
type="date" lang="pt-br"
required="true" value="#{Prorrogacao.limite.DT_VNCT }"/>
<h:commandButton id="gravar" value="Gravar" style="margin-left:8px;margin-top:8px;" styleClass="label" action="" }"/>
</h:form>
The method Prorrogacao.gravaProrrogacao only returns to this page (for test).
On 3/14/06,
Mike Kienenberger <[EMAIL PROTECTED]> wrote:
It'd probably help if you posted parts of your page tags. Using
t:saveState should work, so if it's not working, there's probably
something else involved.
On 3/14/06, Vladimir Coutinho < [EMAIL PROTECTED]> wrote:
>
> But I'm using saveState in both pages.
>
> The user fill some parts of the form, press "save" button e he goes to
> other page with saveState to complete the form or came back to the same page
> (case is not necessary fill the second form). But the object is not being
> saved.
>
>
>
> On 3/10/06, Mike Kienenberger <[EMAIL PROTECTED] > wrote:
> > On 3/10/06, Vladimir Coutinho <[EMAIL PROTECTED]> wrote:
> > > I'm using saveState to preserve a request backing bean from a page to
> other.
> > > In the other page the user fill other fields of the form. But in the
> action,
> > > the properties that I'm do not put in the 2nd page are not being
> preserved.
> > > Do I have to put the fields of the form 1 as hidden input in the form in
> 2nd
> > > page?
> >
> > No, just use identical saveState tags on both pages.
> >
>
>
>
> --
> Vladimir M Coutinho
--
Vladimir M Coutinho

