You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org> on 2012/03/19 16:02:38 UTC

[jira] [Resolved] (WICKET-4100) When using Wicket in a portlet, CheckGroup loses it`s value when some field is in error

     [ https://issues.apache.org/jira/browse/WICKET-4100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4100.
-------------------------------------

    Resolution: Won't Fix

Portlets are no more supported in Wicket core.

Feel free to contribute to https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/portlet-parent
                
> When using Wicket in a portlet, CheckGroup loses it`s value when some field is in error
> ---------------------------------------------------------------------------------------
>
>                 Key: WICKET-4100
>                 URL: https://issues.apache.org/jira/browse/WICKET-4100
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-portlet
>    Affects Versions: 1.4.18
>         Environment: Liferay 6.0.5 and Liferay 6.0.6 bundled with Tomcat
>            Reporter: Robson Miranda
>              Labels: portlet, wicket
>         Attachments: checkgroup-portlet.zip
>
>
> Since in Liferay we can configure the portlets to redirect to view after an action request, and, differently from a standard web application, the page is generated during the response phase, when a component have some validation error in a form, the CheckGroups that are part of this form loose it's values.
> This is due to the fact that Check component, in it's onComponentTag() method, uses getInputAsArray(), which get the request parameters. However, during the render phase, the request parameters are lost when the portlet redirects to view after processing an action.
> This problem manifests also when using an FileUploadField in the form, independently of the redirect-after-post configuration.
> To workaround, I changed the onComponentTag of the Check component to use CheckGroup's getRawInput() instead of getInputAsArray, since the rawInput is also serialized with the component:
> if (group.hasRawInput())
> 		{
> 			String[] input;
> 			if (group.getRawInput() != null)
> 				input = group.getRawInput().split(FormComponent.VALUE_SEPARATOR);
> 			else
> 				input = new String[0];
> I do not know if this is the correct workaround, but, using this way, solved the problem for me.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira