tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Longman" <glong...@intelligentworks.com>
Subject Custom Bindings
Date Mon, 09 Jun 2003 20:02:20 GMT
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.



Mime
View raw message