struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: validation checkboxlist
Date Thu, 04 Jan 2018 12:30:49 GMT
2018-01-04 13:24 GMT+01:00 José Antonio Delgado Trujillo <jadtmat@gmail.com>:
> In the docs about model driven
> https://struts.apache.org/core-developers/model-driven.html <https://struts.apache.org/core-developers/model-driven.html>
>
> It is said that you must to implement the MovelDriven interface just the method getModel()
to give an Object in which Struts populate with the parameters request and placed on the top.

When using the ModelDriven interface, your top object on a stack will
be the Object, not an Action, so:
- with ModelDriven: <s:checkboxlist key=levels/> => person.levels (if
getModel() returns Person)
- without ModelDriven: <s:checkboxlist key=levels/> => levels (ia
property on an action level)

All OGNL expressions/tags are searching stack from the op to the
bottom, the top most object on the stack is always an action but
ModelDriven changes that, and a Model is the top most object on the
stack.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message