You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Craig McClanahan <cr...@apache.org> on 2006/12/20 18:56:12 UTC

Re: Shale with WebSphere Portal

On 12/20/06, pallavi.roy@wipro.com <pa...@wipro.com> 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

Re: Shale with WebSphere Portal

Posted by Ryan Wynn <bi...@gmail.com>.
On 12/20/06, Craig McClanahan <cr...@apache.org> wrote:
> On 12/20/06, pallavi.roy@wipro.com <pa...@wipro.com> 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
>
>