No need for JIRA issues - I know exactly why it's doing it and intentionally
have it running this way.

Unfortunately it's the only sane way I know to make sure 4.1.2 is
releasable.  There's no actual need for OGNL expressions to be compiled in
dev mode but otherwise I'd have no way of ensuring that your happily
developed app didn't work quite the same way in production. ...Would you
rather be annoyed for another week or two until the release or get a phone
call at 2am that the app is blowing up and wtf have you done we're totally
screwed? =p

On 5/17/07, Andreas Andreou <[EMAIL PROTECTED]> wrote:

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




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to