I did some more experimenting and ended up using a Border component. However,
how do I set the value of something that is in a border? I tried treating it
like any other component eg:
((Border) getBorder()).setSearchText(getSearchText())
but it didn't work. I think the Border component is treate
See, it's two different instances of the same component. What you are
looking for is something almost akin to a static field.
The "request scope" variable is tempting in this specific use case, but
troubling in most others. It brings with it all the ugliness of naming
coincidences and such from t
Karthik, i'll try the methods below too.
I guess what i'm trying to understand is the equivalent of a JSP
RequestScope. To me, the component should just "remember" it's value between
pages (and not session scope), but i'm still unclear.
Also in my app below, i don't think the component is really
glad it worked.
i think one of the powers of tapestry is the ability to be able to tap into
lifecycle methods, as also register listeners (like pageBeginRender)
i don't have exact answers to your question "but is this optimal?" - it
depends on what you want to do. if you want your component to
Karthik.Nar,
I made the change below to Result.java. It seems to work, but is this
optimal? Is there a way for the component to automatically find out it's
"parent page" to bind the value without using a "double" bucket brigade
and/or without using component injection. I'm new to Tapestry still,
you are setting the searchText on the Result page and not on the
SearchComponent in the result page.
since you have the searchText on the Result page you need to now "transfer"
it to the SearchComponent in the result page.
you can consider setting the searchText of the SearchComponent in the
pag
I have 2 pages. A Home.html and a Result.html.
I have 1 component (SearchComponent) which is to be SHARED across both
pages. The component is a simple textfield.
When submitting a value in the first page, it then goes to the result page.
However the component don't remember it's value the first t