Hi Rajiv,
1: The model must the same on render and restore phase, afaik you can
force this by using preserveDataModel="true" on t:datatable.
Or you can use the t:saveState tag see:
http://myfaces.apache.org/tomahawk/uiSaveState.html
3: the html ids are created by prefixing component ids with the ids of
namingcontainer components
you should use sommething like
document.forms['MyJSFForm'].elements['MyJSFForm:submitLink'].click()
or
document.getElementById('MyJSFForm:submitLink').click()
Take a look into the generated html source if unclear about the
generated id of the link.
Regards,
Volker
JSFSter Smith wrote:
> Hi,
>
> I have just started using MyFaces for a new project and had a couple of
> questions while I am on the learning curve. Any help/response is greatly
> appreciated. Its been a pleasure to actually create JSP pages with no java
> code using JSF in them and I hope to keep them that way!
>
>
> 1. <h:commandLink> tag does not work inside a <t:dataTable> tag
> and ends up refreshing the same page from where the link was clicked
> without any updates to the model. The get/set methods for the corresponding
> backing bean member are never called by the framework
>
> I looked through the mail archives for myFaces as well as JSF RI. This
> seems to be an issue faced by many users and the suggested work around is to
> make the backing bean that contains the table data a session bean (currently
> mine is a request). Is this a bug with the spec or am I missing something ?
>
> 2. <h:commandButton> with a request scope backing bean cannot be used to
> pass request parameters to the next page using <f:param> tags.
> The <h:commandLink> tag has to be used instead. Again is this a bug or I
> am missing something?
>
> Currently, I am using h:commandLinks for my request param passing and it
> works fine. But this leads me to my final question:
>
> 3. I am trying to map the enter key to my command link (which is an image)
> using javascript and have included a snippet below.
>
> if (keycode == 13) {
>
> document.forms['MyJSFForm'].elements['submitLink'].click()
> return false;
> }
>
> I have explicitly given id's to my form and commandLink. The java script
> object for the link is invalid
>
> Thanks in advance for your response!
>
> - Rajiv
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.