cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: fd:selection-list selected item
Date Mon, 25 Apr 2005 09:39:22 GMT
Arsen A. Gutsal wrote:
> It does not work for me.
> I'm using cocoon-2.1.6, that's why I guess.
> Anyway - I've set widget value (in the template), and it works fine, 
> except that <select> widget does not displays selected value.
> <jx:if test="${cocoon.request.getParameter('user-type')}">
> ${form.lookupWidget('registration_type').setValue(cocoon.request.getParameter('user-type'))}
> </jx:if>
> 
> Any suggestions?

It's NOT the concern of the presentation layer to set the values of a wdiget. 
IMHO this is an absolute DON'T as it introduces side-effects (presentationlayer 
changes the data model). Try to set the widget value using the controller. I 
guess this will solve your problem.

Also make sure that the set value is equal to the key of the item of the 
selection list.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------


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


Mime
View raw message