You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Carlos M. S. Bento Nogueira" <cm...@student.dei.uc.pt> on 2005/07/18 19:33:13 UTC

[cforms]trouble changing fd:selection-list value

Hello cocoon users :)

I'm trying to set a value on selection-list with radio buttons.
The value change is being triggered by a on-value change event
, therefore after the execution of showform.
Here is a listing of my failed attemps:

Attempt 1
var grupo_sanguineo = event.source.parent.lookupWidget("grupo_sanguineo");
grupo_sanguineo.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
grupo_sanguineo.setValue(new java.lang.String(tempUser.getGruposanguineo()));

Attempt 2(throws a java.lang.reflect.InvocationTargetException)
var grupo_sanguineo = event.source.parent.lookupWidget("grupo_sanguineo");
grupo_sanguineo.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
grupo_sanguineo.setValue(tempUser.getGruposanguineo());


Sucessfull attemp
var grupo_sanguineo = event.source.parent.lookupWidget("grupo_sanguineo");
grupo_sanguineo.setState(Packages.org.apache.cocoon.forms.formmodel.Widget.ACTIVE);
grupo_sanguineo.setValue("A");

Also works without the setState condition.
I've checked the value from tempUser.getGruposanguineo() with new 
java.lang.System.out.println and it displays "A".


Mailling list thread i read to support these attemps:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=106967035915860&w=2
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=106978543406502&w=2
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=109114437401403&w=2


TIA,
CarlosN



------------------------------------------------------------------------------------

http://wiki.apache.org/cocoon/CformsRadioButtonsFormatting
------------------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org