Currently i am working on an application which uses Jetspeed Portal. In My portal there are certain tabs and which contains few portlets. Some of these portlets contain Form ...which on submitting reloads the page ..but this time few of the portlets are not displayed throwing exception
Sometimes other portlets independent of that form portlet also vanishes showing similar message.
I am using :-
jdk 1.5 Tomcat 5.5 jetSpeed 2.0 Postgres 8.1 and Myfaces components since the user interface is developed using the Java server Faces .
Can any one please tell me what could be the problem ? .... how i can fix it ?
Thanks Omkar !
Thanks and Regards
Omkar Patkar (SCJP 1.4)[url]http://javacollectionsnotes.blogspot.com[/url] | [url]http://omkar-myscjpexp.blogspot.com[/url]
How are you re-rendering the portal? How are you generating the link back to the portal?
This is how you should be doing it:
response.createRenderURL();//link back to the portlet response.createActionURL();//triggers action phase
And this is why:
When a user clicks submit on a form, there must be an object sitting on the server that is ready to process the user�s request. With typical Servlet/JSP applications, form submissions are forwarded to a Servlet, and the name of the Servlet is specified as the action of the form; However, we can�t do that with a portlet. For example, if our number guessing application was implemented as a Servlet, there would be an HttpServlet, perhaps named NumberGuessServlet, that would respond to the submission of the form and extract the users input. The Servlet would constitute the �action� of the form, and the form tag would look like this:
But a portlet can�t make a direct call back to itself that easily The best a portlet could do is make a call back to the page the portlet is displayed on, but even that�s impossible to configure in an html form, because at development time, we don�t know which page, or on how many pages, our portlet will appear.
I have some tutorials on my website that deal with proper portlet development techniques. Feel free to check them out: