Is mainWindowBeanHandler request-scoped?  That might be part of the problem.

Also, I don't think you can use commandLink outside of a form.  You'd
need to use outputLink or an anchor tag instead.   Without a form,
your command-link can't submit JSF tree state data back to the server,
and the server has no context to process your request.

I haven't used tree2, so I can't comment beyond that.

On 12/16/05, Matias Gomez Carabias <[EMAIL PROTECTED]> wrote:
> Mike thanks for the quick reply...
>
> Here's the deal
>
> I have a treeMenu2 and when a node is clicked I call a method of a
> backing bean. (this commandLink is not inside a form, because I only
> send a parameter from it)
>
> On the right part of the jsp I define a dataTable in a form and an
> inputText with an h:commandLink. When this link is pressed I call
> another method of the same backingBean.
>
> This is the code :
>
> This is the one in the tree2
>
> <h:commandLink immediate="true"
> action="#{mainWindowBeanHandler.fillDocuments}">
>   <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
>   <h:outputText value=" (#{node.childCount})" styleClass="childCount"
> rendered="#{!empty node.children}"/>
>   <f:param name="activeFolder" value="#{node.description}"/>
> </h:commandLink>
>
> this one is inside the form:
>
>
> <h:commandLink styleClass="aSearch"
> action="#{mainWindowBeanHandler.searchDocuments}">
>         <h:outputText value="Find Now" />
> </h:commandLink>
>
> Thanks again
>
> Matias
>
>
> -----Original Message-----
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 16, 2005 4:08 PM
> To: MyFaces Discussion
> Subject: Re: Submit and h:commandLink question
>
> No, having multiple command links or command buttons calling different
> backing bean methods inside the same form is standard practice.
>
> Maybe your backing bean is request-scoped?   Maybe you've set an
> inconsistent renderer condition on your command link?
>
> Post the JSF commandLink page code instead of the raw html source, and
> we might be able to comment further.
>
> On 12/16/05, Matias Gomez Carabias <[EMAIL PROTECTED]> wrote:
> > Guys, I have the following question, is it possible to call several
> > h:commandLink component inside the same h:form?
> >
> > I'm asking this because nothing is done when the button (or link in
> this
> > case) is pressed.
> >
> >
> > I have several h:commandLink components and they all call different
> > methods of the same backing bean.
> >
> > Is there any restriction when doing this?
> >
> > The link is rendered like this:
> >
> > <a href="#"
> >
> onclick="clear_Documents_3A_5Fid23();document.forms['Documents:_id23'].e
> >
> lements['Documents:_id23:_link_hidden_'].value='Documents:_id23:_id29';i
> >
> f(document.forms['Documents:_id23'].onsubmit){if(document.forms['Documen
> > ts:_id23'].onsubmit())
> >
> document.forms['Documents:_id23'].submit();}else{document.forms['Documen
> > ts:_id23'].submit();}return false;" id="Documents:_id23:_id29"
> > class="aSearch">Find Now</a>
> >
> > And nothing is done when pressed.
> >
> > Thanks a lot
> >
> >
> > Matias Gomez Carabias
> >
>

Reply via email to