WTP server adapter - new extension points for UI modification [message #676766] |
Mon, 06 June 2011 09:11  |
Eclipse User |
|
|
|
Hi guys,
This question is about two new extension points in the WTP server adapter UI: ServerCreationWizardPageExtension - Bug 296345 and ServerEditorOverviewPageModifier - Bug 296731, more precisely about the first one. I am trying to use the first extension point, in order to change the default server host name, on the first wizard page for creating a new server.
However, I couldn't find any documentation about how exactly to use the extension point. In my case, I subclass the ServerCreationWizardPageExtension class, and override only the handlePropertyChanged() method, which looks like this:
public void handlePropertyChanged(PropertyChangeEvent event) {
if (event.getPropertyName().equals(PROP_SERVER_TYPE)) {
if (controlListener instanceof NewManualServerComposite) {
NewManualServerComposite composite = (NewManualServerComposite) controlListener;
if ((event.getNewValue() instanceof ServerType) && <My_server_Id>.equals(((ServerType) event.getNewValue()).getId())) {
controlMap.put(PROP_HOSTNAME, new UIControlEntry(true, <default_hostname_for_my_server_type>));
composite.handleUIControlMapChanged(controlMap);
}
}
}
}
Is this usage correct ? Or am I missing something ? Should I implement the createControl method as well, if the only thing I want is just a new value in the "host name" field ?
The problem I get, is that, I have a total of three different server types, and when the first wizard page for creating a new server is displayed, if I make a change from type_2 to type_3, the "Next" button becomes disabled. Without applying the extension point, this issue is not present. Overal, I have summarised the problematic transitions: type_2 -> type_3 and type_3 -> type_2 (all other combinations are fine; type_1 is the default one). All these three server types fall into the category of <My_server_Id> meaning that they all have the same server id, and they are differentiated by means of additional checks, which are not that important and hence, not shown in the above snippet. What is important, is that each transition combination leads to one and the same action of the method shown above, however, the behaviour is not the same.
Do you have some clue about what could be causing this (maybe the composite isn't refreshed properly) ?
Kindest Regards,
Krum.
[Updated on: Mon, 06 June 2011 09:22] by Moderator
|
|
|
Re: WTP server adapter - new extension points for UI modification [message #686023 is a reply to message #676766] |
Tue, 21 June 2011 08:07  |
Eclipse User |
|
|
|
Actually, after some investigation, it seems that the "disabled Next button" issue happens when you apply a UI change of the "host name" field, which does not introduce a new value for the field, but rather changes it's visibility: controlMap.put(PROP_HOSTNAME, new UIControlEntry(false, <the_same_host_name>)); Maybe this is a bug of the extension point handling ?
|
|
|
Powered by
FUDForum. Page generated in 0.27561 seconds