Your custom widget should have an
update model associated with it and in there you should implement
the method getValueFromControl() which specifies the object
returned from your custom widget. This will get called by the
AbstractUpdateModel when it attempts to store the value for your
custom widget.
Chris
On 02/27/2013 09:57 AM, Dave Wootton wrote:
I've implemented a custom widget
for my
resource manager so the user can dynamically query LSF queues in
the run
configuration dialog, but have run into a problem where the
attribute value
for any attribute used by this custom widget is not saved across
invocations
of the run configuration dialog. Other attributes are saved.
I've implemented this by coding a
text
box widget and a custom widget which refer to the same attribute
<widget style="SWT.BORDER"
attribute="LSF_QUEUE"
type="text" >
<layout-data>
<grid-data
widthHint="300" horizontalSpan="1"/>
</layout-data>
<tooltip>${ptp_rm:LSF_QUEUE#tooltip}</tooltip>
</widget>
<widget
type="custom" typeId="queueQuery" style="SWT.LEFT"
attribute="LSF_QUEUE">
<layout-data>
<grid-data
widthHint="100" horizontalAlign="SWT.BEGINNING"
/>
</layout-data>
<fixed-text>List</fixed-text>
</widget>
The way I intended for this to
work
was that the user can either just fill in the queue name in the
text box
or he can click the list button which is part of my custome
widget, select
a queue name from the table in a popup dialog and click ok.
I'm not doing anything in my
custom
widget to save the attribute value. Am I supposed to be doing
anything
to save the value? If so, how do I get access to the attribute?
I see a
'lcMap' variable that's available to the refreshValueFromMap
method in
the model for the widget but I don't know how to get access to
it for saving
a value or where I would do that.
Is what I'm trying to do
supposed to
work?
Dave
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
|