You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by liigo <li...@hotpop.com> on 2005/05/07 13:03:40 UTC
about and , they just do the same(or very similar) thing
please look on <set> and <binding>, they just do the same(or very similar)
thing,
why not use the same keywork <set>?
<bean name="passwordValidator"
class="org.apache.tapestry.valid.StringValidator">
<set name="minLength" value="6"/>
<set name="maxLength" value="12"/>
</bean>
<component id="password" type="TextField">
<binding name="value" value="ognl:user.password"/>
<binding name="label" value="Password"/>
</component>
if all use <set>, we can write this:
<component id="password" type="TextField">
<SET name="value" value="ognl:user.password"/>
<SET name="label" value="Password"/>
</component>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: about and , they just do the same(or very similar) thing
Posted by Howard Lewis Ship <hl...@gmail.com>.
<binding> creates a binding object (an instance of IBinding) that
knows about the page (*) and can read/update OGNL expression rooted in
the page. The binding is passed into the component so that it can
gain access to properties of the page. The <set> element is more
traidtional, a value is obtained and injected in (set and forget).
Parameters and bindings are bi-directional, the component can (via the
binding) change the properties of the page.
(*) I use the term page for clarity, it's really the container of the
component which is often a page, but nearly as often, another
component.
On 5/7/05, Michael Echerer <Mi...@tngtech.com> wrote:
> liigo wrote:
> > please look on <set> and <binding>, they just do the same(or very similar)
> > thing,
> > why not use the same keywork <set>?
> >
> Internally "binding" is much more than just setting a property. A
> static-binding is more comparable to set. Anyhow this can be confusing
> in the beginning (especially the directions).
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: about and , they just do the same(or very similar)
thing
Posted by Michael Echerer <Mi...@tngtech.com>.
liigo wrote:
> please look on <set> and <binding>, they just do the same(or very similar)
> thing,
> why not use the same keywork <set>?
>
Internally "binding" is much more than just setting a property. A
static-binding is more comparable to set. Anyhow this can be confusing
in the beginning (especially the directions).
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org