You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Bertrand, Shawn R" <sh...@tycoelectronics.com> on 2008/03/17 20:38:01 UTC

[Trinidad] panelChoice with showDetailItem and disclosed value binding

(This is a problem in Trinidad 1.0.2, and is reproducible in 1.0.7.)

 

Inside a JSP we display in a dialog, we have a panelChoice, which has 5
showDetailItem children, each of which has a value binding defined for
the disclosed property (see below).  The disclosed bindings, all of
which use the same backing bean method to determine a true or false
value, are properly called.

 

However, the result is always the last showDetailItem having been
manually selected.  In other words, the right showDetailItem is
initially selected only until I manually select another showDetailItem.
Thereafter, when I redisplay the dialog, the particular showDetailItem I
selected previously will become the current showDetailItem, regardless
of what the binding evaluates to.

 

Any ideas?

 

Thanks in advance,

 

Shawn Bertrand

Tyco Electronics Corporation

 

 

      <tr:panelChoice id="CrBitMap" position="top" alignment="center"

 
labelAndAccessKey="#{SnmpSsCrHelper.ruleTypeLabel}">

        <tr:showDetailItem id="srcIpItem"
text="#{msg.textBbSrcIPAddrMask}"

                           disclosed="#{SnmpSsCrHelper.ruleType == 1}"

 
disclosureListener="#{SnmpSsCrHelper.ruleTypeDisclosed}">

           <stuff>

        </tr:showDetailItem>

        <tr:showDetailItem id="destIpItem"
text="#{msg.textBbdestIPAddrMask}"

                           disclosed="#{SnmpSsCrHelper.ruleType == 2}"

 
disclosureListener="#{SnmpSsCrHelper.ruleTypeDisclosed}">

           <stuff>

        </tr:showDetailItem>

        <tr:showDetailItem id="srcMacItem"
text="#{msg.textBbSrcMacAddr}"

                           disclosed="#{SnmpSsCrHelper.ruleType == 128}"

 
disclosureListener="#{SnmpSsCrHelper.ruleTypeDisclosed}">

           <stuff>

        </tr:showDetailItem>

        <tr:showDetailItem id="destMacItem"
text="#{msg.textBbDestMacAddr}"

                           disclosed="#{SnmpSsCrHelper.ruleType == 256}"

 
disclosureListener="#{SnmpSsCrHelper.ruleTypeDisclosed}">

           <stuff>

        </tr:showDetailItem>

        <tr:showDetailItem id="etherItem" text="#{msg.textBbEtherType}"

                           disclosed="#{SnmpSsCrHelper.ruleType == 512}"

 
disclosureListener="#{SnmpSsCrHelper.ruleTypeDisclosed}">

           <stuff>

        </tr:showDetailItem>

      </tr:panelChoice>

 

 


Re: [Trinidad] panelChoice with showDetailItem and disclosed value binding

Posted by Matt Cooper <ma...@gmail.com>.
Hi Shawn,

I think I have run into this same problem.  When the disclosure changes, the
locally-stored property for "disclosed" changes from a value expression to a
boolean--the expression disappears once the system has overwritten it with a
boolean value as a result of a manual disclosure change.

I found that either I needed to reassign the value expression to the
disclosed properties on those components or simply re-assign the disclosed
properties on all of the showDetailItem components to the boolean values I
want them to be.

Hope this helps,
Matt

On Mon, Mar 17, 2008 at 1:38 PM, Bertrand, Shawn R <
shawn.bertrand@tycoelectronics.com> wrote:

>  (This is a problem in Trinidad 1.0.2, and is reproducible in 1.0.7.)
>
>
>
> Inside a JSP we display in a dialog, we have a panelChoice, which has 5
> showDetailItem children, each of which has a value binding defined for the
> disclosed property (see below).  The disclosed bindings, all of which use
> the same backing bean method to determine a true or false value, are
> properly called.
>
>
>
> However, the result is always the last showDetailItem having been manually
> selected.  In other words, the right showDetailItem is initially selected
> only until I manually select another showDetailItem.  Thereafter, when I
> redisplay the dialog, the particular showDetailItem I selected previously
> will become the current showDetailItem, regardless of what the binding
> evaluates to.
>
>
>
> Any ideas?
>
>
>
> Thanks in advance,
>
>
>
> Shawn Bertrand
>
> Tyco Electronics Corporation
>
>
>
>
>
>       <tr:panelChoice id="CrBitMap" position="top" alignment="center"
>
>                       labelAndAccessKey="#{SnmpSsCrHelper.ruleTypeLabel}">
>
>         <tr:showDetailItem id="srcIpItem" text="#{msg.textBbSrcIPAddrMask
> }"
>
>                            disclosed="#{SnmpSsCrHelper.ruleType == 1}"
>
>                            disclosureListener="#{
> SnmpSsCrHelper.ruleTypeDisclosed}">
>
>            <stuff>
>
>         </tr:showDetailItem>
>
>         <tr:showDetailItem id="destIpItem" text="#{
> msg.textBbdestIPAddrMask}"
>
>                            disclosed="#{SnmpSsCrHelper.ruleType == 2}"
>
>                            disclosureListener="#{
> SnmpSsCrHelper.ruleTypeDisclosed}">
>
>            <stuff>
>
>         </tr:showDetailItem>
>
>         <tr:showDetailItem id="srcMacItem" text="#{msg.textBbSrcMacAddr}"
>
>                            disclosed="#{SnmpSsCrHelper.ruleType == 128}"
>
>                            disclosureListener="#{
> SnmpSsCrHelper.ruleTypeDisclosed}">
>
>            <stuff>
>
>         </tr:showDetailItem>
>
>         <tr:showDetailItem id="destMacItem" text="#{msg.textBbDestMacAddr
> }"
>
>                            disclosed="#{SnmpSsCrHelper.ruleType == 256}"
>
>                            disclosureListener="#{
> SnmpSsCrHelper.ruleTypeDisclosed}">
>
>            <stuff>
>
>         </tr:showDetailItem>
>
>         <tr:showDetailItem id="etherItem" text="#{msg.textBbEtherType}"
>
>                            disclosed="#{SnmpSsCrHelper.ruleType == 512}"
>
>                            disclosureListener="#{
> SnmpSsCrHelper.ruleTypeDisclosed}">
>
>            <stuff>
>
>         </tr:showDetailItem>
>
>       </tr:panelChoice>
>
>
>
>
>