Using <p:ajax> inside of <p:tree> generates error

UI Components for JSF
ianwelch
Posts: 4
Joined: 23 May 2011, 13:33

04 Jul 2011, 13:13

I have recently updated to Primefaces 3.0.M2 as I wanted to try out some additional functions however I am getting the same errors as people in this post of:

Code: Select all

Parent not an instance of ClientBehaviorHolder: org.primefaces.component.datatable.DataTable
when I try and add
<p:ajax event="rowEdit" listener="#{usersController.rowEditListener}" update=":form:growl"/>
for the edit listener on a datatable code like so:

Code: Select all

<h:panelGroup rendered="#{usersController.items.rowCount > 0}">
                    
                    <p:dataTable value="#{usersController.items}" var="item"  style="width:70%" 
                                 paginator="true" rows="10"
                                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                 rowsPerPageTemplate="5,10,15,20"  
                                 paginatorAlwaysVisible="false">
                       <p:ajax event="rowEdit" listener="#{usersController.rowEditListener}" update=":form:growl"/>
                        <p:column sortBy="#{item.userName}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListUsersTitle_userName}"/>
                            </f:facet>
                            <h:outputText value="#{item.userName}" />
                        </p:column>
Is this a known issue or is there a different version of 3.0.M2 to download?

Thanks
Ian Welch
Primfaces Version 3.0.M2
JSF 2.0
Glassfish 3.1

ianwelch
Posts: 4
Joined: 23 May 2011, 13:33

04 Jul 2011, 13:58

Well I sorted out the issue:

I'm using Netbeans 7.0 and glassfish v 3.1 and somehwere in the glassfish domain it was storing a reference to 3.0.M2-snapshot. Once I emptied out everything from the domain1 folders that referenced my deployment the p:ajax function now works :)

Thanks
Ian Welch
Primfaces Version 3.0.M2
JSF 2.0
Glassfish 3.1

jtrotman
Posts: 49
Joined: 29 Nov 2010, 14:32
Location: United Kingdom

04 Jul 2011, 16:01

Please to hear you got the problem sorted out! I'm sticking with M1 for the time being but will probably try M2 again once it has been officially released - it is probably possible to work around the issues I was having but I don't really have the time to spend wrestling with the technology at the moment.

Matrium
Posts: 112
Joined: 16 May 2011, 08:27

05 Jul 2011, 11:04

tried with 3.0.M2 today, looks like this is no longer an issue. <p:ajax> within tree works great now!

however i have another <p:tree> problem: my tree is invisible in IE7. it is correctly placed, but invisible. if i hover the mouse over one of the invisible nodes i can see that node as long as the mouse stays hovered over it. i also can see selected nodes. but everything else is invisble. any suggestions?

Code: Select all

					<p:tree value="#{navigation.root}"
						selection="#{navigation.currentlySelectedNode}" var="node"
						selectionMode="single" styleClass="template_tree">
						<p:ajax event="select" update="form_center"
							listener="#{navigation.onNodeSelect}" />

						<p:treeNode type="custom">
							<h:outputText value="#{node.bezeichnung}" />
						</p:treeNode>
					</p:tree>
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!

tcnguyen
Posts: 36
Joined: 05 Apr 2011, 13:34

05 Jul 2011, 11:41

Try to set event with nodeSelect instead of "select". More information: http://cagataycivici.wordpress.com/2011 ... behaviors/

Code: Select all

<p:tree ...>
    <p:ajax event="nodeSelect" ... />
</p:tree>
PrimeFaces 3.0.RC1 / Spring Webflow 2.3.0.RELEASE / SpringSource tc v2.1 / Tomcat 6.0.29.C.RELEASE

Matrium
Posts: 112
Joined: 16 May 2011, 08:27

05 Jul 2011, 11:58

hi, thanks for the tip, but "nodeSelect" doesn't seem to work at all for me, "select" does. my tree is very similar too the showcase. the listener works great, my real problem is that i can't SEE the tree with ie7

the labs-showase is displayed correctly and i can't explain why my tree is not. the tree is inside a layout/layoutunit, but i already tried to put it into an empty page which had the same effect
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!

Matrium
Posts: 112
Joined: 16 May 2011, 08:27

05 Jul 2011, 12:13

resolved!

looks like it was a theme-related problem (i use the Theme "start").

Adding the following css-lines resolved the problem for me, the tree is now correctly displayed in IE7 as well

.ui-tree-node-label {
color: black;
}
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 16 guests