RE: bug in baction and/or blink components?
"Christian Cryder" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Yep...I think you nailed it! Thanks... (I'm assuming you can check this in?) Nice work! Christian ---------------------------------------------- Christian Cryder Internet Architect, ATMReports.com Project Chair, BarracudaMVC - http://barracudamvc.org ---------------------------------------------- "Coffee? I could quit anytime, just not today" > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Jacob Kjome > Sent: Monday, August 11, 2003 4:04 PM > To: [email protected] > Subject: RE: [Barracuda] bug in baction and/or blink components? > > > Hi Christian, > > I believe I solved it. Maybe you can validate that this is the > correct fix... > > HTMLActionRenderer does this for HTMLAnchorElement's.... > > //set the href > //csc_041403.1 - basically, don't set the action unless its > actually been > specified in the component; > //we may still need to do this in the other > manipulateActionElementFunctions... > //csc_041403.1 el.setHref(comp.getAction(vc)); > if (comp.hasAction()) el.setHref(comp.getAction(vc)); > //csc_041403.1 > > > BAction#hasAction() does this.... > > public boolean hasAction() { > return (this.actionUrl!=null || this.actionEvent!=null); > } > > > Well, neither of the links in question set the action. Instead, they add > listeners to the BAction or BLink component like this... > > BAction baction = new BAction(); > baction.addEventListener(getLinkFactory); > baction.setParam("foo1","blah1"); > baction.setParam("foo2","blah2"); > > OR > > BLink blink = new BLink("link example (event)"); > blink.addEventListener(getLinkFactory); > blink.setParam("foo1","blah1"); > blink.setParam("foo2","blah2"); > > > In order to make this work, I had to modify hasAction() to do this... > > public boolean hasAction() { > return (this.actionUrl!=null || this.actionEvent!=null || > (this.listeners!=null && this.listeners.size()>0)); > } > > The first and third links which weren't working at > http://localhost:8080/Barracuda/CompTest4 now work fine. > > Does this sound like the right fix? > > Jake > > At 12:50 PM 8/11/2003 -0600, you wrote: > >No...haven't even had a chance to look at it yet...running > seriously behind > >since late last week, so it make take me a bit :-( > > > >csc > > > >---------------------------------------------- > >Christian Cryder > >Internet Architect, ATMReports.com > >Project Chair, BarracudaMVC - http://barracudamvc.org > >---------------------------------------------- > >"Coffee? I could quit anytime, just not today" > > > > > > > -----Original Message----- > > > From: [email protected] > > > [mailto:[email protected]]On Behalf Of Jacob Kjome > > > Sent: Monday, August 11, 2003 10:46 AM > > > To: [email protected] > > > Subject: RE: [Barracuda] bug in baction and/or blink components? > > > > > > > > > > > > Hi Christian, > > > > > > Have you figured this out yet? > > > > > > Jake > > > > > > At 09:57 AM 8/8/2003 -0600, you wrote: > > > >Yep...looks like there's a problem; probably located in the > > > renderer. I will > > > >try and take a look at it this afternoon.... > > > > > > > >Christian > > > >---------------------------------------------- > > > >Christian Cryder > > > >Internet Architect, ATMReports.com > > > >Project Chair, BarracudaMVC - http://barracudamvc.org > > > >---------------------------------------------- > > > >"Coffee? I could quit anytime, just not today" > > > > > > > > > > > > > -----Original Message----- > > > > > From: [email protected] > > > > > [mailto:[email protected]]On Behalf Of Jacob Kjome > > > > > Sent: Friday, August 08, 2003 12:14 AM > > > > > To: BarracudaMVC Users List > > > > > Subject: [Barracuda] bug in baction and/or blink components? > > > > > > > > > > > > > > > > > > > > I'm seeing some odd behavior. For instance, take a look at: > > > > > http://barracudamvc.org/Barracuda/CompTest4 > > > > > > > > > > The first and third links stay as foo.html (as they are by > > > default in the > > > > > template) and no parameters are added to them. This is certainly > > > > > not what > > > > > one would expect looking at the code... > > > > > > > > > > if (key.equals("Link1")) { > > > > > BAction baction = new BAction(); > > > > > baction.addView(new > > > > > DefaultView(vc.getTemplateNode().cloneNode(true))); > > > > > baction.addEventListener(getLinkFactory); > > > > > baction.setParam("foo1","blah1"); > > > > > baction.setParam("foo2","blah2"); > > > > > return baction; > > > > > } > > > > > .. > > > > > .. > > > > > else if (key.equals("Link3")) { > > > > > // BLink blink = new BLink("link example > (event)", vc); > > > > > BLink blink = new BLink("link example (event)"); > > > > > blink.addEventListener(getLinkFactory); > > > > > blink.setParam("foo1","blah1"); > > > > > blink.setParam("foo2","blah2"); > > > > > return blink; > > > > > } > > > > > > > > > > > > > > > What's going on there? Hopefully someone else can look into > > > > > this as I am > > > > > going to be gone early tomorrow through late Sunday. > > > > > > > > > > Note that XMLC-2.2 will be released either tomorrow, over the > > > weekend, or > > > > > at least by Monday. When I get back, I plan to cut a release of > > > > > Barracuda > > > > > including XMLC-2.2 release so the Enhydra guys can add a new > > > Barracuda to > > > > > their next release. I'd rather not have this bug around at that > > > > > time. If > > > > > someone can look into this and fix it before I get back on Sunday > > > > > night, it > > > > > would be very helpful! > > > > > > > > > > Jake > > > > > > > > > > _______________________________________________ > > > > > Barracuda mailing list > > > > > [email protected] > > > > > http://barracudamvc.org/lists/listinfo/barracuda > > > > > > > >_______________________________________________ > > > >Barracuda mailing list > > > >[email protected] > > > >http://barracudamvc.org/lists/listinfo/barracuda > > > > > > _______________________________________________ > > > Barracuda mailing list > > > [email protected] > > > http://barracudamvc.org/lists/listinfo/barracuda > > > >_______________________________________________ > >Barracuda mailing list > >[email protected] > >http://barracudamvc.org/lists/listinfo/barracuda > > _______________________________________________ > Barracuda mailing list > [email protected] > http://barracudamvc.org/lists/listinfo/barracuda