pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: events and wtkx:id's
Date Fri, 05 Mar 2010 20:56:18 GMT
It should have produced an NPE if the value wasn't actually bound. However, it sounds like
it may have bound to the first button with the ID (the one that wasn't misspelled), so the
member variable wouldn't have been null. 

One thing to note is that duplicate IDs in WTKX aren't really supported - if that doesn't
currently throw an exception, it probably should.


On Mar 5, 2010, at 3:45 PM, Robert Piotrowski wrote:

> Between my panels, the Form.Section wtkx:id was the same, but the submit_button id was
misspelled on the second wtkx:id.  So the buttonhandler registered correctly on only one button.
 For some reason, the correct submit button handler was processing both forms.  I'm surpised
that binding a button handler to a @WTKX bound button that really doesnt exist didnt cause
a NPE.
> 
> 
> 
> Bob
> 
> 
> On Fri, Mar 5, 2010 at 2:32 PM, Robert Piotrowski <rpiotrowski@azonic.net> wrote:
> never mind.  another bonehead move on my part. 
> 
> 
> 
> 
> On Fri, Mar 5, 2010 at 2:03 PM, Robert Piotrowski <rpiotrowski@azonic.net> wrote:
> I've got an accordion with 2 custom panes objects:
> 
> <Window title="SOLR VUE" maximized="true" xmlns:wtkx="http://pivot.apache.org/wtkx"
xmlns="org.apache.pivot.wtk" wtkx:id="window_top">
>     <content>
>         <Accordion wtkx:id="accordion_entities" styles="{padding:5}" height="200">
>             <userData url_solr_base="http://usildlapisea02/solr/dev"/>
>             <panels>
>             <wtkx:include src="file:c:\rpiotrowski\solr\pane_person.xml" Accordion.label="Person"/>
>             <wtkx:include src="file:c:\rpiotrowski\solr\pane_company.xml" Accordion.label="Company"/>
> 
> 
> Each Panel's wtkx file has as a Form.Section with a submit button the same wtkx:id of
"submit_button".
> 
> When I press on the submit button for one form, the handler fires for both forms automatically.
 Is this because both buttons have the same wtkx:id ?
> 
> If so, then how do I generically add a handler to all forms without creating this kind
of behavior?
> 
> 
> 
> Thanks
> Bob
> 
> 


Mime
View raw message