aldana schrieb:
Yeah, that's what I did (just in template style -> did not embed this in
Page-class but in .tml artifact).
But for interest: If activation-context is possible, how do I pass this
activation context through my URL? Doing a simple concat to the Page
(index/myComponent/paramForComponent) would not work, because Index page
would take the 'myComponent' as activation-context parameter itself.
Does it make sense to adress a component directly per URL? At the moment
I can't think of a good reason to do so.
Tapestry does that internally. For example take a look at the generated
submission url for a form component. That url adresses the form
component directly. But I don't know why I should do so...
Or is this requirement a bad pattern anway (components should only be
accessed directly through its Page parent)?
Andy Pahne-6 wrote:
I think what you want is absolutly possible.
First: components can work with activation contexts. They don't behave
any differnet from pages with regards to activation.
Second: wouldn't it be a solution, if your page(s) take the activation
context and those pages pass the context down to inherited components?
Like:
public class SomeClass{
@Property
private long someID;
@Component(parameters={ "someID=prop:someID" })
private SomeComponent someComponent;
public void onActivate(long someID){
this.someID = someID
}
}
Haven't tested it, but it should work that way...
Andy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]