1

i got two cases of strange behaviour in my p:dataTable . First when i try to call the h:link with the f:param the link always sends the same id. Always the id from the first entry. The bigger problem is when i push on the commandbutton the h:link gets called though this behavior was completely not expected. Especially without the right Parameters. Is this a Bug or am i doing something wrong? When i delete the h:link everything works like expected. I would appreciate any help in this matter

My Primefaces Version is 3.5 and im working with Liferay 6.1 on Tomcat 7. With the newest FacesBridge

<h:form id="serviceForm">
     <p:dataTable id="newServicesTable" var="service" value="#{cloudServicesBean.newServices}" rowKey="service.serviceId" selection="#{cloudServicesBean.selectedService}">
                <p:column headerText="Servicename">
                 <h:link  outcome="/views/cloudservice/overview.xhtml" includeViewParams="true" value="#{service.serviceName}">
                        <h:outputText value="#{service.serviceId}"/>
                         <f:param name="selectedServiceId" value="#{service.serviceId}" />
                    </h:link>   
                </p:column>
                <p:column headerText="Provider">
                    <h:outputText value="#{adminBean.getOrganizationNameForId(service.providerId)}" />
                </p:column>
                <p:column headerText="Datum">
                    <h:outputText value="#{service.createDate}" />
                </p:column>
                <p:column headerText="Aktionen" rendered="#{adminBean.isUserAdministrator()}">
                    <p:commandButton icon="ui-icon-check"  action="#{cloudServicesBean.setServiceApproved}" update=":serviceForm">
                        <f:setPropertyActionListener value="#{service}" target="#{cloudServicesBean.selectedService}" />
                    </p:commandButton>

            </p:column>
            </p:dataTable>
4

1 に答える 1

1

私はまったく同じ問題を抱えていました。Tomcat 7 で Liferay 6.0.11 を使用して Primefaces 3.5 を実行しています。Liferay JSF の依存関係をバージョン 3.1.2.ga3 から 3.1.3-ga4 に切り替えたところ、問題は解決しました。

      <dependency>
        <groupId>com.liferay.faces</groupId>
        <artifactId>liferay-faces-alloy</artifactId>
        <version>3.1.3-ga4</version>
      </dependency>
      <dependency>
        <groupId>com.liferay.faces</groupId>
        <artifactId>liferay-faces-bridge-impl</artifactId>
        <version>3.1.3-ga4</version>
      </dependency>
      <dependency>
        <groupId>com.liferay.faces</groupId>
        <artifactId>liferay-faces-portal</artifactId>
        <version>3.1.3-ga4</version>
于 2013-09-07T12:40:12.053 に答える