On 12/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Hi All,

This is my first query to Shale mailing list.
Very newly introduced to shale.
I was asked to prevent the double click of a form button.
There are two parts to my question.



A) I wanted to use <s:token>.
But my IDE and server are posing problems.
I use RAD 6.0.1 to develop Faces Portlets and server is Websphere Portal
Server 5.1.

a)But when i try using shale1.0.2 i get the exception:Exception during
portlet initialization.

b)But when i try using shale1.0.3 i get the exception:web application
cannot be started.

Has anybody tried using this combination.


I have not tried this combination ... and, indeed, the whole area of support
for portlets has not been tested extensively.  Could you do me two favors?

* Post the stack trace you get with 1.0.3 that prevents the startup

* Try the same thing with a recent nightly build, and post any stack
 trace that comes from that.

B) I then tried downloading the source code for Token tag from
shale-core.jar.
    I have a simple form with a submit button and placed <s:token> as
the last token in the form.
    I wanted to reproduce the case when business logic is performed in
my page bean and i try submiting the form again.

<h:form id="myform" ><h:messages></h:messages>

<h:inputText id="name1" value="#{myBean.name}" />

<h:commandButton id="button1" value="Submit"
action="#{myBean.refreshForm}" />

<s:token id="token" />

</h:form>

And in my page bean method i wrote:

public String refreshForm(){
   try {
   Thread.sleep(10000);
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
     return "success";
}

For the first click it calls public void validate(FacesContext context)
method in Token class.But for the immediate second click this method is
not called.


Where does "return "success"" send you in your navigation rules?  If it
sends you to a different page, then you'll be receiving a different token
there -- and therefore the second click should *not* be caught.

And i do not get the error messages displayed on my portal page.

Please help me understand why this happens.

Best Regards,

Pallavi


Craig

Reply via email to