• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

passing value using Namespace from JSP to Portlet's processAction method?

 
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Educate me Ranchar!!!
I was reading "Portlet Programming" by Cameron McKenzie !!!
So far very good book! but I got confuse with his example

Book explaining about using
<portlet:namespace/> before any value from JSP
eg-->
<input name="<portlet:namespace/>addSubmit" type="SUBMIT" value=" Add "></input>

and
when that field is retriving into portlet use
String addAction = request.getParameter(response.getNamespace()+"addSubmitt");

I am using processAction where I want to process it! but ActionResponse class don't have getNamespace()method and it won't compile!

how to link back to the portal makes sense so does using Action Process but combining won't! So I am getting confuse

Any work around ?
Thanks

Aaron Raja
[ November 05, 2007: Message edited by: Aaron Raja ]
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<portlet:namespace/> tag is used to uniquely identify each from element with-in a portlet. This is specially useful when we have more than one portlet in the applicaton. The Portal Best Pracitices suggest the mandatory use of this tag but this can be voilated when really not required.

In your case, you can just use :
 
Amarender Reddy
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys!!

I beg my pardon!
It was :



cheers
 
Aaron Raja
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Amarender!
I need to make these data coming from form unique because we have lot of portlets!
I need both, best of the both world! Unique record coming from form and need to use processAction to process multiple action senerios too!!!
Work around or alternative approach? Anything to make it work?

Aaron Raja
[ November 06, 2007: Message edited by: Aaron Raja ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic