You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2011/09/20 18:44:09 UTC
[jira] [Resolved] (WICKET-4069) Wickettester: submit select via
AJAX
[ https://issues.apache.org/jira/browse/WICKET-4069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-4069.
-----------------------------------
Resolution: Duplicate
Fix Version/s: 1.5.1
Assignee: Igor Vaynberg
> Wickettester: submit select via AJAX
> ------------------------------------
>
> Key: WICKET-4069
> URL: https://issues.apache.org/jira/browse/WICKET-4069
> Project: Wicket
> Issue Type: Task
> Components: wicket, wicket-extensions
> Affects Versions: 1.4.18
> Reporter: Alexander Elsholz
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.5.1
>
>
> Wickettester always submits the value of a formcomponent.
> see: BaseWickettTester:1459
> Its not possible to override this behavior.
> Selectcomponent (wicket extension) for example expects the optionpath(s) to convert the browser input to modelvalue. The value (modelvalue) doesnt match this so unittests crash at Select:132 with IndexOutOfBoundException
> please let developers override the "getValueBehavior" depending on the formcomponent:
> ...
> String name = formComponent.getInputName();
> //String value = formComponent.getValue();
> String value = getRequestParameterValueForComponent(formComponent);
> ...
> protected String getRequestParameterValueForComponent(FormComponent<?> formComponent){
> return formComponent.getValue();
> }
> so developers can overide the method to support individual components:
> protected String getRequestParameterValueForComponent(FormComponent<?> formComponent){
> if (formComponent instanceof xxxx){
> return something;;
> }
> else{
> return super.getRequestParameterValueForComponent(formComponent);
> }
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira