Re: Forcing all @If to evaluate to True on Form Submit
Perhaps we could be more helpful if you told us what the general purpose of your logic is? (ie does it have to do with validation?) On 8/4/06, Karthik N [EMAIL PROTECTED] wrote: I have a rather bizzare requirement (I think) My Form has 3 or 4 @If components. At any point only one of the @If is True, all others are false. But, for a particular Submit button I want all the @If to force-evaluate to True on the Rewind. One ugly way is to actually change the HTML using javascript so that all the @Ifs have 'True' set in their values. But is there a more elegant way? If not, I guess I'll have to write my own custom component. Thanks, Karthik -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
RE: Forcing all @If to evaluate to True on Form Submit
Javascript runs on the client browser, the @If is evaluated on the server What are you trying to accomplish ?!?!?!?!? -Original Message- From: Karthik N [mailto:[EMAIL PROTECTED] Sent: Freitag, 4. August 2006 14:45 To: Tapestry users Subject: Forcing all @If to evaluate to True on Form Submit I have a rather bizzare requirement (I think) My Form has 3 or 4 @If components. At any point only one of the @If is True, all others are false. But, for a particular Submit button I want all the @If to force-evaluate to True on the Rewind. One ugly way is to actually change the HTML using javascript so that all the @Ifs have 'True' set in their values. But is there a more elegant way? If not, I guess I'll have to write my own custom component. Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forcing all @If to evaluate to True on Form Submit
Bear with me it's a long description I want to use Dojo's TabContainer. But I want to implement lazy tab loading. by that I mean that all contents of all tabs will not be loaded. Here is the approach I follow: 1) I have two forms. The first Form encompasses the TabContainer and has a Submit button to save all details for all tabs 2) The Second Form has one AjaxSubmit button, for each Tab. The responsibility of the Ajax submit button is to update the Tab it corresponds to in Form 1. Hence the updateComponents of each AjaxSubmit button corresponds to each div tag for each Tab. Of course I make all this invisible so the user doesn't see it. 3) I use dojo's event system to intercept tab.show and fire off an ajax submit via a javascript click on the corresponding AjaxSubmit button for Form 2. Tacos updateComponents takes care of partial refresh of only that Tab. 4) Why do I have two forms? I want to avoid the Rewind cycle for Form 1. So a Form 2 submit will not cause Form 1 data to rewind. That way dirty Form 1 Data will not make its way to the server. 5) Why do I need @If - I use an @If to stifle the render - so if I am refreshing Tab 3, the @If for Tab 1, Tab 2 etc. will be False. That way I make the render also lazy, or rather selective 6) Why do I need all @If to be true finally? When I submit Form 1, I want the complete Rewind Cycle to kick in for the entire Form, so that all properties are set On 8/4/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Perhaps we could be more helpful if you told us what the general purpose of your logic is? (ie does it have to do with validation?) On 8/4/06, Karthik N [EMAIL PROTECTED] wrote: I have a rather bizzare requirement (I think) My Form has 3 or 4 @If components. At any point only one of the @If is True, all others are false. But, for a particular Submit button I want all the @If to force-evaluate to True on the Rewind. One ugly way is to actually change the HTML using javascript so that all the @Ifs have 'True' set in their values. But is there a more elegant way? If not, I guess I'll have to write my own custom component. Thanks, Karthik -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. -- Thanks, Karthik
Re: Forcing all @If to evaluate to True on Form Submit
Yes I meant changing the values of the hidden @If from 'F' to 'T' - rather ugly. On 8/4/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I'm sure he meant changing the hidden form input fields that control @If in javascript ;) On 8/4/06, Detlef Schulze [EMAIL PROTECTED] wrote: Javascript runs on the client browser, the @If is evaluated on the server What are you trying to accomplish ?!?!?!?!? -Original Message- From: Karthik N [mailto:[EMAIL PROTECTED] Sent: Freitag, 4. August 2006 14:45 To: Tapestry users Subject: Forcing all @If to evaluate to True on Form Submit I have a rather bizzare requirement (I think) My Form has 3 or 4 @If components. At any point only one of the @If is True, all others are false. But, for a particular Submit button I want all the @If to force-evaluate to True on the Rewind. One ugly way is to actually change the HTML using javascript so that all the @Ifs have 'True' set in their values. But is there a more elegant way? If not, I guess I'll have to write my own custom component. Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. -- Thanks, Karthik
Re: Forcing all @If to evaluate to True on Form Submit
But still more efficient than TRUE/FALSE for rendering. They aren't typically (hidden input fields) meant to be human friendly so I appreciate the length of statements. (Esp as there are sometimes a great number of them) On 8/4/06, Karthik N [EMAIL PROTECTED] wrote: Yes I meant changing the values of the hidden @If from 'F' to 'T' - rather ugly. On 8/4/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I'm sure he meant changing the hidden form input fields that control @If in javascript ;) On 8/4/06, Detlef Schulze [EMAIL PROTECTED] wrote: Javascript runs on the client browser, the @If is evaluated on the server What are you trying to accomplish ?!?!?!?!? -Original Message- From: Karthik N [mailto:[EMAIL PROTECTED] Sent: Freitag, 4. August 2006 14:45 To: Tapestry users Subject: Forcing all @If to evaluate to True on Form Submit I have a rather bizzare requirement (I think) My Form has 3 or 4 @If components. At any point only one of the @If is True, all others are false. But, for a particular Submit button I want all the @If to force-evaluate to True on the Rewind. One ugly way is to actually change the HTML using javascript so that all the @Ifs have 'True' set in their values. But is there a more elegant way? If not, I guess I'll have to write my own custom component. Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. -- Thanks, Karthik -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Forcing all @If to evaluate to True on Form Submit
Actually, the idea of Tapestry providing additional js functions that would interact with the html it renders is pretty interesting. Another (more usual) example of this is for replacing (or even including) direct link parameters on the client by tweeking the generated urls. I guess you could log a JIRA request for something like this... Karthik N wrote: Yes I meant changing the values of the hidden @If from 'F' to 'T' - rather ugly. On 8/4/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I'm sure he meant changing the hidden form input fields that control @If in javascript ;) On 8/4/06, Detlef Schulze [EMAIL PROTECTED] wrote: Javascript runs on the client browser, the @If is evaluated on the server What are you trying to accomplish ?!?!?!?!? -Original Message- From: Karthik N [mailto:[EMAIL PROTECTED] Sent: Freitag, 4. August 2006 14:45 To: Tapestry users Subject: Forcing all @If to evaluate to True on Form Submit I have a rather bizzare requirement (I think) My Form has 3 or 4 @If components. At any point only one of the @If is True, all others are false. But, for a particular Submit button I want all the @If to force-evaluate to True on the Rewind. One ugly way is to actually change the HTML using javascript so that all the @Ifs have 'True' set in their values. But is there a more elegant way? If not, I guess I'll have to write my own custom component. Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forcing all @If to evaluate to True on Form Submit
By ugly I was alluding to my approach, and not the formatting of the hidden fields. :-) I would ideally like not to manipulate the html using js to set a F to T, even if i know i can do it. On 8/4/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: But still more efficient than TRUE/FALSE for rendering. They aren't typically (hidden input fields) meant to be human friendly so I appreciate the length of statements. (Esp as there are sometimes a great number of them) On 8/4/06, Karthik N [EMAIL PROTECTED] wrote: Yes I meant changing the values of the hidden @If from 'F' to 'T' - rather ugly. On 8/4/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I'm sure he meant changing the hidden form input fields that control @If in javascript ;) On 8/4/06, Detlef Schulze [EMAIL PROTECTED] wrote: Javascript runs on the client browser, the @If is evaluated on the server What are you trying to accomplish ?!?!?!?!? -Original Message- From: Karthik N [mailto:[EMAIL PROTECTED] Sent: Freitag, 4. August 2006 14:45 To: Tapestry users Subject: Forcing all @If to evaluate to True on Form Submit I have a rather bizzare requirement (I think) My Form has 3 or 4 @If components. At any point only one of the @If is True, all others are false. But, for a particular Submit button I want all the @If to force-evaluate to True on the Rewind. One ugly way is to actually change the HTML using javascript so that all the @Ifs have 'True' set in their values. But is there a more elegant way? If not, I guess I'll have to write my own custom component. Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. -- Thanks, Karthik -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. -- Thanks, Karthik