Author: wesleyhales
Date: 2009-12-21 17:20:03 -0500 (Mon, 21 Dec 2009)
New Revision: 1112
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsole.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerEditor.gtmpl
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpPortlet.gtmpl
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/wsrp/webui/component/DefaultStylesheet.css
Log:
cleaning up the ui
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsole.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsole.java 2009-12-21
19:58:20 UTC (rev 1111)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsole.java 2009-12-21
22:20:03 UTC (rev 1112)
@@ -45,7 +45,7 @@
@ComponentConfig(
id = "UIWsrpConsoleTab",
type = UITabPane.class,
- //template = "system:/groovy/webui/core/UITabPane_New.gtmpl",
+ //template = "system:/groovy/webui/core/UITabPane.gtmpl",
template = "app:/groovy/wsrp/webui/component/UIWsrpConsoleContent.gtmpl",
events = {@EventConfig(listeners = UIWsrpConsole.SelectTabActionListener.class)})})
public class UIWsrpConsole extends UIContainer
@@ -53,86 +53,87 @@
public UIWsrpConsole() throws Exception
{
UITabPane uiTabPane = addChild(UITabPane.class, "UIWsrpConsoleTab",
null);
- uiTabPane.addChild(UIWsrpConsumerOverview.class, null, null).setRendered(true);
- uiTabPane.addChild(UIWsrpProducerOverview.class, null, null);
+ uiTabPane.addChild(UIWsrpConsumerOverview.class, null, "Manage
Consumers").setRendered(true);
+ uiTabPane.addChild(UIWsrpProducerOverview.class, null, "Producer
Configuration");
uiTabPane.setSelectedTab(1);
+
}
public void processRender(WebuiRequestContext context) throws Exception
{
- UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
- int portalMode = uiPortalApp.getModeState();
- if (portalMode != UIPortalApplication.NORMAL_MODE)
- {
- UITabPane uiTabPane = this.getChild(UITabPane.class);
- UIComponent uiComponent = uiTabPane.getChildById(uiTabPane.getSelectedTabId());
- if (uiComponent instanceof UIWsrpConsumerOverview)
- {
- if (portalMode == UIPortalApplication.APP_VIEW_EDIT_MODE)
- {
-
Util.showComponentEditInViewMode(org.exoplatform.portal.webui.container.UIContainer.class);
- }
- else
- {
- uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
-
Util.showComponentLayoutMode(org.exoplatform.portal.webui.container.UIContainer.class);
- }
- }
- else if (uiComponent instanceof UIWsrpProducerOverview)
- {
- if (portalMode == UIPortalApplication.CONTAINER_VIEW_EDIT_MODE)
- {
-
Util.showComponentEditInViewMode(org.exoplatform.portal.webui.container.UIContainer.class);
- }
- else
- {
- uiPortalApp.setModeState(UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE);
-
Util.showComponentLayoutMode(org.exoplatform.portal.webui.container.UIContainer.class);
- }
- }
- }
- super.processRender(context);
+// UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
+// int portalMode = uiPortalApp.getModeState();
+// if (portalMode != UIPortalApplication.NORMAL_MODE)
+// {
+// UITabPane uiTabPane = this.getChild(UITabPane.class);
+// UIComponent uiComponent =
uiTabPane.getChildById(uiTabPane.getSelectedTabId());
+// if (uiComponent instanceof UIWsrpConsumerOverview)
+// {
+// if (portalMode == UIPortalApplication.APP_VIEW_EDIT_MODE)
+// {
+//
Util.showComponentEditInViewMode(org.exoplatform.portal.webui.container.UIContainer.class);
+// }
+// else
+// {
+// uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
+//
Util.showComponentLayoutMode(org.exoplatform.portal.webui.container.UIContainer.class);
+// }
+// }
+// else if (uiComponent instanceof UIWsrpProducerOverview)
+// {
+// if (portalMode == UIPortalApplication.CONTAINER_VIEW_EDIT_MODE)
+// {
+//
Util.showComponentEditInViewMode(org.exoplatform.portal.webui.container.UIContainer.class);
+// }
+// else
+// {
+//
uiPortalApp.setModeState(UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE);
+//
Util.showComponentLayoutMode(org.exoplatform.portal.webui.container.UIContainer.class);
+// }
+// }
+// }
+ super.processRender(context);
}
static public class SelectTabActionListener extends UITabPane.SelectTabActionListener
{
public void execute(Event<UITabPane> event) throws Exception
{
- super.execute(event);
- UITabPane uiTabPane = event.getSource();
- UIComponent uiComponent = uiTabPane.getChildById(uiTabPane.getSelectedTabId());
- UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
- int portalMode = uiPortalApp.getModeState();
-
- if (uiComponent instanceof UIWsrpConsumerOverview)
- { // Swicth to Porlets Tab
- if (portalMode % 2 == 0)
- {
- uiPortalApp.setModeState(UIPortalApplication.APP_VIEW_EDIT_MODE);
-
Util.showComponentEditInViewMode(org.exoplatform.portal.webui.container.UIContainer.class);
- }
- else
- {
- uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
-
Util.showComponentLayoutMode(org.exoplatform.portal.webui.container.UIContainer.class);
- }
- }
- else if (uiComponent instanceof UIWsrpProducerOverview)
- { // Swicth to
- // Containers Tab
- if (portalMode % 2 == 0)
- {
- uiPortalApp.setModeState(UIPortalApplication.CONTAINER_VIEW_EDIT_MODE);
-
Util.showComponentEditInViewMode(org.exoplatform.portal.webui.container.UIContainer.class);
- }
- else
- {
- uiPortalApp.setModeState(UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE);
-
Util.showComponentLayoutMode(org.exoplatform.portal.webui.container.UIContainer.class);
- }
- }
- event.getRequestContext().addUIComponentToUpdateByAjax(
-
Util.getUIPortalApplication().getChildById(UIPortalApplication.UI_WORKING_WS_ID));
+// super.execute(event);
+// UITabPane uiTabPane = event.getSource();
+// UIComponent uiComponent =
uiTabPane.getChildById(uiTabPane.getSelectedTabId());
+// UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
+// int portalMode = uiPortalApp.getModeState();
+//
+// if (uiComponent instanceof UIWsrpConsumerOverview)
+// { // Swicth to Porlets Tab
+// if (portalMode % 2 == 0)
+// {
+// uiPortalApp.setModeState(UIPortalApplication.APP_VIEW_EDIT_MODE);
+//
Util.showComponentEditInViewMode(org.exoplatform.portal.webui.container.UIContainer.class);
+// }
+// else
+// {
+// uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
+//
Util.showComponentLayoutMode(org.exoplatform.portal.webui.container.UIContainer.class);
+// }
+// }
+// else if (uiComponent instanceof UIWsrpProducerOverview)
+// { // Swicth to
+// // Containers Tab
+// if (portalMode % 2 == 0)
+// {
+// uiPortalApp.setModeState(UIPortalApplication.CONTAINER_VIEW_EDIT_MODE);
+//
Util.showComponentEditInViewMode(org.exoplatform.portal.webui.container.UIContainer.class);
+// }
+// else
+// {
+//
uiPortalApp.setModeState(UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE);
+//
Util.showComponentLayoutMode(org.exoplatform.portal.webui.container.UIContainer.class);
+// }
+// }
+// event.getRequestContext().addUIComponentToUpdateByAjax(
+//
Util.getUIPortalApplication().getChildById(UIPortalApplication.UI_WORKING_WS_ID));
}
}
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java 2009-12-21
19:58:20 UTC (rev 1111)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java 2009-12-21
22:20:03 UTC (rev 1112)
@@ -45,8 +45,7 @@
/** @author Wesley Hales */
@ComponentConfig(template =
"app:/groovy/wsrp/webui/component/UIWsrpConsumerEditor.gtmpl", lifecycle =
UIFormLifecycle.class, events = {
- @EventConfig(listeners = UIWsrpConsumerEditor.SaveActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerEditor.EditActionListener.class)})
+ @EventConfig(listeners = UIWsrpConsumerEditor.SaveActionListener.class)})
public class UIWsrpConsumerEditor extends UIForm
{
protected static final String CONSUMER_NAME = "id";
@@ -56,7 +55,7 @@
public UIWsrpConsumerEditor() throws Exception
{
- addUIFormInput(new UIFormStringInput(CONSUMER_NAME, CONSUMER_NAME,
null).addValidator(MandatoryValidator.class));
+ addUIFormInput(new UIFormStringInput(CONSUMER_NAME, CONSUMER_NAME,
"123").addValidator(MandatoryValidator.class));
addUIFormInput(new UIFormStringInput(CACHE_EXPIRATION, CACHE_EXPIRATION, null));
addUIFormInput(new UIFormStringInput(WSDL_URL, WSDL_URL, null));
//addChild(UIWsrpEndpointConfigForm.class,null,null);
@@ -83,12 +82,25 @@
return getUIStringInput(WSDL_URL).getValue();
}
+ private Boolean newConsumer;
+
+ public Boolean isNewConsumer()
+ {
+ return newConsumer;
+ }
+
+ public void setNewConsumer(Boolean newConsumer)
+ {
+ this.newConsumer = newConsumer;
+ }
+
public void setConsumer(WSRPConsumer consumer) throws Exception
{
//UIWsrpEndpointConfigForm uiWsrpEndpointConfigForm =
getChild(UIWsrpEndpointConfigForm.class);
if (consumer == null)
{
getUIStringInput(CONSUMER_NAME).setEditable(UIFormStringInput.ENABLE);
+ setNewConsumer(true);
return;
}
getUIStringInput(CONSUMER_NAME).setEditable(UIFormStringInput.ENABLE);
@@ -96,6 +108,7 @@
getUIStringInput(CONSUMER_NAME).setValue(consumer.getProducerId());
getUIStringInput(CACHE_EXPIRATION).setValue(consumer.getProducerInfo().getExpirationCacheSeconds().toString());
getUIStringInput(WSDL_URL).setValue(consumer.getProducerInfo().getEndpointConfigurationInfo().getWsdlDefinitionURL());
+ setNewConsumer(false);
//invokeGetBindingBean(consumer.getProducerInfo());
//uiWsrpEndpointConfigForm.setProducerInfo(consumer.getProducerInfo());
@@ -123,7 +136,12 @@
UIWsrpConsumerOverview consumerOverview =
consumerEditor.getAncestorOfType(UIWsrpConsumerOverview.class);
WebuiRequestContext ctx = event.getRequestContext();
- consumerEditor.save(ctx);
+ if(consumerEditor.isNewConsumer()){
+ consumerEditor.save(ctx);
+ }else{
+ consumerEditor.edit(ctx);
+ }
+
consumerEditor.reset();
//loose the popup
@@ -148,32 +166,6 @@
}
}
- static public class EditActionListener extends
EventListener<UIWsrpConsumerEditor>
- {
- public void execute(Event<UIWsrpConsumerEditor> event) throws Exception
- {
- UIWsrpConsumerEditor consumerEditor = event.getSource();
-
- UIWsrpConsumerOverview consumerOverview =
consumerEditor.getAncestorOfType(UIWsrpConsumerOverview.class);
-
- WebuiRequestContext ctx = event.getRequestContext();
- consumerEditor.edit(ctx);
- consumerEditor.reset();
-
- UIPopupWindow popup = consumerEditor.getParent();
- popup.setRendered(false);
- popup.setShow(false);
-
- LazyPageList pageList =
consumerOverview.createPageList(consumerOverview.getConfiguredConsumers());
- UIGrid uiGrid = consumerOverview.getChild(UIGrid.class);
- uiGrid.getUIPageIterator().setPageList(pageList);
-
- ctx.addUIComponentToUpdateByAjax(consumerOverview);
- }
-
- }
-
-
public boolean save(WebuiRequestContext context) throws Exception
{
ExoContainer manager = ExoContainerContext.getCurrentContainer();
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java 2009-12-21
19:58:20 UTC (rev 1111)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java 2009-12-21
22:20:03 UTC (rev 1112)
@@ -123,7 +123,7 @@
public UIWsrpConsumerOverview() throws Exception
{
UIPopupWindow popup = addChild(UIPopupWindow.class, null, null);
- popup.setWindowSize(400, 300);
+ popup.setWindowSize(400, 0);
UIWsrpConsumerEditor consumerForm = createUIComponent(UIWsrpConsumerEditor.class,
null, null);
popup.setUIComponent(consumerForm);
popup.setRendered(false);
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl 2009-12-21
19:58:20 UTC (rev 1111)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl 2009-12-21
22:20:03 UTC (rev 1112)
@@ -1,4 +1,3 @@
-<% uicomponent.renderChildren(); %>
-<div>
-</div>
\ No newline at end of file
+
+<% uicomponent.renderChildren(); %>
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerEditor.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerEditor.gtmpl 2009-12-21
19:58:20 UTC (rev 1111)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerEditor.gtmpl 2009-12-21
22:20:03 UTC (rev 1112)
@@ -7,9 +7,7 @@
<%
UIFormStringInput name = uicomponent.getChild(UIFormStringInput.class);
%>
- <div class="SignIn">Add new Consumer</div>
- <div class="FloatRight">
- <div class="FloatLeft">
+
<div class="UserName">
<div>
<label>Consumer Name</label>
@@ -61,26 +59,6 @@
</table>
</div>
- <div class="UIAction">
- <table class="ActionContainer">
- <tr>
- <td>
- <div onclick="<%=uicomponent.event("Edit")%>"
class="ActionButton LightBlueStyle">
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <a
href="javascript:void(0);"><%=_ctx.appRes(uicomponent.getId() +
".action.Edit")%></a>
- </div>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div class="ClearLeft"><span></span></div>
- </div>
- <div class="ClearRight"><span></span></div>
<% uiform.end() %>
-</div>
+
</div>
\ No newline at end of file
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl 2009-12-21
19:58:20 UTC (rev 1111)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl 2009-12-21
22:20:03 UTC (rev 1112)
@@ -9,8 +9,24 @@
<div class="<%=uicomponent.getId()%>"
id="<%=uicomponent.getId()%>">
- <a href="<%=uicomponent.event("OpenPopup",
"")%>">Add Consumer</a> |
- <a href="<%=uicomponent.event("RefreshGrid",
"")%>">Refresh List</a>
+ <div class="UIAction">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div onclick="<%=uicomponent.event("OpenPopup",
"")%>" class="ActionButton LightBlueStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a href="javascript:void(0);">Add New
Consumer</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+
<% uicomponent.renderChildren(); %>
</div>
\ No newline at end of file
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpPortlet.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpPortlet.gtmpl 2009-12-21
19:58:20 UTC (rev 1111)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpPortlet.gtmpl 2009-12-21
22:20:03 UTC (rev 1112)
@@ -1,4 +1,4 @@
-<% uicomponent.renderChildren(); %>
+
<div class="<%=uicomponent.getId()%>">
-
+ <% uicomponent.renderChildren(); %>
</div>
\ No newline at end of file
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/wsrp/webui/component/DefaultStylesheet.css
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/wsrp/webui/component/DefaultStylesheet.css 2009-12-21
19:58:20 UTC (rev 1111)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/wsrp/webui/component/DefaultStylesheet.css 2009-12-21
22:20:03 UTC (rev 1112)
@@ -18,7 +18,7 @@
*/
.UIWsrpPortlet {
-
+ padding:10px;
}
img.RefreshIcon {
@@ -39,4 +39,18 @@
img.ActivateIcon {
width: 16px; height: 16px;
background:
url('/eXoResources/skin/DefaultSkin/skinIcons/16x16/icons/SelectIcon.gif')
no-repeat;
+}
+
+.UIWsrpPortlet .UITabPane {
+ margin: 10px
+}
+
+.UIWsrpPortlet .UIHorizontalTabs .TabsContainer {
+ border-bottom:1px solid #DDDDDD;
+ height:24px;
+}
+
+.UIWsrpPortlet .UIAction .ActionContainer {
+ margin:0;
+ width:auto;
}
\ No newline at end of file