<BIG LIGHT BULB!!!>

Thank you, that was the issue... (I should had know that.)

Anyways, all of your information is greatly appreciated and helpful.

I'm still hammering away on using the BaseTreeNode example from your
blog, but everything is going well... babysteps - ya know.

Thanks again,

--Todd
 

-----Original Message-----
From: Andrew Robinson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 06, 2006 11:52 AM
To: MyFaces Discussion
Subject: Re: Error with MyFaces Tree2 and Ajaxanywhere:
javax.servlet.ServletException: Component is no ActionSource

Your error is because you have an updateActionListener tag inside of a
facet. You have to have it in a UI command component (or anything else
that extends the action source interface). You are on the right track
for the AA code though.

See my other reply on this for more information

-Andrew

On 7/6/06, Todd Patrick <[EMAIL PROTECTED]> wrote:
> In my continuation of trying to get Ajaxanywhere to run with Tree2, I 
> have done the following:
>
> <aa:zoneJSF id="TreeTwoZone">
>     <t:tree2
>         id="TreeTwoZone"
>         value="#{tbrowser.treeModel}"
>         var="_node"
>         clientSideToggle="false"
>         varNodeToggler="t"
>         showRootNode="false">
>         <f:facet name="folder">
>             <t:panelGroup>
>                 <t:graphicImage
>                 styleClass="treeNodeIcon"
>                 url="#{_node.expanded ?
>                 'resources/yellow-folder-open.png' :
>                 'resources/yellow-folder-closed.png'}" />
>                 <t:outputText
>                 styleClass="folderNodeText"
>                 value="#{_node.name}" />
>             </t:panelGroup>
>         </f:facet>
>         <f:facet name="file">
>             <t:updateActionListener
>             property="#{tbrowser.currentFileName}"
>             value="#{_node.name}" />
>             <t:graphicImage
>             styleClass="treeNodeIcon"
>             url="resources/document.png" />
>             <t:outputText
>             styleClass="fileNodeText"
>             value="#{_node.name}" />
>         </f:facet>
>     </t:tree2>
> </aa:zoneJSF>
>
>
> However, now I get the error:
>
> "javax.faces.FacesException: Component TreeTwoZone is no ActionSource"
>
>
> Ok, so that is saying my Tree2 is not a source of an action event??? I

> tried putting the <aa:zoneJSF> around the <f:facet> and that returned 
> the same error.
>
> How do I:
>
> 1. Go about figuring out what the true meaning of the error is?
>
> 2. Use MyFaces Tree2 and Ajaxanywhere together properly?
>
> Thanks,
>
> --Todd
>
>
> -----Original Message-----
> From: Todd Patrick
> Sent: Thursday, July 06, 2006 11:26 AM
> To: 'MyFaces Discussion'
> Subject: RE: What is the my:ajaxTree element in the MyFaces Tree2 - 
> Creating a lazy loading tree guide?
>
> Thanks, I did understand your blog note.
>
> Just the elements in the XHTML example threw me off.
>
> I've been reviewing the AjaxAnywhere demo examples and I believe I can

> use a combination of your guide with a MyFaces Tomahawk tree2 that I 
> am currently using below.
>
> The only thing I am somewhat confused on is where would I put the 
> following Ajax Request check for my tree2:
>
> if (AAUtils.isAjaxRequest(getRequest())) {
>         AAUtils.addZonesToRefresh(getRequest(), "categoryList"); }
>
> private HttpServletRequest getRequest() {
>         return (HttpServletRequest)
> FacesContext.getCurrentInstance().getExternalContext().getRequest();
> }
>
>
> I believe it should go in each of my ActionEvents that my tree uses?
>
> Thanks,
>
> --Todd
>
>
> <t:tree2
>     id="commandTree"
>     value="#{tbrowser.commandTreeModel}"
>     var="node"
>     varNodeToggler="c"
>     showRootNode="false"
>     clientSideToggle="false"
>     preserveToggle="true"
>     showLines="true"
>     showNav="true">
>     <f:facet name="command-index">
>         <h:panelGroup>
>             <f:facet name="expand">
>                 <t:graphicImage
value="resources/yellow-folder-open.png"
> rendered="#{c.nodeExpanded}" border="0"/>
>             </f:facet>
>             <f:facet name="collapse">
>                 <t:graphicImage
> value="resources/yellow-folder-closed.png"
rendered="#{!c.nodeExpanded}"
> border="0"/>
>             </f:facet>
>             <h:outputText value="#{node.description}"
> styleClass="NodeFolder"/>
>         </h:panelGroup>
>     </f:facet>
>     <f:facet name="commands">
>         <h:panelGroup>
>             <t:commandLink immediate="true"
> actionListener="#{tbrowser.expandElement}">
>                 <t:graphicImage value="resources/document.png"
> rendered="#{c.nodeExpanded}" border="0"/>
>                 <t:graphicImage value="resources/document.png"
> rendered="#{!c.nodeExpanded}" border="0"/>
>                 <h:outputText styleClass="#{t.nodeSelected ?
> 'Documentselected':'Document'}" value="#{node.description}"/>
>                 <t:updateActionListener
property="#{tbrowser.elementid}"
> value="#{node.identifier}" />
>             </t:commandLink>
>         </h:panelGroup>
>     </f:facet>
> </t:tree2>
>
> -----Original Message-----
> From: Andrew Robinson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 06, 2006 11:14 AM
> To: MyFaces Discussion
> Subject: Re: What is the my:ajaxTree element in the MyFaces Tree2 - 
> Creating a lazy loading tree guide?
>
> It is an example. For my company, I extended Tree2 and added built in 
> AjaxAnywhere compatibility. Since it is a commercial application, I 
> cannot share this code. As in my blog, I mentioned that "AJAX'ing" the

> tree is a whole different topic. I may looking into helping the 
> community out by creating a new tomahawk/sandbox component that is an 
> extension of tree2 with AJAX support, but I am not sure if I will have

> the time.
>
> As for ajaxCommandLink, it is once again an extension (this one of
> commandLink) that works with AjaxAnywhere. (note: ajax4jsf has built 
> in support for components such as these, but not the tree).
>
> -Andrew
>
> On 7/6/06, Todd Patrick <[EMAIL PROTECTED]> wrote:
> > What is the my:ajaxTree element in the  MyFaces Tree2 - Creating a 
> > lazy loading tree guide?
> >
> > Below, there is a reference to my:ajaxTree and my:ajaxCommandLink. I

> > did a Google search and nothing is referenced for these.
> >
> > Thanks,
> >
> > --Todd
> >
> >
> > <aa:zoneJSF id="contentMgmtTreeZone"> <my:ajaxTree 
> > value="#{contentMgmtBean.treeModel}"
> > ajaxZone="contentMgmtTreeZone"
> > var="_node"
> > clientSideToggle="false"
> > varNodeToggler="t"
> > showRootNode="false">
> > <f:facet name="folder">
> > <t:panelGroup>
> > <t:graphicImage
> > styleClass="treeNodeIcon"
> > url="#{_node.expanded ?
> > '/images/contentMgmt/openfolder.gif' :
> > '/images/contentMgmt/closedfolder.gif'}" /> <t:outputText 
> > styleClass="folderNodeText"
> > value="#{_node.name}" />
> > </t:panelGroup>
> > </f:facet>
> > <f:facet name="file">
> > <my:ajaxCommandLink
> > ajaxZone="contentMgmtTreeZone,myResultZone"
> > actionListener="#{contentMgmtBean.nodeSelected}"
> > styleClass="fileNodeLink#{
> > contentMgmtBean.currentFileName eq _node.name ?
> > ' selectedNode' : ''}">
> > <t:updateActionListener
> > property="#{contentMgmtBean.currentFileName}"
> > value="#{_node.name}" />
> > <t:graphicImage
> > styleClass="treeNodeIcon"
> > url="/images/contentMgmt/file.gif" /> <t:outputText 
> > styleClass="fileNodeText"
> > value="#{_node.name}" />
> > </ost:ajaxCommandLink>
> > </f:facet>
> > </my:ajaxTree>
> > </aa:zoneJSF>
> >
>

Reply via email to