Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Limitations with hide-if/show-if in JAXB resource manager definition

Dave,

It looks like the button ID is local to the dynamic tab as you suspected. It may be possible to make this global without too much difficulty. 

I'm not quite sure why it uses an ID, rather than using a property directly. In fact the documentation says:

"An invisible property should be assigned to each checkbox which controls the state of other widgets (e.g., checked002 in the example above); this will allow you to restore the state of the tab correctly when it is rebuilt or re-initialized."

So it seems like the expectation is that there will be a property associated with the widget state, so I don't see why this couldn't be used in the enable-if element instead of the ID. This would require some code changes though.

Greg


On Apr 23, 2012, at 4:53 PM, Dave Wootton wrote:

I'm trying to use the hide-if and show-if capability to dynamically hide and show widgets in a JAXB resource manager definition and have run into a couple limitations. For example I added this XML snipped to a widget specification

                                                <control-state>
                                                        <hide-if button="use_ll" selected="true"/>
                                                </control-state>
1) This is only accepted for <widget> specifications. If I try to add it to a button-group, radiobutton, browse or other compound widget type I get an error that the XML file is invalid.
2) I'm trying to control the visibility of widgets in the scope of multiple <dynamic> specifications (multiple tabs) by checking the state of a widget (radio button) on one of the tabs. The problem is that the buttonId specification is valid only within the scope of the <dynamic> specification where it appears.
I can work around this by coding the same button specification (for a "use LoadLeveler" radio button pair) in each <dynamic> specification so the same button pair appears in each tab, and references the same attribute specification so the button pair in each tab is always the same state but this seems redundant.

I could also solve this if there was a way to code a radio button pair outside the scope of a dynamic tab where widgets in each tab can find it by buttonId but I don't see a way to do that.

Dave_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top