-
1. Re: I can't get the parameter <form> in my portlet
antoine_h Oct 18, 2007 2:03 PM (in response to remi_dong)Hi,
That is strange. I can't detect something wrong in the code.
You may look at the jsp of the portal (user portlet jsp, samples...) as some example.
such as :<form method="post" action="<portlet:actionURL> <portlet:param name="op" value="<%= CMSAdminConstants.OP_DOSEARCH %>"/> </portlet:actionURL>"> <input type="text" size="15" maxlength="80" name="search" class="portlet-form-input-field"/> <input type="submit" name="search" value="${n:i18n("CMS_SEARCH")}" class="portlet-form-button"/> </form>
The url is not hard coded but built with the portal url factory.
this may be necessary...
do you get the "act" parameter that is in the url ? or not ?
oups... I've just got it : the parameters of the url are available in the request of the action method of the portlet.
not the doView (render method).
you have to get them in the action method, and then, if you want to get some info about that in the render method (doView), you must do someresponse.setRenderParameter(myRenderParamName, myRenderParamValue)
This way, the myRenderParamName is put in the request instance in the doView method.
look also at the portlet specification JSR-168 for all this... -
2. Re: I can't get the parameter <form> in my portlet
remi_dong Oct 19, 2007 4:49 AM (in response to remi_dong)Yes that is strange,
because this code is run in Jboss Portal 2.0, i can get the parameter in doView() and in processeAction(). I think the problem is Jboss Portlet 2.6 block some method ex: POST.
************************************************************
action="/portal/default/userDisplay/userDisplayWindow?action=2&act=1"
************************************************************
in the url, i hava a parameter "act", this parameter i can get in my portlet, but all the parameter like "input name="uname"" i can't :( -
3. Re: I can't get the parameter <form> in my portlet
theute Oct 19, 2007 4:57 AM (in response to remi_dong)As Antoine said, you should *really* read the JSR 168 spec.
And as he said:
1) You shouldn't create the URL yourself
2) Your action parameter will be only available in the action phase, if you need them in your render phase you need to pass them along as he wrote -
4. Re: I can't get the parameter <form> in my portlet
remi_dong Oct 19, 2007 6:30 AM (in response to remi_dong)Thanks...