Hi,i'm currently writing my first component, which should work like this one : http://wiki.apache.org/tapestry/Tapestry5HowToCreateASimpleGraphComponent
Everything works fine so far, but:I have to pass some complex data structures (encapsulated in objects) to the component,
doing so: In the page template: <t:myComp context="myDataStructure" /> In the components beginRender method: void beginRender(MarkupWriter writer) { Link lnk = resources.createEventLink(EVENT_NAME, context);// should render this: <embed type="image/svg+xml" src="..." width="280"height="280">
writer.element("embed", "type", "image/svg+xml", "width", width, "height", height, "src", lnk); resources.renderInformalParameters(writer); } And at least, the corresponding action: public StreamResponse onRenderGraph(Object... params) { // the params object now should be the passed myDataStructure //... rendering stuff } This works fine so far, but some things are too unclear to me: the generated eventlink looks horrible:"/somepage.component.action/org.localhost.something.package.MyStructure $12345"
Is there a way to use a custom ValueEncode to generate a better url? I do not want to provide my package structure to the client ;) And, more important to me is to know something about the lifecycles. How long and "where" life these "passed objects"? Thanks, Stefan
smime.p7s
Description: S/MIME cryptographic signature