Hello

I am trying to use Wicket portlets in Liferay (v 5.2.3). The results
are promising, however I have stumbled upon the following problem.
Could someone help me or comment on it, please?

My problem:

I have a form with AjaxButton to submit it. The form consists of
nothing else but a TextField and a Label. When the AjaxButton is
clicked the form is submitted and refreshed and the entered text is
simply echoed in the Label.

The problem occurs when I submit the form more than once. While the
first submit always echoes the entered text correctly, subsequent
submits always echo the text entered the first time. Having debugged
the portlet, I found that the callback URL generated for the buttons
"onclick" handler contains some parameters, which takesthe form of
<portlet_namespace><parameter>.

Specifically the callback url contains also
<raw>
_wexample_WAR_wexampleportlet_requiredBorder:myText=qqq
</raw>
, where <raw>_wexample_WAR_wexampleportlet_</raw> is the portlet
namespace and <raw>requiredBorder:myText</raw> is the TextField in the
form. However, upon submitting the form, the AJAX request also POST's
a <raw>requiredBorder:myText</raw> as post data separately. I noticed
that the parameter in the callback URL always takes the value from the
first submit and it always overrides the POST parameter. (It happens
when Liferay constructs NamespaceServletRequest.)

Has anyone else encountered the same problem? Is there a workaround or
may I be doing something wrong?

The problem only happens when using this portlet in Liferay 5.2.3
(also tried the 5.2.x branch) with its "internal" portlet container.
If I configure Liferay to use the "sun" portlet container then this
issue is not present.

Thanks for any help in advance.

Richie.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to