On 4/11/06, JSFSter Smith <[EMAIL PROTECTED]> wrote:
> 1. 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 ?

Use t:saveState to effectively make the scope of your request-scoped
beans into page-scoped beans.



>  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?

Correct, you cannot do it this way as f:param doesn't work with buttons.
There's a few ways to do this.   One is to add a component that will
set values (updateActionListener) when the action is triggered.  
Another is to call some javascript to manually set the parameter, but
it's not recommended.


                <script language="javascript">
                // <![CDATA[
                        function triggerRefreshButton(){
                            clear_form();
               
document.forms['form'].elements['NET_SF_JSFC_OPT_VDTR_MODE'].value='soft';
                        
document.forms['form'].elements['autoScroll'].value=getScrolling();
                        
document.getElementById("form:nonclearingRefreshButton").click();
                        }
                // ]]>
                </script>


                <!-- non-clearing refresh button; JSF will see it as 
refreshButton  -->
                <f:verbatim>
                    <input type="submit" style="display: none;" value="Submit"
name="form:refreshButton" id="form:nonclearingRefreshButton"/>
                </f:verbatim>
                
                <!-- never used directly; refreshButton exists so verbatim html
above can imitate it -->
                <h:commandButton id="refreshButton"
                    value="Submit" action="#{page.refresh}"
                    style="display:none">
                </h:commandButton>

Reply via email to