h:selectonemenu contents not loaded inside p:tabview

UI Components for JSF
Post Reply
josel
Posts: 16
Joined: 15 Dec 2009, 20:51
Location: Brazil

17 Feb 2010, 17:57

Hello

I'm using a p:inplace for a h:selectonemenu in a p:datatable and this datatable is inside a p:tabView.

Code of the datatable:

Code: Select all

<p:dataTable id="changeDataTable" rows="10" styleClass="change_table"
    var="change" value="#{versionView.version.changes}" scrollable="true"
    height="480px">

    <p:column styleClass="important_column">
      <f:facet name="header">
        <h:outputText value="" />
      </f:facet>
      <p:inplace label="!" rendered="#{change.important}">
        <h:selectBooleanCheckbox value="#{change.important}" />
      </p:inplace>
      <h:selectBooleanCheckbox rendered="#{!change.important}"
        value="#{change.important}" />
    </p:column>

    <p:column sortBy="#{msgs[change.changeType.localizationKey]}"
      styleClass="type_column">
      <f:facet name="header">
        <h:outputText value="#{msgs.change_type}" />
      </f:facet>

      <p:inplace label="#{msgs[change.changeType.localizationKey]}"
        effectSpeed="fast">
        <h:selectOneMenu value="#{change.changeType}">
          <f:selectItems value="#{change.changeType.values}" var="changeType"
            itemLabel="#{msgs[changeType.localizationKey]}"
            itemValue="#{changeType}" />
        </h:selectOneMenu>
      </p:inplace>

    </p:column>

    <p:column styleClass="description_column">
      <f:facet name="header">
        <h:outputText value="#{msgs.change_description}" />
      </f:facet>
      <p:inplace rendered="#{change.id != null}">
        <h:inputTextarea value="#{change.description}" />
      </p:inplace>
      <h:inputTextarea rendered="#{change.id == null}"
        value="#{change.description}" />
    </p:column>
  </p:dataTable>
It happens that the select is always empty on the first load, even if i remove the p:inplace. I found that if I call update for the datatable from other component it shows the selectOneMenu right, with all the elements.

I also found that if I take out the p:datatable from the p:tabView the h:selectOneMenu works well.

Code tabView:

Code: Select all

<p:tabView rendered="#{versionView.version != null}"
              dynamic="true">
        <p:tab title="#{msgs.version_version}">
          <ui:include src="../version/content.xhtml" />
        </p:tab>
        <p:tab title="#{msgs.change_changes}">
          <ui:include src="../change/list.xhtml" />
        </p:tab>
</p:tabView>
Response from server, like you can see the select is empty:

Code: Select all

<td>
<script type="text/javascript">
PrimeFaces.onContentReady('productSection:changeDataTable:1:j_idt79', function() {
productSection_changeDataTable_1_j_idt79_widget = new PrimeFaces.widget.Inplace('productSection:changeDataTable:1:j_idt79', 
{effect:'fade',effectSpeed:'fast'});});
</script>
<span id="productSection:changeDataTable:1:j_idt79" class="pf-inplace">
  <span id="productSection:changeDataTable:1:j_idt79_display" class="pf-inplace-display"></span>
	  <span id="productSection:changeDataTable:1:j_idt79_content" class="pf-inplace-content">
	    <select name="productSection:changeDataTable:1:j_idt80" size="1"></select>
	  </span>
  </span>
</td>
Any ideas why this doesn't work inside the tabView?

Thanks in advance.

JoseL
PrimeFaces 2.0.0-SNAPSHOT
JSF 2.0.2
Tomcat 6
JoseL
---------------------------
PrimeFaces 2.0.0
JSF 2.0.2
Tomcat 6

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

17 Feb 2010, 18:11

Does it work with non-dynamic tabview?

josel
Posts: 16
Joined: 15 Dec 2009, 20:51
Location: Brazil

17 Feb 2010, 18:37

Does it work with non-dynamic tabview?
No it doesn't, I forgot to write that was the first thing I tried.

JoseL
PrimeFaces 2.0.0-SNAPSHOT
JSF 2.0.2
Tomcat 6
JoseL
---------------------------
PrimeFaces 2.0.0
JSF 2.0.2
Tomcat 6

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

17 Feb 2010, 18:56

Can you try with PrimeFaces 2.0.0, I see you are using 2.0.0-SNAPSHOT. Please both dynamic/non-dynamic cases and let us know.

josel
Posts: 16
Joined: 15 Dec 2009, 20:51
Location: Brazil

17 Feb 2010, 20:52

I tried it with PrimeFaces 2.0.0 and it works perfectly in both cases dynamic/non-dynamic tabView.

For now on I think we are going to keep with the stable release.

Btw, congrats for your new release.

Thanks for your help and fast answer.

JoseL
PrimeFaces 2.0.0
JSF 2.0.2
Tomcat 6
JoseL
---------------------------
PrimeFaces 2.0.0
JSF 2.0.2
Tomcat 6

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

19 Feb 2010, 13:03

Hi Josel, yes tabView is revised in 2.0.0 so it is much more stable now.

PrimeFaces is getting more stable everyday and still evolvles at the same time. :)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 54 guests