Add a JIRA please. At least since 4.1.2-20070501.233137-64, i can see the first If getting called 3 times! And it's probably the first @If after an app reset that gets evaluated 3 times and not the first @If of a page.
An old 4.1.2-20070215.051249-15 worked correctly, i cant test other (in between) versions right now due to dependencies incompatibilities. On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote:
Ugh. This is a big pain now. I have a huge dynamic form that has lots of IFs, and I can see the same queries being called 3 times or more. =( Everything still works, it's just about 3 times slower. If anyone has solved this problem please let me know! On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > Here is another example when more than one IF component is used. > > It seems the conditional for the first IF gets called 3 times, then > the others just get called once. > > plain.java: > > package com.phy6.app; > > import org.apache.tapestry.IComponent; > import org.apache.tapestry.annotations.Component; > import org.apache.tapestry.annotations.InitialValue; > import org.apache.tapestry.html.BasePage; > > public abstract class plain extends BasePage { > > public boolean getDoStuff() { > this.setNumber(this.getNumber() + 1); > System.out.println("plain: getDoStuff() " + this.getNumber()); > return false; > } > > @Component(type = "If", id = "ifXYZ", bindings = { "condition=getDoStuff()" }) > public abstract IComponent getIfXYZ(); > > @Component(type = "If", id = "ifABC", bindings = { "condition=getDoStuff()" }) > public abstract IComponent getIfABC(); > > @Component(type = "If", id = "ifDEF", bindings = { "condition=getDoStuff()" }) > public abstract IComponent getIfDEF(); > > @Component(type = "If", id = "ifGHI", bindings = { "condition=getDoStuff()" }) > public abstract IComponent getIfGHI(); > > @InitialValue("0") > public abstract int getNumber(); > > @Component(type = "Insert", id = "wtfisgoingon", bindings = { > "value=getNumber()" }) > public abstract IComponent getWTFisgoingon(); > > public abstract void setNumber(int n); > } > > > > plain.html > > <html> > <body> > <span jwcid="ifXYZ">Hi XYZ</span> > <span jwcid="ifABC">Hi ABC</span> > <span jwcid="ifDEF">Hi DEF</span> > <span jwcid="ifGHI">Hi GHI</span> > <span jwcid="wtfisgoingon" /> > </body> > </html> > > > plain.page is an empty page spec. > > Output: > INFO: Server startup in 3645 ms > plain: getDoStuff() 1 > plain: getDoStuff() 2 > plain: getDoStuff() 3 > plain: getDoStuff() 4 > plain: getDoStuff() 5 > plain: getDoStuff() 6 > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting