Hi Ryan,

Thank you Craig and Ryan for your response.
As you mentioned I could add shale1.0.2 to lib.
The only thing I changed was jsf-api.jar and jsf-impl.jar version1.1.
Because RAD comes with 1.0 for the following versions.
But when I run the deployment descriptor I get no exceptions but a
warning mentioning:
"No ViewControllerMapper has been configured for this application".
And I am not getting error message on the double click of the form.

My JSF page has the following lines of code.
<h:form>
        <h:messages />
        <h:inputText id="name" value="#{experiment.name}"/>
        <h:commandButton value="submit"
action="#{experiment.vanishMethod}"/>
        <s:token id="token" />
</h:form>

My faces-config.xml has the following configuration:
<managed-bean>
                <managed-bean-name>experiment</managed-bean-name>
        
<managed-bean-class>com.acs.experiment.MyPageBean</managed-bean-class>
                <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
        
<navigation-rule>
          <from-view-id>/ShalePractiseView.jsp</from-view-id>
          <navigation-case>
           <from-outcome>success</from-outcome>
           <to-view-id>/resultlost.jsp</to-view-id>
          </navigation-case>
</navigation-rule>

And my Page Bean method performs the following operation:
public String vanishMethod(){

                try {
                        Thread.sleep(1000);
                } catch (InterruptedException e) {
                        e.printStackTrace();
        }
        return "success";
}

And I missing out any other configuration.How can I prevent double click
using <s:token>.
Or <s:token> does not work in this scenario.

Best Regards,
Pallavi 
        

 

-----Original Message-----
From: Ryan Wynn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 20, 2006 11:48 PM
To: [email protected]
Subject: Re: Shale with WebSphere Portal

On 12/20/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> 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.

Portal 5.1 implements servlet version 2.3 so you are going to run into
problems with shale 1.0.3 because that introduced the jump to a required
servlet 2.4.  Shale 1.0.2 did not require servlet 2.4 and works well
with websphere portal 5.1.  I believe portal server 6 will work with
shale 1.0.3.

If you still have problems make sure you do not have commons-logging.jar
deployed in the application's lib directory.
Portal already includes this jar on its server classpath so you want to
avoid deploying it with your application.


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


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Reply via email to