Hi Denis, that's a similiar problem I had (and partly still have): to render a component based on current application data.
The suggested solution was to either - use the "if" - component to include the rendering of a component based on a test-condition. The test-condition is an application property and will be evaluated when the page/component is constructed for a response. That might be a good solution when there are not too many things to show/hide. - use "block" returns from the application. I was until now not able to do that since I did not yet find a way to instantiate a "Block" containing an arbitrary component and return it to a Block-Element in the tml. If you find a good way, please let me know. Regards, Udo. -------- Original-Nachricht -------- > Datum: Mon, 30 Jun 2008 09:43:56 +0100 > Von: "Denis McCarthy" <[EMAIL PROTECTED]> > An: "Tapestry users" <users@tapestry.apache.org> > Betreff: Creating new components on the fly in T5 using AJAX/JSON > Hi, > I'm working on a somewhat complex page at the moment. This page > consists of several input boxes that users > fill in. I've got various onblur AJAX mixins that fire on this page > when fields are filled in by a user. Currently, based > on the values that users put into these text boxes, other text boxes > and drop down select lists are either shown > or hidden (this is done by passing simple JSON back to the page in the > AJAX response to these blur events) > > Ideally, I'd like not to have these optional fields just hidden, but > instead for the optional field to be entirely absent > from the html markup when it's not needed, and only present when data > entered by the user in a different field > mandates it. Is this possible in T5? I don't think it is (because I > think that a field needs to be present in the tml > at page load time for the component in question to be bound to the T5 > page class), but it would be great if > it was, as it would make the page considerably lighter size wise for > most of my users. > Thanks > Denis > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]