Add the ability to the show* components to always get their disclosed property 
from EL
--------------------------------------------------------------------------------------

                 Key: TRINIDAD-886
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-886
             Project: MyFaces Trinidad
          Issue Type: New Feature
          Components: Components
    Affects Versions: 1.0.5-core, 1.2.5-core
            Reporter: Andrew Robinson
            Assignee: Andrew Robinson
            Priority: Minor


The disclosed property of showDetail components are updated by the renderers. 
It would be extremely helpful to stop this behavior so that EL is always used.

Example of someone wanting to disclose only one item:
public class Bean {
  private int disclosedIndex = -1;
  public void handleDisclose(DisclosureEvent event) {
    // manually update the index
  }
  ...
}

<tr:iterator var="_item" value="#{bean.items}" varStatus="_varStatus">
  <tr:showDetail disclosedText="#{_item.title}" 
undisclosedText="#{_item.title}":
        disclosed="#{bean.disclosedItem eq _varStatus.index}"
                 disclosureListener="#{bean.handleDisclose}">
    <af:outputFormatted value="#{_item.desc}"/>
  </af:showDetail>
</af:iterator>

Proposal:

A new attribute to be added to showDetial* components:
public boolean isDisclosedTransient() {}

This should default to false. If set, the renderer should never set the 
disclosed property locally, or the faces bean property value should ignore 
sets. This way the disclosed property set in the UI would always be used to 
determine disclosed state.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to