users@woodstock.java.net

Re: Reset Page

From: M.R. Venkatesh Babu <venkateshbabu.mr_at_gmail.com>
Date: Tue, 12 Aug 2008 09:43:26 -0700

You can have a function which will be invoked when the reset button is
clicked.. And in that function you simply set the value of the widgets to a
predefined value.
function reset() {

    document.getElementById("form1:textField1").setProps({value:""});
    document.getElementById("form1:textField2").setProps({value:"Enter some
text"});
     ...
     ....

}


And in your jsp code

<webuijsf:button id="resetButton" text="Reset" onClick="reset();return
false"/>


-Venky
On Tue, Aug 12, 2008 at 4:36 AM, Vijaya Bhaskar Tsaliki <
vijayabhaskar.t_at_sonata-software.com> wrote:

> Hi,
>
>
>
> I want to reset my page using Reset button with Javascript and without
> going to server. What are the attributes I need to set on button.
>
>
>
> If I use reset="true" it is doing its own reset. If I remove reset="true"
> it is going to server.
>
>
>
> Please help….
>
>
>
> Regards,
>
> Vijay
>