Actually, its even simpler than that.
The commandLink puts the param on the postback, so you should be able to reference it by calling:
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("paramName");
On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
event.getComponent()
comp.getChildren()
while children.hasnext
if child instanceof UIParameter
set[child.getName]=child.value;
I wonder if instead of returning void from the bean setter if I return the value I can
<h:inputHidden value="#{searchBean.lastModified['04/05/2005']}"
converter=" javax.faces.DateTime"/>
--
Rob
@objectsource.org
---------- Original Message -----------
From: Heath Borders < [EMAIL PROTECTED]>
To: MyFaces Discussion <[email protected]>
Sent: Wed, 13 Apr 2005 15:30:57 -0500
Subject: Re: predefined form values
> Ok, then you write a single quickSearch(ActionEvent) method and inside it
> you check for the quickSearch parameter(s). And use those to search.
>
> On 4/13/05, Rob Decker < [EMAIL PROTECTED]> wrote:
> >
> >
> > I don't want to write a java method for every quick search I want. I'd
> > like to be able
> > to just add a new quick search to a jsp. Say I have 3 quick searches:
> >
> > Look for things from: Today, Yesterday, Last Week
> >
> > Then next month the boss says 'I want a quick search for tomorrow!'. It
> > would be
> > easier for someone to add it to the jsp page than to have to write a new
> > java method
> > in the bean. It's a presentation detail.
> >
> > --
> > Rob
> >
> > @objectsource.org < http://objectsource.org>
> >
> > ---------- Original Message -----------
> > From: Enrique Medina <[EMAIL PROTECTED]>
> > To: MyFaces Discussion < [email protected]>
> > Sent: Wed, 13 Apr 2005 21:05:03 +0200
> > Subject: Re: predefined form values
> >
> > > Why not simply call another method from the commandLink (say
> > > searchQuick) where those values are set in code, and then call the
> > > search method?
> > >
> > > On 4/13/05, Rob Decker <[EMAIL PROTECTED] > wrote:
> > > >
> > > > Say I have a form to do a search and a backing bean called SearchBean:
> > > >
> > > > <h:form>
> > > > <h:inputText value="#{ searchBean.searchValue}"/>
> > > > <x:inputCalendar value="#{searchBean.lastModified}"/>
> > > > <h:commandButton type="submit" action="" }"/>
> > > > </h:form>
> > > >
> > > > Now say I want to have simple links with predefined values for the
> > search
> > parameters,
> > > > a quick search link:
> > > >
> > > > <h:form
> > > > <h:commandLink action="">> > > > <h:outputText value="Quick Search"/>
> > > > <h:inputHidden value="*"/>
> > > > <h:inputHidden value="04/05/2005"/>
> > > > </h:commandLink>
> > > > </h:form>
> > > >
> > > > How do I associate the hidden input values with the search bean
> > methods that holds
> > > > their values? It seems like in this case I have to id all the
> > components, get the
> > > > request, and populate the search bean myself or I have to create the
> > search bean so
> > > > it binds components instead of values. Is there a simple way to do
> > this that I'm
> > > > missing?
> > > >
> > > > --
> > > > Rob
> > > >
> > > > @objectsource.org <http://objectsource.org>
> > > >
> > > >
> > ------- End of Original Message -------
> >
> >
>
> --
> -Heath Borders-Wing
> [EMAIL PROTECTED]
------- End of Original Message -------
--
-Heath Borders-Wing
[EMAIL PROTECTED]

