You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by "Mistry, Apurva" <am...@nsf.org> on 2007/02/14 20:03:43 UTC

problem with jsf rendered attribute

Hi, 
I am trying to simulate onpageLoad functionality in jsf. Basically, I
have put a rendered attribute in <tr:PanelFormLayout> tag -

<tr:panelFormLayout styleClass="x6b" rows="1" maxColumns="5"
rendered="#{EditCusLinksBB.ce}"> 
                    <tr:commandButton  text="Save"
action="#{EditCusLinksBB.saveAssoCE}"
rendered="#{EditCusLinksBB.actionType == 'NewCE'}"/>

                    <tr:commandButton  text="Edit"
action="#{EditCusLinksBB.editAssoCE}"
rendered="#{EditCusLinksBB.actionType == 'EditCE'}" />

                    
                <tr:inputListOfValues columns="10"
action="dialog:showParent" rendered="#{EditCusLinksBB.actionType ==
'NewCE'}"/>

                    <tr:outputText inlineStyle="x6m xag"
value="#{editCustBB.certifiedEntity.primaryCustomer.code}"
rendered="#{EditCusLinksBB.actionType != 'NewCE'}"/>

........ 
</tr:panelFormLayout> 


The goal is to perform some logic before the rest of the tags are
rendered inside panelformLayout gets rendered. 
But the rendered gets called 4 times, and the output from getCE() is
changing. 
I am not sure why is rendered called upon several time, whats the
alternative? 
Thanks 
Apurva. 

********************************************************************* 
 Confidentiality Notice:  This email message, including any attachments,
is for the sole use of the intended recipient(s) and may contain 
 confidential and privileged information. Any unauthorized review, use, 
 disclosure or distribution is prohibited. If you are not the intended 
 recipient, please contact the sender by email and destroy all copies of
the original message. 
********************************************************************* 


Re: problem with jsf rendered attribute

Posted by Matthias Wessendorf <ma...@apache.org>.
Perhaps you want to have a shale based viewcontroller behind the page

this demo:
http://code.google.com/p/facesgoodies/

uses Shale  together w/ Trinidad

-M

On 2/14/07, Mistry, Apurva <am...@nsf.org> wrote:
> Hi,
> I am trying to simulate onpageLoad functionality in jsf. Basically, I
> have put a rendered attribute in <tr:PanelFormLayout> tag -
>
> <tr:panelFormLayout styleClass="x6b" rows="1" maxColumns="5"
> rendered="#{EditCusLinksBB.ce}">
>                     <tr:commandButton  text="Save"
> action="#{EditCusLinksBB.saveAssoCE}"
> rendered="#{EditCusLinksBB.actionType == 'NewCE'}"/>
>
>                     <tr:commandButton  text="Edit"
> action="#{EditCusLinksBB.editAssoCE}"
> rendered="#{EditCusLinksBB.actionType == 'EditCE'}" />
>
>
>                 <tr:inputListOfValues columns="10"
> action="dialog:showParent" rendered="#{EditCusLinksBB.actionType ==
> 'NewCE'}"/>
>
>                     <tr:outputText inlineStyle="x6m xag"
> value="#{editCustBB.certifiedEntity.primaryCustomer.code}"
> rendered="#{EditCusLinksBB.actionType != 'NewCE'}"/>
>
> ........
> </tr:panelFormLayout>
>
>
> The goal is to perform some logic before the rest of the tags are
> rendered inside panelformLayout gets rendered.
> But the rendered gets called 4 times, and the output from getCE() is
> changing.
> I am not sure why is rendered called upon several time, whats the
> alternative?
> Thanks
> Apurva.
>
> *********************************************************************
>  Confidentiality Notice:  This email message, including any attachments,
> is for the sole use of the intended recipient(s) and may contain
>  confidential and privileged information. Any unauthorized review, use,
>  disclosure or distribution is prohibited. If you are not the intended
>  recipient, please contact the sender by email and destroy all copies of
> the original message.
> *********************************************************************
>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com