File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes rendered Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "rendered" Watch "rendered" New topic
Author

rendered

Dan Acuff
Ranch Hand

Joined: Jul 13, 2009
Posts: 62
We had some help with the following modalPanel popup.
My question is why does rendered = #{rateInfo} ? I cannot reproduce this on other links if I don't understand how they got rateInfo.

<h:outputLink value="#"
id="#{prefix}_shipping_method_link" styleClass="b_popup"
rendered="#{rateInfo}">
<span>Rates & Information.</span>
<rich:componentControl for="#{prefix}_panel_shippingRates"
attachTo="#{prefix}_shipping_method_link" operation="show"
event="onclick" />
</h:outputLink> </span></p>

<rich:modalPanel id="#{prefix}_panel_shippingRates" width="600"
height="600" styleClass="popup_window" rendered="#{rateInfo}">
<f:facet name="header">
<h:panelGroup id="#{prefix}_panel_shippingRatespg1">
<h3>Shipping Rates & Information</h3>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup id="#{prefix}_panel_shippingRatespg2">
<h:graphicImage
value="#{customerSession.imageServer}/images/closewindow-X.gif"
styleClass="hidelink" id="#{prefix}_panel_shippingRateshidelink" />
<rich:componentControl for="#{prefix}_panel_shippingRates"
attachTo="#{prefix}_panel_shippingRateshidelink" operation="hide"
event="onclick" />
</h:panelGroup>
</f:facet>

<ui:include src="ship_info.xhtml" />
<ui:include src="ship_rate.xhtml" />

<br />
<h:outputLink id="#{prefix}_panel_shippingRatescloselink" value="#">
#{messages.closeWindow}
<rich:componentControl for="#{prefix}_panel_shippingRates"
attachTo="#{prefix}_panel_shippingRatescloselink" operation="hide"
event="onclick" />
</h:outputLink>

</rich:modalPanel>
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16011
    
  19

You're being a little casual in your use of EL. For example, you don't normally say "rendered="#{rateinfo}"", you say "rendered="#{someBean.rateInfo"", where "someBean is a JSF managed bean that has a rateInfo property and therefore a "public boolean isRateInfo()" method.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rendered