File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "rendered" Watch "rendered" New topic


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"
<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>
<f:facet name="controls">
<h:panelGroup id="#{prefix}_panel_shippingRatespg2">
styleClass="hidelink" id="#{prefix}_panel_shippingRateshidelink" />
<rich:componentControl for="#{prefix}_panel_shippingRates"
attachTo="#{prefix}_panel_shippingRateshidelink" operation="hide"
event="onclick" />

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

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

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: rendered
jQuery in Action, 3rd edition