This thought had actually occured to me, and as such I changed the scope, however it had no effect.  Is it possible theres some issue with having commandlinks inside datatables?
-----Original Message-----
From: "Ricardo R. Ram�rez Valenzuela" [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 15 June 2005 11:20 AM
To: MyFaces Discussion
Subject: Re: Displaying and linking search results

You need to restore the component state for the commandLink action to be fired, is your managed bean "search" request? Try changing it to session and see if that helps.

Daniel Murley wrote:
Thanks for the speedy response.

The problem seems to be however that search.showDetail isn't actually firing
at all.  The <h:commandLink> sits inside a <h:dataTable> component, are
there known issues with doing this?  I'm also not specifying any ids for the
commandLink (leaving this up to JSF).

I'd really appreciate any input on this, as I'm finding it exceedingly
frustrating :)

Daniel

-----Original Message-----
From: "Ricardo R. Ram�rez Valenzuela" [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 June 2005 2:57 AM
To: MyFaces Discussion
Subject: Re: Displaying and linking search results


Into  search.showDetail method:

        FacesContext facesContext = FacesContext.getCurrentInstance();
        Application a = facesContext.getApplication();
        ValueBinding binding = a.createValueBinding("#{" + beanName + "}");
        MyOtherPage page = (MyOtherPage) binding.getValue(facesContext);
        page.setAttribute(theObjectHere);

        If you are printing the search results from the datatable you
may need to get the current row in the datatable and
pass that object to the other linked page.



Daniel Murley wrote:

  
Hi all,

I'm currently building on JBoss and MyFaces.  I'm having a problem being
able to link search results to another page.

Effectively what happens at the moment is the user enters some criteria,
hits search, the backing bean in a request scope, grabs the information and
makes it available to the page.

However at this point i'm a little stumped, as I don't know how to be able
to link these results to other pages.

My initial thinking was along the lines of :

<h:commandLink value="#{search.name}" action="">
 <f:param name="searchID" value="#{search.id}" />
</h:commandLink>

However this doesn't seem to be working.  Am I on the right track here, or
is there a better way to do this?

Thanks,

Daniel



    


  

Reply via email to