You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Henning Noeth (JIRA)" <de...@myfaces.apache.org> on 2018/04/26 14:28:00 UTC

[jira] [Created] (TOBAGO-1895) Attributes of segment layout may not be read correctly if using core tags

Henning Noeth created TOBAGO-1895:
-------------------------------------

             Summary: Attributes of segment layout may not be read correctly if using core tags
                 Key: TOBAGO-1895
                 URL: https://issues.apache.org/jira/browse/TOBAGO-1895
             Project: MyFaces Tobago
          Issue Type: Bug
          Components: Core
    Affects Versions: 4.2.0
            Reporter: Henning Noeth


Under specific circumstances, segment layout attributes cannot be read.
This is if core tags are used with an old MyFaces version (like 2.0.2).

See the following example:
1. open the page
2. click on tab 2
3. click a second time on tab 2
result: the CSS classes for segment layout are not rendered
 
{code:xml}<tc:tabGroup switchType="reloadPage" selectedIndex="#{dynamicTabsController.selected}">
  <c:forEach items="#{dynamicTabsController.items}" var="item" varStatus="loopStatus">
    <tc:tab label="#{item}">
      <c:if test="#{dynamicTabsController.selected == loopStatus.index}">
        <tc:segmentLayout small="6seg">
          <tc:out label="Item:" value="#{item}"/>
          <tc:out label="Out 1" value="qwe"/>
          <tc:out label="Out 2" value="asdf"/>
          <tc:out label="Out 3" value="yxcv"/>
        </tc:segmentLayout>
      </c:if>
    </tc:tab>
  </c:forEach>
</tc:tabGroup>{code}
{code:java}@SessionScoped
@Named
public class DynamicTabsController implements Serializable {

  private static final long serialVersionUID = 1L;

  private List<String> akten = new ArrayList<>();
  private int selected = 0;

  public DynamicTabsController() {
    akten.add("Tab 1");
    akten.add("Tab 2");
  }

  public List<String> getItems() {
    return this.akten;
  }

  public int getSelected() {
    return this.selected;
  }

  public void setSelected(int selected) {
    this.selected = selected;
  }
}{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)