Thanks for the responses, Andrew and Matthias.
My question actually isn't about an alternate way to do it, but rather
where is it stated that giving a particular hidden field some
particular value will result in some particular JSF behavior? I mean,
other than going through the source code of both RI and MyFaces.
Since JSF is a spec, for a trick like this to work on all
implementations, it has to rely on something that all spec-compliant
implementations do. How did the author know that setting this hidden
field's value to its id will do the trick in all JSF implementations?
Is it written in the spec?
The behavior of all the standard component renderers are documented in the "render kit docs" that come with the RI ... and, indeed, the fact that clicking on an <h:commandLink> must cause the form to be submitted is part of the required behavior. The precise technique used is not mandated, but it's certainly going to involve some sort of _javascript_.
thanks,
Hubert
Craig
On 5/5/06, Andrew Robinson <[EMAIL PROTECTED]> wrote:
> I went ahead and updated the WIKI [1] with the code I was talking about
>
> -Andrew
>
> [1] http://wiki.apache.org/myfaces/_javascript_WithJavaServerFaces
>
> On 5/5/06, Matthias Wessendorf < [EMAIL PROTECTED]> wrote:
> > This wiki page contains some informations about _javascript_ and Faces [1]
> >
> > HTH,
> > Matthias
> >
> > [1] http://wiki.apache.org/myfaces/_javascript_WithJavaServerFaces
> >
> > On 4/29/06, Hubert Rabago <[EMAIL PROTECTED]> wrote:
> > > I was looking at the sample application in
> > > http://www.jsftutorials.net/interface/jsf-popup.html.
> > >
> > > In it, the author has this form:
> > >
> > > <h:form id="placeList">
> > > <h:commandLink id="find" action="" value=""/>
> > > </h:form>
> > >
> > > He has some _javascript_ that essentially sets the value of the command
> > > link equal to its id before submitting the form, also through
> > > _javascript_:
> > > form['placeList:find'].value = 'placeList:find';
> > >
> > > with a comment that states "This is an emulation of the action link
> > > being clicked."
> > >
> > > Where is this fact documented? I tried looking for it in the spec but
> > > couldn't find it.
> > >
> > > thanks,
> > > Hubert
> > >
> >

