Then what is the "bindable interface" supposed to accomplish?

I was looking at theexample with the bindable window and the JSON message.
Is it supposed to help encapsulate the bindings?

What does this mean?: " wtkxSerializer.readObject(this, "


Thanks

Bob

On Thu, Mar 4, 2010 at 3:35 PM, Greg Brown <[email protected]> wrote:

> WTKX binding isn't about binding to a data source - it is about mapping the
> objects you have given IDs in your WTKX to member variables you declare in a
> Java class. Data binding is a different (though similarly named) topic.
>
> You can set the Accordion.label attribute on the include itself:
>
> <wtkx:include src="my_panel.wtkx" Accordion.label="My Panel"/>
>
> On Mar 4, 2010, at 4:30 PM, Robert Piotrowski wrote:
>
> I'm not really trying to bind to a datasource.
>
> If I extend a splitpane and then use that subclass in the wtkx, i think i
> should be fine.
>
>
> If I have an accordion in one wtkx and then panels in another, how do I set
> Accordion.label in the panel wtkx files?  I'm getting serialization errors
> by having Accordion.label attributes in my panel wtkx files.
>
>
>
>
> Bob
>
>
>
>
> On Thu, Mar 4, 2010 at 12:46 PM, Greg Brown <[email protected]> wrote:
>
>> Bindable is probably what you are looking for. It hasn't been documented
>> yet, but you can see an example in the source code. See this thread for more
>> info:
>>
>>
>> http://mail-archives.apache.org/mod_mbox/pivot-user/201003.mbox/%[email protected]%3e
>>
>>
>> On Mar 4, 2010, at 1:42 PM, Robert Piotrowski wrote:
>>
>> Where are the docs for bindable?
>>
>> Without "bindable", would I normally have to "read" an object into a
>> SplitPane object and pass it to another object to compartmentalize the
>> events for an accordion panel?
>>
>> I have 4 panels for this accordion.  One for each type of entity
>> (person,employee,company,assignment).  Same basic components in the nested
>> splitpanes/tableview/treeviews.  Same mouse/text handlers.  Whats the best
>> way to compartmentalize these panels so that I dont have to pass the panel
>> name to all the methods & handlers?
>>
>>
>> I need to use Java handlers, I cant use the javascript stuff.
>>
>>
>> Thanks,
>>
>> Bob
>>
>>
>> On Thu, Mar 4, 2010 at 10:28 AM, Greg Brown <[email protected]> wrote:
>>
>>> Heh. I was going to suggest that you take a look at the Bindable
>>> interface for this use case as well.
>>>
>>> I really need to get that part of the tutorial done.  :-)
>>>
>>>
>>> On Mar 4, 2010, at 11:14 AM, Robert Piotrowski wrote:
>>>
>>> never mind.
>>>
>>> I'm a bonehead.
>>>
>>>
>>>
>>> Sorry.
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Mar 4, 2010 at 9:14 AM, Robert Piotrowski <
>>> [email protected]> wrote:
>>>
>>>> I'm trying to add independent SplitPane classes to an Accordian.  All
>>>> SplitPanes are pretty similar and I wanted them to run independently so I
>>>> tried this:
>>>>
>>>> *public class EntityPane extends SplitPane{
>>>>
>>>>     SplitPane entity_pane;
>>>>
>>>>     public EntityPane(String URL) throws Exception{
>>>>
>>>>         WTKXSerializer wtkxSerializer = new WTKXSerializer();
>>>>         System.out.println("url:"+ URL);
>>>>         this.entity_pane = (SplitPane) wtkxSerializer.readObject(new
>>>> FileInputStream(URL));
>>>>         System.out.println("inner_user_data:" +
>>>> entity_pane.getUserData().get("entity").toString());  //This works.
>>>>
>>>>     }
>>>>
>>>> }*
>>>>
>>>>
>>>> And then I tried adding them to the accordion this way, but I'm getting
>>>> a null pointer when trying to access the userdata or adding it to the
>>>> accordion add setting the index to zero:
>>>>
>>>> *public void startup(Display display, Map<String, String> properties)
>>>>             throws Exception {
>>>>         WTKXSerializer wtkxSerializer = new WTKXSerializer();
>>>>
>>>>         window = (Window) wtkxSerializer.readObject(new
>>>> FileInputStream("c:\\rpiotrowski\\solr\\topwindow_v2.xml"));
>>>>
>>>>         accordion_entities= (Accordion)
>>>> wtkxSerializer.get("accordion_entities");
>>>>
>>>>         EntityPane person = new EntityPane("c:
>>>> \\rpiotrowski\\solr\\pane_person.xml");  //The instantiation shows the
>>>> inner system.out.println above.
>>>>
>>>>         System.out.println("outer_user_data:" +
>>>> person.getUserData().get("entity").toString());
>>>>
>>>> //fails        accordion_entities.add(new EntityPane("c:
>>>> \\rpiotrowski\\solr\\pane_person.xml"));
>>>> //fails        accordion_entities.setSelectedIndex(0);*
>>>>
>>>>
>>>> I want to encapsulate the splitpanels into their own java objects to
>>>> make all the eventhandling easier.  If I have everything in one xml_file
>>>> then I have to pass the splitpanel to every listener, etc.
>>>>
>>>>
>>>> If I do "includes" in the xml, I'll end up with a everything in one big
>>>> main class again.  Right?
>>>>
>>>>
>>>>
>>>>
>>>> Bob
>>>>
>>>
>>>
>>>
>>
>>
>
>

Reply via email to