RE: setTemplate using JSPAction (or even GenericMVCPortlet/PortletAction now)

2003-09-09 Thread Gregory Joseph
Thanks !
It works great now! 
(the action defined in the form came from an example i found in the tutorial)

The only thing, is that in the portletlink tag i have (1.4b4), there's no
"template" attribute, so i did not put it. then the form action url looks a
bit awkward:
http://myhost/ThingWeb/portal/user/admin/page/default.psml/media-type/html?ac
tion=controls.Maximize

Is this normal?

I guess I can close the bug on bugzilla... or change its component to
"documentation" ;) I guess I'll leave the decision up to you!

Thanks again. 

greg

-Original Message-
From: Weaver, Scott [mailto:[EMAIL PROTECTED]
Sent: mardi 9 septembre 2003 19:19
To: 'Jetspeed Users List'
Subject: RE: setTemplate using JSPAction (or even
GenericMVCPortlet/PortletAction now)


I see your problem, you have defined your action within the form, this is
causing turbine to execute your action before the portlet can.  This is why
there is no context available, the GenericMVCPortlet creates it before
invoking the action nut it never makes it there because Turbine is calling
the action.

Remove the action field and make sure you have your action defined at the
registry level.

Try this (I have removed the action field and changed your form action)

" method="get">
 
 
 
 


*===*
* Scott T Weaver    *
* Jakarta Jetspeed Portal Project   *
* [EMAIL PROTECTED] *
*===*
  


> -Original Message-
> From: Gregory Joseph [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 09, 2003 10:57 AM
> To: Jetspeed Users List
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> Through form submission, my form looks like: (removed useless html stuff)
> 
> http://myhost/ThingWeb/portal"; method="get">
>  
>  
>  
>  
>  
> 
> 
> I'm starting to believe there's something wrong there :/
> (my action is executed, though, since i also added result display in the
> "main" template, to check that)
> 
> greg
> 
> -----Original Message-
> From: Weaver, Scott [mailto:[EMAIL PROTECTED]
> Sent: mardi 9 septembre 2003 15:06
> To: '[EMAIL PROTECTED]'
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> 
> Gregory,
> 
> How are you invoking the action when this fails?  Is it through a form
> submission or directly through a link?  If it is a form, what is the
> "action"
> attribute set to?
> 
> 
> Regards,
> *===*
> * Scott T Weaver    *
> * Jakarta Jetspeed Portal Project   *
> * [EMAIL PROTECTED] *
> *=======*
> 
> 
> 
> > -Original Message-
> > From: Gregory Joseph [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 09, 2003 8:20 AM
> > To: Jetspeed Developers List
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: setTemplate using JSPAction (or even
> > GenericMVCPortlet/PortletAction now)
> >
> > Hi Scott,
> >
> > I was really glad to get your mail, but unfortunately it still doesn't
> > work
> > :/
> > Below is a copy of my registry, as it was, and as i modified it
> following
> > your example. But still no luck.
> > My action was a subclass of JspPortletAction, I made it a subclass of
> > GenericMVCAction, but still no luck. It seems like
> "VelocityActionContext"
> > thingie is never instanciated as it should for the setTemplate method to
> > work.
> > I will file a bug on bugzilla... but in the mean time, is there anything
> > else
> > I can do or try?
> >
> > Thanks again
> >
> > greg
> > 
> >
> > Here's how my registry looked like:
> > 
> > 
> >  >parent="GenericMVCPortlet" application="false">
> >   
> > Thingieportlet
> > 
> >   Allows to search thingies using various search criterias.
> > 
> >   
> >   
> >> hidden="false"/>
> >   
> >   
> >   company
> >   company.thingie
> > 
> >
> > 
> >
> >
> > Here's how I modified it following your example:
> > 
> > 
> >
> >  application="false"
> >type="abstract">
> >   
> >
> >
> org.apache.jetspeed.portal.portlets.GenericMVCPortlet > e>
> >>  cachedOnName="true" cachedOnValue="true"/>
> >   
> >   company
> > 
> >

RE: setTemplate using JSPAction (or even GenericMVCPortlet/Portle tAction now)

2003-09-09 Thread Weaver, Scott
I see your problem, you have defined your action within the form, this is causing 
turbine to execute your action before the portlet can.  This is why there is no 
context available, the GenericMVCPortlet creates it before invoking the action nut it 
never makes it there because Turbine is calling the action.

Remove the action field and make sure you have your action defined at the registry 
level.

Try this (I have removed the action field and changed your form action)

" method="get">
 
 
 
 


*===*
* Scott T Weaver    *
* Jakarta Jetspeed Portal Project   *
* [EMAIL PROTECTED] *
*===*
  


> -Original Message-
> From: Gregory Joseph [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 09, 2003 10:57 AM
> To: Jetspeed Users List
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> Through form submission, my form looks like: (removed useless html stuff)
> 
> http://myhost/ThingWeb/portal"; method="get">
>  
>  
>  
>  
>  
> 
> 
> I'm starting to believe there's something wrong there :/
> (my action is executed, though, since i also added result display in the
> "main" template, to check that)
> 
> greg
> 
> -Original Message-
> From: Weaver, Scott [mailto:[EMAIL PROTECTED]
> Sent: mardi 9 septembre 2003 15:06
> To: '[EMAIL PROTECTED]'
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> 
> Gregory,
> 
> How are you invoking the action when this fails?  Is it through a form
> submission or directly through a link?  If it is a form, what is the
> "action"
> attribute set to?
> 
> 
> Regards,
> *===*
> * Scott T Weaver    *
> * Jakarta Jetspeed Portal Project   *
> * [EMAIL PROTECTED] *
> *===*
> 
> 
> 
> > -Original Message-
> > From: Gregory Joseph [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 09, 2003 8:20 AM
> > To: Jetspeed Developers List
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: setTemplate using JSPAction (or even
> > GenericMVCPortlet/PortletAction now)
> >
> > Hi Scott,
> >
> > I was really glad to get your mail, but unfortunately it still doesn't
> > work
> > :/
> > Below is a copy of my registry, as it was, and as i modified it
> following
> > your example. But still no luck.
> > My action was a subclass of JspPortletAction, I made it a subclass of
> > GenericMVCAction, but still no luck. It seems like
> "VelocityActionContext"
> > thingie is never instanciated as it should for the setTemplate method to
> > work.
> > I will file a bug on bugzilla... but in the mean time, is there anything
> > else
> > I can do or try?
> >
> > Thanks again
> >
> > greg
> > 
> >
> > Here's how my registry looked like:
> > 
> > 
> >  >parent="GenericMVCPortlet" application="false">
> >   
> > Thingieportlet
> > 
> >   Allows to search thingies using various search criterias.
> > 
> >   
> >   
> >> hidden="false"/>
> >   
> >   
> >   company
> >   company.thingie
> > 
> >
> > 
> >
> >
> > Here's how I modified it following your example:
> > 
> > 
> >
> >  application="false"
> >type="abstract">
> >   
> >
> >
> org.apache.jetspeed.portal.portlets.GenericMVCPortlet > e>
> >>  cachedOnName="true" cachedOnValue="true"/>
> >   
> >   company
> > 
> >
> >  >        type="ref" parent="JspMVCPortlet">
> >   
> >   
> > Thingie portlet
> > Allows to search thingies using various search
> > criterias.
> >   
> >
> >
> org.apache.jetspeed.portal.portlets.GenericMVCPortlet > e>
> >>  hidden="false" cachedOnName="true" cachedOnValue="true"/>
> >>  hidden="false" cachedOnName="true" cachedOnValue="true"/>
> >>  hidden="false" cachedOnName="true" cachedOnValue="true"/>
> >   
> >   
> >   company.thingie
> > 
> > 
> >
> >
> >

RE: setTemplate using JSPAction (or even GenericMVCPortlet/PortletAction now)

2003-09-09 Thread Gregory Joseph
Through form submission, my form looks like: (removed useless html stuff)

http://myhost/ThingWeb/portal"; method="get">
 
 
 
 
 


I'm starting to believe there's something wrong there :/
(my action is executed, though, since i also added result display in the
"main" template, to check that)

greg

-Original Message-
From: Weaver, Scott [mailto:[EMAIL PROTECTED]
Sent: mardi 9 septembre 2003 15:06
To: '[EMAIL PROTECTED]'
Subject: RE: setTemplate using JSPAction (or even
GenericMVCPortlet/PortletAction now)


Gregory,

How are you invoking the action when this fails?  Is it through a form
submission or directly through a link?  If it is a form, what is the "action"
attribute set to?


Regards,
*===*
* Scott T Weaver    *
* Jakarta Jetspeed Portal Project   *
* [EMAIL PROTECTED] *
*===*
  


> -Original Message-
> From: Gregory Joseph [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 09, 2003 8:20 AM
> To: Jetspeed Developers List
> Cc: [EMAIL PROTECTED]
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> Hi Scott,
> 
> I was really glad to get your mail, but unfortunately it still doesn't
> work
> :/
> Below is a copy of my registry, as it was, and as i modified it following
> your example. But still no luck.
> My action was a subclass of JspPortletAction, I made it a subclass of
> GenericMVCAction, but still no luck. It seems like "VelocityActionContext"
> thingie is never instanciated as it should for the setTemplate method to
> work.
> I will file a bug on bugzilla... but in the mean time, is there anything
> else
> I can do or try?
> 
> Thanks again
> 
> greg
> 
> 
> Here's how my registry looked like:
> 
> 
> parent="GenericMVCPortlet" application="false">
>   
> Thingieportlet
> 
>   Allows to search thingies using various search criterias.
> 
>   
>   
>hidden="false"/>
>   
>   
>   company
>   company.thingie
> 
> 
> 
> 
> 
> Here's how I modified it following your example:
> 
> 
> 
> type="abstract">
>   
> 
> org.apache.jetspeed.portal.portlets.GenericMVCPortlet e>
> cachedOnName="true" cachedOnValue="true"/>
>   
>   company
> 
> 
> type="ref" parent="JspMVCPortlet">
>   
>   
> Thingie portlet
> Allows to search thingies using various search
> criterias.
>   
> 
> org.apache.jetspeed.portal.portlets.GenericMVCPortlet e>
> hidden="false" cachedOnName="true" cachedOnValue="true"/>
> hidden="false" cachedOnName="true" cachedOnValue="true"/>
> hidden="false" cachedOnName="true" cachedOnValue="true"/>
>   
>   
>   company.thingie
> 
> 
> 
> 
> -Original Message-
> From: Weaver, Scott [mailto:[EMAIL PROTECTED]
> Sent: mardi 9 septembre 2003 0:14
> To: 'Jetspeed Users List'
> Cc: 'Jetspeed Developers List'
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> 
> Please post a snippet of your registry.  That would help us immensely.
> Some
> quick thoughts:
> 
> 1. In viewtype, Jsp needs to be all caps
> 
>  cachedOnName="true" cachedOnValue="true"/>
> 
> The GenericMVCAction.setTemplate(RunData, String) also works fine for me
> within my JSP portlet action.  I will give you some example reg entries.
> Maybe that will help you in getting started:
> 
> (Excuse the formatting)
> 
> A nice base for JSP portlets using MVC:
> 
> application="false">
>  
>  
>org.apache.jetspeed.portal.portlets.GenericMVCPortlet
>  
> cachedOnName="true" cachedOnValue="true"/>
>  
>  jsp
> 
> 
> 
> 
> 
> And here is an example of its use:
> 
>  parent="JspMVCPortlet" application="false">
>  
>  
>Editable  Free-Form HTML portlet generator
>  Use this this portlet generator to create
>   editable free-form HTML portlets.
>  
>  
>  
>  
>org.apache.jetspeed.portal.portlets.GenericMVCPortlet
>  
>  
> hidden="false" cachedOnName="true" cachedOnValue="true"/>
> 
>   value="portlets.freeform.Freefo

RE: setTemplate using JSPAction (or even GenericMVCPortlet/Portle tAction now)

2003-09-09 Thread Weaver, Scott
Gregory,

How are you invoking the action when this fails?  Is it through a form submission or 
directly through a link?  If it is a form, what is the "action" attribute set to?


Regards,
*===*
* Scott T Weaver    *
* Jakarta Jetspeed Portal Project   *
* [EMAIL PROTECTED] *
*===*
  


> -Original Message-
> From: Gregory Joseph [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 09, 2003 8:20 AM
> To: Jetspeed Developers List
> Cc: [EMAIL PROTECTED]
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> Hi Scott,
> 
> I was really glad to get your mail, but unfortunately it still doesn't
> work
> :/
> Below is a copy of my registry, as it was, and as i modified it following
> your example. But still no luck.
> My action was a subclass of JspPortletAction, I made it a subclass of
> GenericMVCAction, but still no luck. It seems like "VelocityActionContext"
> thingie is never instanciated as it should for the setTemplate method to
> work.
> I will file a bug on bugzilla... but in the mean time, is there anything
> else
> I can do or try?
> 
> Thanks again
> 
> greg
> 
> 
> Here's how my registry looked like:
> 
> 
> parent="GenericMVCPortlet" application="false">
>   
> Thingieportlet
> 
>   Allows to search thingies using various search criterias.
> 
>   
>   
>hidden="false"/>
>   
>   
>   company
>   company.thingie
> 
> 
> 
> 
> 
> Here's how I modified it following your example:
> 
> 
> 
> type="abstract">
>   
> 
> org.apache.jetspeed.portal.portlets.GenericMVCPortlet e>
> cachedOnName="true" cachedOnValue="true"/>
>   
>   company
> 
> 
> type="ref" parent="JspMVCPortlet">
>   
>   
> Thingie portlet
> Allows to search thingies using various search
> criterias.
>   
> 
> org.apache.jetspeed.portal.portlets.GenericMVCPortlet e>
> hidden="false" cachedOnName="true" cachedOnValue="true"/>
>     hidden="false" cachedOnName="true" cachedOnValue="true"/>
> hidden="false" cachedOnName="true" cachedOnValue="true"/>
>   
>   
>   company.thingie
> 
> 
> 
> 
> -Original Message-
> From: Weaver, Scott [mailto:[EMAIL PROTECTED]
> Sent: mardi 9 septembre 2003 0:14
> To: 'Jetspeed Users List'
> Cc: 'Jetspeed Developers List'
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> 
> Please post a snippet of your registry.  That would help us immensely.
> Some
> quick thoughts:
> 
> 1. In viewtype, Jsp needs to be all caps
> 
>  cachedOnName="true" cachedOnValue="true"/>
> 
> The GenericMVCAction.setTemplate(RunData, String) also works fine for me
> within my JSP portlet action.  I will give you some example reg entries.
> Maybe that will help you in getting started:
> 
> (Excuse the formatting)
> 
> A nice base for JSP portlets using MVC:
> 
> application="false">
>  
>  
>org.apache.jetspeed.portal.portlets.GenericMVCPortlet
>  
> cachedOnName="true" cachedOnValue="true"/>
>  
>  jsp
> 
> 
> 
> 
> 
> And here is an example of its use:
> 
>  parent="JspMVCPortlet" application="false">
>  
>  
>Editable  Free-Form HTML portlet generator
>  Use this this portlet generator to create
>   editable free-form HTML portlets.
>  
>  
>  
>  
>org.apache.jetspeed.portal.portlets.GenericMVCPortlet
>  
>  
> hidden="false" cachedOnName="true" cachedOnValue="true"/>
> 
>   value="portlets.freeform.FreeformPortletAction"
> hidden="false" cachedOnName="true" cachedOnValue="true"/>
> 
>   hidden="false" cachedOnName="true" cachedOnValue="true"/>
> 
> 
> 
>  
>  
> 
> 
> 
> HTH,
> *===*
> * Scott T Weaver    *
> * Jakarta Jetspeed Portal Project   *
> * [EMAIL PROTECTED] *
> *===*
> 
> 
> 
> > -Original Message-
> > From: 

RE: setTemplate using JSPAction (or even GenericMVCPortlet/PortletAction now)

2003-09-09 Thread Gregory Joseph
Hi Scott,

I was really glad to get your mail, but unfortunately it still doesn't work
:/
Below is a copy of my registry, as it was, and as i modified it following
your example. But still no luck.
My action was a subclass of JspPortletAction, I made it a subclass of
GenericMVCAction, but still no luck. It seems like "VelocityActionContext"
thingie is never instanciated as it should for the setTemplate method to
work.
I will file a bug on bugzilla... but in the mean time, is there anything else
I can do or try?

Thanks again

greg


Here's how my registry looked like:



  
Thingieportlet

  Allows to search thingies using various search criterias.

  
  
  
  
  
  company
  company.thingie





Here's how I modified it following your example:




  
 
org.apache.jetspeed.portal.portlets.GenericMVCPortlet
  
  
  company



  
  
Thingie portlet
Allows to search thingies using various search
criterias.
  
 
org.apache.jetspeed.portal.portlets.GenericMVCPortlet
  
  
  
  
  
  company.thingie




-Original Message-
From: Weaver, Scott [mailto:[EMAIL PROTECTED]
Sent: mardi 9 septembre 2003 0:14
To: 'Jetspeed Users List'
Cc: 'Jetspeed Developers List'
Subject: RE: setTemplate using JSPAction (or even
GenericMVCPortlet/PortletAction now)


Please post a snippet of your registry.  That would help us immensely.  Some
quick thoughts:

1. In viewtype, Jsp needs to be all caps



The GenericMVCAction.setTemplate(RunData, String) also works fine for me
within my JSP portlet action.  I will give you some example reg entries.
Maybe that will help you in getting started:

(Excuse the formatting)

A nice base for JSP portlets using MVC:



 
   org.apache.jetspeed.portal.portlets.GenericMVCPortlet
 
 
 
 jsp





And here is an example of its use:


 
 
   Editable  Free-Form HTML portlet generator
 Use this this portlet generator to create
  editable free-form HTML portlets.
 
 
 
 
   org.apache.jetspeed.portal.portlets.GenericMVCPortlet
 
 
 

 

 



 
 



HTH,
*===*
* Scott T Weaver    *
* Jakarta Jetspeed Portal Project   *
* [EMAIL PROTECTED] *
*===*
  


> -Original Message-
> From: Gregory Joseph [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 08, 2003 1:02 PM
> To: Jetspeed Users List
> Cc: [EMAIL PROTECTED]
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> I am now using the GenericMVCPortlet, with an additional parameter in my
> local-portlets.xreg (viewtype=Jsp), but still no success: when i examine
> what
> is going on in the setTemplate method, i see usage of the
> getTemplateContext
> method from the TemplateInfo object of my rundata. If I look in
> templateInfo,
> i can see 3 "tempKeys", namely "VelocityActionContext", "VELOCITY_CONTEXT"
> and "00layout_template00", the 1st one being an instance of
> GenericActionContext, but with no available keys(this is where the
> nullpointerexception is thrown i think), the 2nd being an instance of
> VelocityContext, with a number of keys, but none of them being "template",
> and the last one being a string("/default.jsp")
> 
> I really don't know what to do. I expect I'm not the only one using
> multiple
> views on the same portlet right!?
> 
> Thanks for any help.
> 
> greg
> 
> -Original Message-
> From: Gregory Joseph
> Sent: vendredi 5 septembre 2003 18:28
> To: Jetspeed Users List
> Subject: RE: setTemplate using JSPAction
> 
> 
> Maybe this should be forwarded to the dev-ml.
> Anyway, I included the complete stacktrace below if that can help.
> 
> -Original Message-
> From: Gregory Joseph
> Sent: vendredi 5 septembre 2003 17:52
> To: Jetspeed Users List
> Subject: setTemplate using JSPAction
> 
> 
> Hi list,
> 
> In my action class extending jspAction, i try to use the setTemplate
> method,
> but it doesn't work. I throws a NullPointerException somewhere when trying
> to
> retrieve a "VelocityPortletContext" (how surprising when working with a
> JSPPortlet) Besides, I had to catch this exception myself, otherwise it
> wasn't appearing anywhere in the logs, not even a single error message...
> 
> I found this had been fixed a while ago:
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg07770.html
> Bug when looking on the cvs view, i see there's been some refactoring
> afterwards, so i think the issue might have re-appeared.
> 
> Can someone confirm and/or propose a solution?
> 
> my code simply looks like:
> 
> //.blahblah do s

RE: setTemplate using JSPAction (or even GenericMVCPortlet/Portle tAction now)

2003-09-08 Thread Weaver, Scott
Please post a snippet of your registry.  That would help us immensely.  Some quick 
thoughts:

1. In viewtype, Jsp needs to be all caps



The GenericMVCAction.setTemplate(RunData, String) also works fine for me within my JSP 
portlet action.  I will give you some example reg entries.  Maybe that will help you 
in getting started:

(Excuse the formatting)

A nice base for JSP portlets using MVC:



 
   org.apache.jetspeed.portal.portlets.GenericMVCPortlet
 
 
 
 jsp





And here is an example of its use:


 
 
   Editable  Free-Form HTML portlet generator
 Use this this portlet generator to create
  editable free-form HTML portlets.
 
 
 
 
   org.apache.jetspeed.portal.portlets.GenericMVCPortlet
 
 
 

 

 



 
 



HTH,
*===*
* Scott T Weaver    *
* Jakarta Jetspeed Portal Project   *
* [EMAIL PROTECTED] *
*===*
  


> -Original Message-
> From: Gregory Joseph [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 08, 2003 1:02 PM
> To: Jetspeed Users List
> Cc: [EMAIL PROTECTED]
> Subject: RE: setTemplate using JSPAction (or even
> GenericMVCPortlet/PortletAction now)
> 
> I am now using the GenericMVCPortlet, with an additional parameter in my
> local-portlets.xreg (viewtype=Jsp), but still no success: when i examine
> what
> is going on in the setTemplate method, i see usage of the
> getTemplateContext
> method from the TemplateInfo object of my rundata. If I look in
> templateInfo,
> i can see 3 "tempKeys", namely "VelocityActionContext", "VELOCITY_CONTEXT"
> and "00layout_template00", the 1st one being an instance of
> GenericActionContext, but with no available keys(this is where the
> nullpointerexception is thrown i think), the 2nd being an instance of
> VelocityContext, with a number of keys, but none of them being "template",
> and the last one being a string("/default.jsp")
> 
> I really don't know what to do. I expect I'm not the only one using
> multiple
> views on the same portlet right!?
> 
> Thanks for any help.
> 
> greg
> 
> -Original Message-
> From: Gregory Joseph
> Sent: vendredi 5 septembre 2003 18:28
> To: Jetspeed Users List
> Subject: RE: setTemplate using JSPAction
> 
> 
> Maybe this should be forwarded to the dev-ml.
> Anyway, I included the complete stacktrace below if that can help.
> 
> -Original Message-
> From: Gregory Joseph
> Sent: vendredi 5 septembre 2003 17:52
> To: Jetspeed Users List
> Subject: setTemplate using JSPAction
> 
> 
> Hi list,
> 
> In my action class extending jspAction, i try to use the setTemplate
> method,
> but it doesn't work. I throws a NullPointerException somewhere when trying
> to
> retrieve a "VelocityPortletContext" (how surprising when working with a
> JSPPortlet) Besides, I had to catch this exception myself, otherwise it
> wasn't appearing anywhere in the logs, not even a single error message...
> 
> I found this had been fixed a while ago:
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg07770.html
> Bug when looking on the cvs view, i see there's been some refactoring
> afterwards, so i think the issue might have re-appeared.
> 
> Can someone confirm and/or propose a solution?
> 
> my code simply looks like:
> 
> //.blahblah do stuff
> setTemplate(rundata, "mypage.jsp");
> 
> But then the portlet still displays the original template (the one set in
> the
> xreg file).
> (I also tried without the .jsp extension, but result is exactly the same)
> 
> 
> -
> java.lang.NullPointerException
> at
> org.apache.jetspeed.modules.actions.portlets.PortletAction.getPortlet(Port
> let
> Action.java:208)
> at
> org.apache.jetspeed.modules.actions.portlets.PortletAction.setTemplate(Por
> tle
> tAction.java:169)
> at
> com.company.web.actions.SearchAction.doSearch(SearchAction.java:81)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> pl.
> java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.fireEvent(
> Por
> tletActionEvent.java:215)
> at
> org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.executeEve
> nts
> (PortletActionEvent.java:176)
> at
> org.apa

RE: setTemplate using JSPAction (or even GenericMVCPortlet/PortletAction now)

2003-09-08 Thread Gregory Joseph
I am now using the GenericMVCPortlet, with an additional parameter in my
local-portlets.xreg (viewtype=Jsp), but still no success: when i examine what
is going on in the setTemplate method, i see usage of the getTemplateContext
method from the TemplateInfo object of my rundata. If I look in templateInfo,
i can see 3 "tempKeys", namely "VelocityActionContext", "VELOCITY_CONTEXT"
and "00layout_template00", the 1st one being an instance of
GenericActionContext, but with no available keys(this is where the
nullpointerexception is thrown i think), the 2nd being an instance of
VelocityContext, with a number of keys, but none of them being "template",
and the last one being a string("/default.jsp")

I really don't know what to do. I expect I'm not the only one using multiple
views on the same portlet right!?

Thanks for any help.

greg

-Original Message-
From: Gregory Joseph 
Sent: vendredi 5 septembre 2003 18:28
To: Jetspeed Users List
Subject: RE: setTemplate using JSPAction


Maybe this should be forwarded to the dev-ml. 
Anyway, I included the complete stacktrace below if that can help.

-Original Message-
From: Gregory Joseph 
Sent: vendredi 5 septembre 2003 17:52
To: Jetspeed Users List
Subject: setTemplate using JSPAction


Hi list,

In my action class extending jspAction, i try to use the setTemplate method,
but it doesn't work. I throws a NullPointerException somewhere when trying to
retrieve a "VelocityPortletContext" (how surprising when working with a
JSPPortlet) Besides, I had to catch this exception myself, otherwise it
wasn't appearing anywhere in the logs, not even a single error message...

I found this had been fixed a while ago:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg07770.html
Bug when looking on the cvs view, i see there's been some refactoring
afterwards, so i think the issue might have re-appeared.

Can someone confirm and/or propose a solution?

my code simply looks like:

//.blahblah do stuff
setTemplate(rundata, "mypage.jsp");

But then the portlet still displays the original template (the one set in the
xreg file).
(I also tried without the .jsp extension, but result is exactly the same)


-
java.lang.NullPointerException
at
org.apache.jetspeed.modules.actions.portlets.PortletAction.getPortlet(Portlet
Action.java:208)
at
org.apache.jetspeed.modules.actions.portlets.PortletAction.setTemplate(Portle
tAction.java:169)
at
com.company.web.actions.SearchAction.doSearch(SearchAction.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.fireEvent(Por
tletActionEvent.java:215)
at
org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.executeEvents
(PortletActionEvent.java:176)
at
org.apache.jetspeed.modules.actions.portlets.GenericMVCAction.perform(Generic
MVCAction.java:148)
at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
at org.apache.turbine.modules.Page.build(Page.java:90)
at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
at org.apache.turbine.Turbine.doGet(Turbine.java:563)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalin

RE: setTemplate using JSPAction

2003-09-05 Thread Gregory Joseph
Maybe this should be forwarded to the dev-ml. 
Anyway, I included the complete stacktrace below if that can help.

-Original Message-
From: Gregory Joseph 
Sent: vendredi 5 septembre 2003 17:52
To: Jetspeed Users List
Subject: setTemplate using JSPAction


Hi list,

In my action class extending jspAction, i try to use the setTemplate method,
but it doesn't work. I throws a NullPointerException somewhere when trying to
retrieve a "VelocityPortletContext" (how surprising when working with a
JSPPortlet) Besides, I had to catch this exception myself, otherwise it
wasn't appearing anywhere in the logs, not even a single error message...

I found this had been fixed a while ago:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg07770.html
Bug when looking on the cvs view, i see there's been some refactoring
afterwards, so i think the issue might have re-appeared.

Can someone confirm and/or propose a solution?

my code simply looks like:

//.blahblah do stuff
setTemplate(rundata, "mypage.jsp");

But then the portlet still displays the original template (the one set in the
xreg file).
(I also tried without the .jsp extension, but result is exactly the same)


-
java.lang.NullPointerException
at
org.apache.jetspeed.modules.actions.portlets.PortletAction.getPortlet(Portlet
Action.java:208)
at
org.apache.jetspeed.modules.actions.portlets.PortletAction.setTemplate(Portle
tAction.java:169)
at
com.company.web.actions.SearchAction.doSearch(SearchAction.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.fireEvent(Por
tletActionEvent.java:215)
at
org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.executeEvents
(PortletActionEvent.java:176)
at
org.apache.jetspeed.modules.actions.portlets.GenericMVCAction.perform(Generic
MVCAction.java:148)
at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
at org.apache.turbine.modules.Page.build(Page.java:90)
at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
at org.apache.turbine.Turbine.doGet(Turbine.java:563)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invoke
Next(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11C

setTemplate using JSPAction

2003-09-05 Thread Gregory Joseph
Hi list,

In my action class extending jspAction, i try to use the setTemplate method,
but it doesn't work. I throws a NullPointerException somewhere when trying to
retrieve a "VelocityPortletContext" (how surprising when working with a
JSPPortlet) Besides, I had to catch this exception myself, otherwise it
wasn't appearing anywhere in the logs, not even a single error message...

I found this had been fixed a while ago:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg07770.html
Bug when looking on the cvs view, i see there's been some refactoring
afterwards, so i think the issue might have re-appeared.

Can someone confirm and/or propose a solution?

my code simply looks like:

//.blahblah do stuff
setTemplate(rundata, "mypage.jsp");

But then the portlet still displays the original template (the one set in the
xreg file).
(I also tried without the .jsp extension, but result is exactly the same)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



setTemplate using JSPAction

2003-03-12 Thread Yong Bing Khoo
Hi,

While waiting for the next stable release of Jetspeed, I have gotten an 
alternative method that works by using the include tag within JSP page and 
setting the actual page to include via the servlet associated with the page. 
For instance,

In mypage.jsp:

<%
 try {
   template = (String) request.getAttribute("template");
 ...
%>
 ...
   
 ...
In the associated servlet action class:

 private final static String TEMPLATE = "template";
 ...
 rundata.getRequest().setAttribute(TEMPLATE, 
portlet.getPortletConfig().getInitParameter("my-next-template");



Finally, in your portlet registry:
 ...
   
regards,
yb

If you're using Jetspeed 1.4b4-dev check out from CVS today, then it should 
work. I just checked in a fix to make setTemplate work in JspPortlet 
yesterday.

Best regards,

Mark Orciuch - [EMAIL PROTECTED]
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

-Original Message-
From: Damle, Nikhil [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 1:04 PM
To: 'Jetspeed Users List'
Subject: setTemplate using JSPAction
Hi,

When I use the setTemplate method, ( ex. setTemplate(rundata,
"somefile.jsp") ), under what folder should this "somefile.jsp"
file reside.
Seems like jetspeed is not able to find this file. I have it under the
templates/jsp/portlets/html folder.
Thanks

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




_
MSN Instant Messenger now available on Australian mobile phones. Go to  
http://ninemsn.com.au/mobilecentral/hotmail_messenger.asp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: setTemplate using JSPAction

2003-01-30 Thread Damle, Nikhil
It worked ! 

I will test it further but at the moment the same portlet that had never
redirected to the next template, actually redirected correctly and showed
the desired results.

Thanks.

-Original Message-
From: Mark Orciuch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 8:49 PM
To: Jetspeed Users List
Subject: RE: setTemplate using JSPAction


If you're using Jetspeed 1.4b4-dev check out from CVS today, then it should
work. I just checked in a fix to make setTemplate work in JspPortlet
yesterday.

Best regards,

Mark Orciuch - [EMAIL PROTECTED]
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

> -Original Message-
> From: Damle, Nikhil [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 28, 2003 1:04 PM
> To: 'Jetspeed Users List'
> Subject: setTemplate using JSPAction
>
>
> Hi,
>
> When I use the setTemplate method, ( ex. setTemplate(rundata,
> "somefile.jsp") ), under what folder should this "somefile.jsp"
> file reside.
> Seems like jetspeed is not able to find this file. I have it under the
> templates/jsp/portlets/html folder.
>
> Thanks
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: setTemplate using JSPAction

2003-01-29 Thread Mark Orciuch
If you're using Jetspeed 1.4b4-dev check out from CVS today, then it should
work. I just checked in a fix to make setTemplate work in JspPortlet
yesterday.

Best regards,

Mark Orciuch - [EMAIL PROTECTED]
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

> -Original Message-
> From: Damle, Nikhil [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 28, 2003 1:04 PM
> To: 'Jetspeed Users List'
> Subject: setTemplate using JSPAction
>
>
> Hi,
>
> When I use the setTemplate method, ( ex. setTemplate(rundata,
> "somefile.jsp") ), under what folder should this "somefile.jsp"
> file reside.
> Seems like jetspeed is not able to find this file. I have it under the
> templates/jsp/portlets/html folder.
>
> Thanks
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




setTemplate using JSPAction

2003-01-28 Thread Damle, Nikhil
Hi,

When I use the setTemplate method, ( ex. setTemplate(rundata,
"somefile.jsp") ), under what folder should this "somefile.jsp" file reside.
Seems like jetspeed is not able to find this file. I have it under the
templates/jsp/portlets/html folder. 

Thanks


--
To unsubscribe, e-mail:   
For additional commands, e-mail: