Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Questions about widgets in JAXB plugin

Dave,

I'd like to ask a couple of clarifications before I proceed.


> 1) I defined a widget as a checkBox, which assumes that the attribute 
> where the value is stored is a boolean. I'm using this to represent a PE 
> environment variable which accepts yas and no as valid values. Is there 
> any way to translate an attribute value of true/false to yes/no?

I may as well make the translation map to an abitrary string-pair (yes, no; y,n; T,F; 0,1), whose type depends on the property or attribute being written to. While I imagine this is limited to checkboxes, it would be easiest just to include it on the <widget> because otherwise I need to add another type. So on the widget we would have an element: <represent-boolean-as>yes,no</represent-boolean-as>, for instance.

> 2) Is there an example of how I would code a group of radio buttons? I 
> coded the following which resulted in displaying the radio buttons but no 
> labels were associated with them. I'm also not sure where to code the 
> saveValueTo, since if I coded it in the radio button definition then both 
> radio buttons would click on or off together.

Tell me if this specifies the widget-group adequately:

1.  Limited to radio buttons
2.  Each button has a label
3.  The group itself has a "saveValueTo".
4.  When the button is selected, the value for saveValueTo comes from the button's label.
5.  The group label type would be determined by the property or attribute written to.

Thanks,
Al



Back to the top