IDEMPIERE-234 Configure Toolbar by User / make the example work again

This commit is contained in:
Carlos Ruiz 2013-07-31 12:26:59 -05:00
parent d0f1a03dba
commit e94e53d828
7 changed files with 21 additions and 7 deletions

View File

@ -87,6 +87,8 @@ syntax: regexp
^org\.adempiere\.eclipse\.equinox\.servletbridge/bin/.*\.class$ ^org\.adempiere\.eclipse\.equinox\.servletbridge/bin/.*\.class$
^org\.adempiere\.eclipse\.equinox\.http\.servlet/bin/.*\.class$ ^org\.adempiere\.eclipse\.equinox\.http\.servlet/bin/.*\.class$
^org\.adempiere\.eclipse\.equinox\.http\.servletbridge/bin/.*\.class$ ^org\.adempiere\.eclipse\.equinox\.http\.servletbridge/bin/.*\.class$
^org\.adempiere\.ui\.zk\.example/bin/.*$
^org\.adempiere\.webstore\.resource/bin/.*$
^org\.adempiere\.webstore\.resource/bin/.*$ ^org\.adempiere\.webstore\.resource/bin/.*$
^targetPlatform/.*$ ^targetPlatform/.*$
^\.metadata/.*$ ^\.metadata/.*$

View File

@ -10,11 +10,11 @@
<DisplayLogic/> <DisplayLogic/>
<IsActive>true</IsActive> <IsActive>true</IsActive>
<IsCustomization>true</IsCustomization> <IsCustomization>true</IsCustomization>
<Name>Export Action</Name> <Name>Export</Name>
<KeyStroke_KeyCode>0</KeyStroke_KeyCode> <KeyStroke_KeyCode>0</KeyStroke_KeyCode>
<KeyStroke_Modifiers>0</KeyStroke_Modifiers> <KeyStroke_Modifiers>0</KeyStroke_Modifiers>
<AD_ToolBarButton_UU>09c20701-b692-44a1-9480-72a1cf8a0bf3</AD_ToolBarButton_UU> <AD_ToolBarButton_UU>09c20701-b692-44a1-9480-72a1cf8a0bf3</AD_ToolBarButton_UU>
<ComponentName>Export</ComponentName> <ComponentName>ExportExample</ComponentName>
<ActionName/> <ActionName/>
<ActionClassName>org.adempiere.ui.zk.example.action.export</ActionClassName> <ActionClassName>org.adempiere.ui.zk.example.action.export</ActionClassName>
</AD_ToolBarButton> </AD_ToolBarButton>
@ -22,11 +22,22 @@
<AD_Client_ID>0</AD_Client_ID> <AD_Client_ID>0</AD_Client_ID>
<AD_Org_ID>0</AD_Org_ID> <AD_Org_ID>0</AD_Org_ID>
<MsgType>I</MsgType> <MsgType>I</MsgType>
<MsgText>Export</MsgText> <MsgText>Export Example</MsgText>
<MsgTip/> <MsgTip/>
<EntityType>U</EntityType> <EntityType>U</EntityType>
<AD_Message_UU>b9d8b3d7-34d7-4f18-aed9-c19f9ed8f28a</AD_Message_UU> <AD_Message_UU>b9d8b3d7-34d7-4f18-aed9-c19f9ed8f28a</AD_Message_UU>
<Value>org.adempiere.ui.zk.example.action.export.tooltip</Value> <Value>org.adempiere.ui.zk.example.action.export.tooltip</Value>
<IsActive>true</IsActive> <IsActive>true</IsActive>
</AD_Message> </AD_Message>
<AD_Message type="table">
<AD_Client_ID>0</AD_Client_ID>
<AD_Org_ID>0</AD_Org_ID>
<MsgType>I</MsgType>
<MsgText>Export Example</MsgText>
<MsgTip/>
<EntityType>U</EntityType>
<AD_Message_UU>9099992f-776f-4efb-bcc6-dbffd65a8f19</AD_Message_UU>
<Value>org.adempiere.ui.zk.example.action.export.label</Value>
<IsActive>true</IsActive>
</AD_Message>
</idempiere> </idempiere>

View File

@ -7,6 +7,7 @@ Bundle-Activator: org.adempiere.ui.zk.example.Activator
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.adempiere.base, Import-Package: org.adempiere.base,
org.adempiere.base.equinox,
org.adempiere.exceptions, org.adempiere.exceptions,
org.adempiere.plugin.utils, org.adempiere.plugin.utils,
org.adempiere.webui.action, org.adempiere.webui.action,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -12,7 +12,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import org.adempiere.base.IGridTabExporter; import org.adempiere.base.IGridTabExporter;
import org.adempiere.base.Service; import org.adempiere.base.equinox.EquinoxExtensionLocator;
import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.AdempiereException;
import org.adempiere.webui.adwindow.ADWindowContent; import org.adempiere.webui.adwindow.ADWindowContent;
import org.adempiere.webui.adwindow.IADTabbox; import org.adempiere.webui.adwindow.IADTabbox;
@ -65,7 +65,7 @@ public class ExportWindow extends Window implements EventListener<Event> {
exporterMap = new HashMap<String, IGridTabExporter>(); exporterMap = new HashMap<String, IGridTabExporter>();
extensionMap = new HashMap<String, String>(); extensionMap = new HashMap<String, String>();
List<IGridTabExporter> exporterList = Service.locator().list(IGridTabExporter.class).getServices(); List<IGridTabExporter> exporterList = EquinoxExtensionLocator.instance().list(IGridTabExporter.class).getExtensions();
for(IGridTabExporter exporter : exporterList) for(IGridTabExporter exporter : exporterList)
{ {
String extension = exporter.getFileExtension(); String extension = exporter.getFileExtension();

View File

@ -612,9 +612,9 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
label = mToolBarButton.getName(); label = mToolBarButton.getName();
} }
if (tooltipKey.equals(tooltiptext)) { if (tooltipKey.equals(tooltiptext)) {
tooltiptext = null; tooltipKey = null;
} }
ToolBarButton btn = createButton(mToolBarButton.getComponentName(), null, tooltiptext); ToolBarButton btn = createButton(mToolBarButton.getComponentName(), null, tooltipKey);
btn.removeEventListener(Events.ON_CLICK, this); btn.removeEventListener(Events.ON_CLICK, this);
btn.setId(mToolBarButton.getName()); btn.setId(mToolBarButton.getName());
btn.setDisabled(false); btn.setDisabled(false);