webtier@glassfish.java.net

Re: [webtier] Problem with attribute rendered

From: Joel Weight <digitaljoel_at_gmail.com>
Date: Sun, 6 Jun 2010 19:26:12 -0600

notice that your input text is required, and your cancel is not immediate.
 That means it'll go through that validation for the input text even when
you are trying to cancel. That would be my first guess on the problem.

Joel

On Fri, Jun 4, 2010 at 6:34 PM, <webtier_at_javadesktop.org> wrote:

> Which files you want to see?
>
> That my full buildings_details.xhtml:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
> http://www.w3.org/TR/html4/loose.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:p="http://primefaces.prime.com.tr/ui"
> xmlns:c="http://java.sun.com/jstl/core">
>
> <ui:composition template="../templates/common_template.xhtml">
>
> <ui:define name="body">
> <p:breadCrumb>
> <p:menuitem url="/pages/welcome.jsf"
> />
> <p:menuitem
> label="#{i18n['pages.common_template.link.configuration']}"
> url="/pages/configuration.jsf" />
> <p:menuitem
> label="#{i18n['pages.building_list.header']}" url="/pages/building_list.jsf"
> />
> <p:menuitem
> label="#{i18n['pages.building_details.header']}" url="#" />
> </p:breadCrumb>
> <table cellspacing="4px" width="100%">
> <tr><td valign="top">
>
> <h:form id="buildingDetailsForm" >
> <h3
> align="left">#{i18n['pages.profile.loginInfo.commonInfo.header']}</h3>
> <h:panelGrid columns="2"
> columnClasses="colTitles, colValues" cellspacing="5px">
>
> <h:outputLabel
> value="#{i18n['pages.building_details.buildingTitle']}" />
> <h:panelGroup>
> <h:inputText
> value="#{buildingBean.currentBuilding.buildingTitle}"
>
> style="width:50%; min-width:200px;" required="true"
>
> requiredMessage="#{i18n['pages.building_details.messages.TitleNotEmpty']}"/>
> <h:outputText value="*"
> styleClass="required_message" />
> </h:panelGroup>
> <h:panelGroup align="right"
> rendered="#{not empty buildingBean.currentBuilding.id}">
> <h:commandButton
> type="image" action="#{buildingBean.doUpdateBuilding}"
>
> image="/i/passed.gif" update="messages" />&nbsp;&nbsp;
> <h:commandButton
> type="image" action="#{buildingBean.doDeleteBuilding}"
>
> image="/i/delete.png" update="messages" />&nbsp;&nbsp;
> <h:commandButton
> type="image" action="#{buildingBean.doCancelEditBuilding}"
>
> image="/i/cancel.png" />
> </h:panelGroup>
> <h:panelGroup align="right"
> rendered="#{empty buildingBean.currentBuilding.id}">
> <h:commandButton
> type="image" action="#{buildingBean.doAddBuilding}"
>
> image="/i/add.gif" update="messages" />&nbsp;&nbsp;
> <h:commandButton
> type="image" action="#{buildingBean.doCancelEditBuilding}"
>
> image="/i/cancel.png" />
> </h:panelGroup>
> </h:panelGrid>
> </h:form>
> </td></tr>
> </table>
> </ui:define>
> </ui:composition>
> </html>
>
>
>
> Yes, when I remove attribute "rendered" all works correctly, but I can't
> manage visibility of components.
> [Message sent by forum member 'pmshik']
>
> http://forums.java.net/jive/thread.jspa?messageID=472837
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>