I guess I wasn't clear. The question is if a parameter's expression binding
pulls an Object from a Page and the component using the parameter changes
the value of the binding using setObject(), does the new value get pushed
back into the page at any point?
----- Original Message -----
From: <hlship@attbi.com>
To: "Tapestry development" <tapestry-dev@jakarta.apache.org>
Sent: Monday, June 09, 2003 4:16 PM
Subject: Re: Custom Bindings
> direction "in":
>
> Tapestry updates the parameter property (default: property "foo" for
> parameter "foo") just before rendering the component.
>
> direction "form":
>
> Like "in", but after rendering the component, if the form containing the
> component is rendering, then the parameter property is read and the
binding
> value updated.
>
> direction "auto":
>
> getFoo() invokes fooBinding.getValue() and setFoo() invokes
fooBinding.setValue
> ().
>
> direction "custom":
>
> There is no foo property. You can create one if you want, but Tapestry
> doesn't check for it or do anything with it.
>
>
> --
> hlship@attbi.com
>
> Creator, Tapestry: Java Web
> Components
> http://jakarta.apache.org/tapestry
> > I've gone around in circles on this one and now I have totally confused
> > myself.
> >
> > The docs are unclear on the following: is it true that modifying the
value
> > of a (non static) binding will result in the new value being pushed back
to
> > the property it originally came from?
> >
> > In other words are parameters with direction 'custom' like in/out
> > parameters?
> >
> >
> > Crude example follows:
> >
> > Geoff
> >
> >
> >
> > class MyPage extends BasePage {
> >
> > private Object theStuff = null;
> >
> > public Object getTheStuff() {
> > return theStuff;
> > }
> >
> > public void setTheStuff(Object stuff){
> > theStuff = stuff;
> > }
> >
> > }
> >
> > MyPage.page
> >
> > <component id="mycomp" type="MyComponent>
> > <expression-binding name="theStuff" expression="theStuff"/>
> > </component>
> >
> >
> > class MyComponent extends BaseComponent {
> >
> > private IBinding theStuffBinding;
> >
> > public void setStuffBinding(IBinding binding); // impl omitted
> > public IBinding getStuffBinding() // imple omitted
> >
> > public void formSubmitted(IRequestCycle cycle) {
>
> > tuffBinding.setObject("Dog");
> >
> > // does doing the above update the theStuff property (to value Dog)
in
> > MyPage?
> >
> > }
> >
> > }
> >
> > MyComponent.jwc
> >
> > <parameter
> > name="stuff"
> > java-type="java.lang.Object"
> > direction="custom"
> > required="yes"
> > >
> >
> > plus form crap..
> >
> >
> >
> >
> >
> > Geoffrey Longman
> > Intelligent Works Inc.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
|