<p:commandButton> : bean not resolving with ui:param

UI Components for JSF
Post Reply
foolshat
Posts: 59
Joined: 03 Nov 2010, 21:36

08 Nov 2010, 11:41

I'm using a <ui:composition> and able to reference beans by using a parameter eg p_entity.selectedItems

the parameters are set by
<ui:param name="p_entity" value="#{ ...

However, I've added a <p:dialog> with a <p:commandButton>, and for some reason the actionListener attribute can't resolve p_entity, so I have to write it explicity like this: actionListener="#{whiteListFriendsAndFamily.deleteItems}"
In the same scope, I have a <p:dataList> which does resolve using the parameter eg value="#{p_entity.selectedItems}" var="selected">

So why the difference ? A bug, or am I missing something ?

Here is the outline of my ui:composition, with section removed.

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                >
...

  <p:dialog header="Delete these items ?" widgetVar="deleteDialog"
              width="400" height="400" showEffect="explode" hideEffect="explode">

        <p:dataList id="displayMulti"
                value="#{p_entity.selectedItems}" var="selected">
            Model: #{selected.description}
        </p:dataList>
        <p:commandButton value="Delete"  update="growl"
                actionListener="#{whiteListFriendsAndFamily.deleteItems}"
                oncomplete="deleteDialog.hide();"
                         />
    </p:dialog>  

    </ui:composition>
PrimeFaces 2.2 RC2 , Glassfish3.0.1 Mojarra 2.0.2, Netbeans 6.9.1 Java, Scala and AKKA

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 49 guests