commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [Jelly] bug's in gridBagDemo.jelly
Date Tue, 12 Nov 2002 08:21:18 GMT
Hi Mark

From: "Mark Dimon" <mark.dimon@btinternet.com>
> Hi ,
>
> The way combo's are set up in gridBagDemo does not apear  to work , a cut
> down example:
>
> <j:jelly xmlns:j="jelly:core" xmlns="jelly:swing">
>     <frame title="Combo Test" var="frame" size="400,200">
>         <panel>
>             <comboBox name="c" var="c">
>                 ${c.addItem("this is combo 1")}
>             </comboBox>
>             <comboBox name="c" var="c">
>                 ${c.addItem("this is combo 2")}
>             </comboBox>
>         </panel>
>     </frame>
>     ${frame.show()}
> </j:jelly>
>
> The first combo displays "this is combo2" and the second nothing !
>
> However , moving the assigment out of the combo tag works :
>
> <j:jelly xmlns:j="jelly:core" xmlns="jelly:swing">
>     <frame title="Combo Test" var="frame" size="400,200">
>         <panel>
>             <comboBox name="c" var="c">
>             </comboBox>
>                 ${c.addItem("this is combo 1")}
>             <comboBox name="c" var="c">
>             </comboBox>
>                 ${c.addItem("this is combo 2")}
>         </panel>
>     </frame>
>     ${frame.show()}
> </j:jelly>
>
> Is this a bug , or error in gridBagDemo.jelly and should we be setting
vars
> from within the same tag that defines it ?

You're correct. Its a bug. The 'c' variable does not exist until after the
entire <comboBox> tag has executed.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message