Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-886

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

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.5-core, 1.2.5-core
    • 1.0.5-core, 1.2.5-core
    • Components
    • None

    Description

      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.

      Attachments

        Activity

          People

            arobinson74 Andrew Robinson
            arobinson74 Andrew Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: