commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Ferguson <seansli...@comcast.net>
Subject Re: [JELLY] Key listeners
Date Tue, 22 Jul 2003 22:43:40 GMT
I have no experience writing test cases, but I can take a look at it.

Question, is this the only way to get key listeners on a component?  I'd 
really like the ability to add a key or focus listener that can use jexl 
or bsf in the xml.

Paul Libbrecht wrote:

> Sean Ferguson wrote:
> 
>> Thanks for the tip on using j:new.  I really wish there was some good 
>> documentation on Jelly.
>>
>> One thing I think I should point out that may or may not be a bug is 
>> that if I put the code inside the declaration of the textfield, it 
>> doesn't catch events.
>>
>> <textField var="customerId" text="" columns="10">
>>   <core:new var="keyAdapter" className="JellyKeyAdapter"/>
>>   ${customerId.addKeyListener(keyAdapter)}
>> </textField>
>>
>> But if I move the code block outside of the declaration, it works fine.
>> <textField var="customerId" text="" columns="10"/>
>> <core:new var="keyAdapter" className="JellyKeyAdapter"/>
>> ${customerId.addKeyListener(keyAdapter)}
>>
>> I know I don't understand fully how Jelly works, but I would have 
>> thought it would work both ways.
> 
> 
> That looks like a bug to me... can you try to make this into a 
> test-case? Note that it's not at all specific of textfield or even swing 
> but of the UseBeanTag, going through the javadoc should allow you to 
> find other subclasses of this tag.
> 
> Paul
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


Mime
View raw message