Why PF 3.0.M3 changed how id of tabView elems. ?

UI Components for JSF
Post Reply
mitnpatel
Posts: 23
Joined: 05 Mar 2011, 04:47
Location: San Jose

27 Sep 2011, 02:48

Hi,
I have recently switched from Primeface 3.0.M2 to Primefaces 3.0.M3.
I noticed some of styling are not been adding to elements inside TabView widget.
Then I noticed that in 3.0.M3 is prepending id of parent element to Id of child elements in tabView.
e.g.

Code: Select all

  
<h:form prependId="false">
  <p:tabView id="targetDetailsTabView" dynamic="true" cache="true"
    activeIndex="#{targetList.activeTargetDetailsTabIndex}" onTabChange="targetDetailsTabChanged(); ">
    <p:tab id="targetDetailsSingleTab" title="#{msgs.assetInfo}" styleClass="targetDescriptonContainer">

      <h:form id="targetDetailsRefreshForm" prependId="false">
        <p:panel id="targetDetailsRefreshWrapper" styleClass="targetDetailsWrappers">
          <p:commandButton id="singleTargetRefresh" value="#{msgs.refresh}" action="#{targetDetails.onRefreshClick}"
            update="targetDetailsFeaturesListWrapper" styleClass="refreshButtonLrg" />
          <br style="clear: both;" />
          <h:outputText id="targetDetailsRefreshDescription" value="#{msgs.refreshDescription}"
            styleClass="targetDetailsRefreshDescription" />
        </p:panel>
      </h:form>

      <p:dataGrid id="targetDetailsFeaturesListWrapper" var="targetFeature"
        value="#{targetDetails.selectedTargetFeatureList}" columns="1">

        <p:column>
          <p:panel>
            <p:panel styleClass="targetFeatureDetailsWrappers">
              <h:outputText id="nameTitle" value="#{targetFeature.feature.name} #{targetFeature.feature.version}"
                styleClass="targetFeatureName" />
            </p:panel>
        </p:column>
      </p:dataGrid>

    </p:tab>
    <p:tab rendered="#{targetList.renderTrayTab}" id="targetDetailsMultipleTab"
      title="#{msgs.jobTray} (#{multipleTargetsDetails.selectedTargetsCount})" styleClass="targetDescriptonContainer">
      <ui:include src="multiTargetDetails.xhtml" />
    </p:tab>
  </p:tabView>
</h:form>
 
This code assigne id="targetDetailsTabView:targetDetailsFeaturesListWrapper" to generated Datagrid. This is why I need to make changes into my existing code to adopt PF 3.0.M3.

If there any way I can control over generated Id ( not let parent id to parent to child id in tabView widget in PF 3.0.M3) ?
I was also wondering what is reason behind changing this into PF 3.0.M3 ?
Can I assume that this behaviour is going to be stable in feature releases ?
Primeface 3.2 | Tomcat 7.0.21 | MyFaces 2.1.5 | Eclipse 3.7 | CentOs 5.6

Drake
Posts: 44
Joined: 25 Jan 2011, 10:59

27 Sep 2011, 15:27

Looks like the same problem as this:
viewtopic.php?f=3&t=14521&p=46453
WildFly 10.1.0 Final, Mojarra 2.2.15 PrimeFaces 6.2

mitnpatel
Posts: 23
Joined: 05 Mar 2011, 04:47
Location: San Jose

27 Sep 2011, 19:57

@Drake Thank you for link. It is same issue as of mine.

But I still do not get clear solution for this issue there.
Primeface 3.2 | Tomcat 7.0.21 | MyFaces 2.1.5 | Eclipse 3.7 | CentOs 5.6

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

27 Sep 2011, 20:23

To implement dynamic tab model.

mitnpatel
Posts: 23
Joined: 05 Mar 2011, 04:47
Location: San Jose

27 Sep 2011, 22:37

Is there any way that to turn that off when not using daynamic tab ?
Primeface 3.2 | Tomcat 7.0.21 | MyFaces 2.1.5 | Eclipse 3.7 | CentOs 5.6

mitnpatel
Posts: 23
Joined: 05 Mar 2011, 04:47
Location: San Jose

05 Oct 2011, 00:39

It is creating too much problem for me as I can not update any element inside tab after ajax.
Any idea or suggetion for workaround this problem ?
Primeface 3.2 | Tomcat 7.0.21 | MyFaces 2.1.5 | Eclipse 3.7 | CentOs 5.6

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

10 Jan 2012, 19:49

mitnpatel wrote:It is creating too much problem for me as I can not update any element inside tab after ajax.
Any idea or suggetion for workaround this problem ?
See following post for solution/workaround:

[WORKAROUND] p:tabView prependId - how doing?
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

10 Jan 2012, 23:06

It is creating too much problem for me as I can not update any element inside tab after ajax.
Any idea or suggetion for workaround this problem ?
You need to read how findComponent API of UIComponent works to understand how things work. This is not related to tabs but apply in general, how to properly reference components in JSF from other components.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests