Author: trong.tran
Date: 2010-05-18 01:06:24 -0400 (Tue, 18 May 2010)
New Revision: 3109
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleContent.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleDownloadUpload.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleLazyTabPane.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleMultiValueInputSet.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISamplePopupMessage.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISamplePortlet.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleRepeater.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleRightClickPopupMenu.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleTOC.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleUIForm.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleVirtualList.java
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/bean/
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/bean/User.java
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/classes/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/classes/locale/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/classes/locale/portlet/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/classes/locale/portlet/web/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/classes/locale/portlet/web/UISamplePortlet_en.properties
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/conf/sample/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/conf/sample/webui/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/conf/sample/webui/configuration.xml
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/gatein-resources.xml
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleDownloadUpload.gtmpl
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISamplePopupMessage.gtmpl
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISamplePortlet.gtmpl
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleRightClickPopupMenu.gtmpl
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleTOC.gtmpl
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/CollapseAllIcon.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/CollapseIcon.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/Dotted.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/ExpandAllIcon.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/ExpandIcon.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/LastNode.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/NullItem.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/RootTree.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/SitemapItemBoxTitle150x1.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/bullet.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/default_sitemap.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/minus.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/plus.gif
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultStylesheet.css
Removed:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/samples/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/conf/portlet/
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UICSInputForm.gtmpl
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UIDownloadUpload.gtmpl
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UILazyTabPaneInputSet.gtmpl
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleResourcesBrowser.gtmpl
Modified:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/portlet.xml
Log:
Re-organize WebUI based samples
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleContent.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleContent.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleContent.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,192 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not,
see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.sample.webui.component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.UIConfirmation;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIConfirmation.ActionConfirm;
+import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
+
+/**
+ * Created by The eXo Platform SAS Author : Nguyen Duc Khoi
+ * khoi.nguyen(a)exoplatform.com Apr 28, 2010
+ */
+
+@ComponentConfig(lifecycle = UIContainerLifecycle.class)
+public class UISampleContent extends UIContainer
+{
+ private Log log_ = ExoLogger.getLogger(UISampleContent.class);
+
+ public static final int NODE_UIFORM = 0;
+
+ public static final int NODE_UIPOPUPMESSAGE = 1;
+
+ public static final int NODE_UIPOPUPCONFIRM = 2;
+
+ public static final int NODE_LAZYTABPANE = 3;
+
+ public static final int NODE_DOWNLOADUPLOAD = 5;
+
+ public static final int NODE_REPEATER = 6;
+
+ public static final int NODE_VIRTUAL_LIST = 7;
+
+ public static final int NODE_RIGHTCLICKPOPUP = 8;
+
+ public static final int NODE_MULTIVALUE_INPUTSET = 9;
+
+ public static final ApplicationMessage MSG =
+ new ApplicationMessage("UISampleContent.UIPopupMessage.msg", new
String[]{"World !"}, ApplicationMessage.INFO);
+
+ public static final String MSG_CONFIRM = "Are you sure";
+
+ public UISampleContent() throws Exception
+ {
+ // other uicomponents are lazy initialized
+ addChild(UISampleUIForm.class, null, null);
+ }
+
+ public void showUIComponent(int nodeType)
+ {
+ switch (nodeType)
+ {
+ case NODE_UIFORM :
+ showUIForm();
+ break;
+ case NODE_UIPOPUPMESSAGE :
+ showUIPopupMessage();
+ break;
+ case NODE_UIPOPUPCONFIRM :
+ showUIConfirmation();
+ break;
+ case NODE_LAZYTABPANE :
+ showUILazyTabPane();
+ break;
+ case NODE_DOWNLOADUPLOAD :
+ showUIDownloadUpload();
+ break;
+ case NODE_REPEATER:
+ showRepeater();
+ break;
+ case NODE_VIRTUAL_LIST:
+ showVirtualList();
+ break;
+ case NODE_RIGHTCLICKPOPUP:
+ showRightClickPopup();
+ break;
+ case NODE_MULTIVALUE_INPUTSET:
+ showMultiValueInputSet();
+ break;
+ default :
+ log_.error("not implement yet");
+ }
+ }
+
+ private void showMultiValueInputSet()
+ {
+ UISampleMultiValueInputSet multiInputSet =
getChild(UISampleMultiValueInputSet.class);
+ setRenderedChild(multiInputSet.getId());
+ }
+
+ private void showRightClickPopup()
+ {
+ UISampleRightClickPopupMenu popup = getChild(UISampleRightClickPopupMenu.class);
+ setRenderedChild(popup.getId());
+ }
+
+ private void showVirtualList()
+ {
+ UISampleVirtualList virtualList = getChild(UISampleVirtualList.class);
+ setRenderedChild(virtualList.getId());
+ }
+
+ private void showRepeater()
+ {
+ UISampleRepeater repeater = getChild(UISampleRepeater.class);
+ setRenderedChild(repeater.getId());
+ }
+
+ private void showUIDownloadUpload()
+ {
+ UISampleDownloadUpload uiDL = getChild(UISampleDownloadUpload.class);
+ setRenderedChild(uiDL.getId());
+ }
+
+ private void showUILazyTabPane()
+ {
+ UISampleLazyTabPane uiTabPane = getChild(UISampleLazyTabPane.class);
+ setRenderedChild(uiTabPane.getId());
+ }
+
+ private void showUIForm()
+ {
+ setRenderedChild(UISampleUIForm.class);
+ }
+
+ private void showUIConfirmation()
+ {
+ UIConfirmation uiConfirmation = getChild(UIConfirmation.class);
+ uiConfirmation.setActions(makeActionConfirmList());
+ uiConfirmation.setCaller(this);
+ uiConfirmation.addMessage(MSG_CONFIRM);
+ uiConfirmation.setShow(true);
+
+ setRenderedChild(UIConfirmation.class);
+ }
+
+ private void showUIPopupMessage()
+ {
+ UISamplePopupMessage uiSamplePopupMessage = getChild(UISamplePopupMessage.class);
+ setRenderedChild(uiSamplePopupMessage.getId());
+ }
+
+ @Override
+ public <T extends UIComponent> T getChild(Class<T> clazz)
+ {
+ // TODO Auto-generated method stub
+ T uiComp = super.getChild(clazz);
+ if (uiComp == null)
+ {
+ try
+ {
+ uiComp = addChild(clazz, null, null);
+ }
+ catch (Exception e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ return uiComp;
+ }
+
+ private List<ActionConfirm> makeActionConfirmList()
+ {
+ List<ActionConfirm> actionConfirms = new ArrayList<ActionConfirm>();
+ actionConfirms.add(new ActionConfirm("Yes", "Yes"));
+ actionConfirms.add(new ActionConfirm("No", "No"));
+ return actionConfirms;
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleDownloadUpload.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleDownloadUpload.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleDownloadUpload.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,99 @@
+package org.exoplatform.sample.webui.component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.exoplatform.download.DownloadResource;
+import org.exoplatform.download.DownloadService;
+import org.exoplatform.download.InputStreamDownloadResource;
+import org.exoplatform.upload.UploadResource;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormUploadInput;
+
+@ComponentConfig(lifecycle = UIFormLifecycle.class, template =
"app:/groovy/webui/component/UISampleDownloadUpload.gtmpl", events =
{@EventConfig(listeners = UISampleDownloadUpload.SubmitActionListener.class)})
+public class UISampleDownloadUpload extends UIForm
+{
+
+ Map<String, String> data = new HashMap<String, String>();
+
+ private String[] downloadLink;
+
+ private String[] fileName;
+
+ private String[] inputName;
+
+ public UISampleDownloadUpload() throws Exception
+ {
+ addUIFormInput(new UIFormUploadInput("name0", "value0"));
+ addUIFormInput(new UIFormUploadInput("name1", "value1"));
+ addUIFormInput(new UIFormUploadInput("name2", "value2"));
+ }
+
+ public void setDownloadLink(String[] downloadLink)
+ {
+ this.downloadLink = downloadLink;
+ }
+
+ public String[] getDownloadLink()
+ {
+ return downloadLink;
+ }
+
+ public void setFileName(String[] fileName)
+ {
+ this.fileName = fileName;
+ }
+
+ public String[] getFileName()
+ {
+ return fileName;
+ }
+
+ public void setInputName(String[] inputName)
+ {
+ this.inputName = inputName;
+ }
+
+ public String[] getInputName()
+ {
+ return inputName;
+ }
+
+ static public class SubmitActionListener extends
EventListener<UISampleDownloadUpload>
+ {
+
+ public void execute(Event<UISampleDownloadUpload> event) throws Exception
+ {
+ UISampleDownloadUpload uiForm = event.getSource();
+ DownloadService dservice =
uiForm.getApplicationComponent(DownloadService.class);
+ String[] downloadLink = new String[3];
+ String[] fileName = new String[3];
+ String[] inputName = new String[3];
+ for (int index = 0; index <= 2; index++)
+ {
+ UIFormUploadInput input = uiForm.getChildById("name" + index);
+ UploadResource uploadResource = input.getUploadResource();
+ if (uploadResource != null)
+ {
+ DownloadResource dresource =
+ new InputStreamDownloadResource(input.getUploadDataAsStream(),
uploadResource.getMimeType());
+ dresource.setDownloadName(uploadResource.getFileName());
+ downloadLink[index] =
dservice.getDownloadLink(dservice.addDownloadResource(dresource));
+ fileName[index] = uploadResource.getFileName();
+ inputName[index] = "name" + index;
+ }
+ }
+
+ uiForm.setDownloadLink(downloadLink);
+ uiForm.setFileName(fileName);
+ uiForm.setInputName(inputName);
+
+ event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
+ }
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleLazyTabPane.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleLazyTabPane.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleLazyTabPane.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,19 @@
+package org.exoplatform.sample.webui.component;
+
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UILazyTabPane;
+import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
+
+(a)ComponentConfig(lifecycle=UIContainerLifecycle.class)
+public class UISampleLazyTabPane extends UIContainer
+{
+
+ public UISampleLazyTabPane() throws Exception
+ {
+ UILazyTabPane uiLazyTabPane = addChild(UILazyTabPane.class, null, null);
+ uiLazyTabPane.addChild(UISampleRightClickPopupMenu.class, null, null);
+ uiLazyTabPane.addChild(UISampleRepeater.class, null, null);
+ uiLazyTabPane.setSelectedTab(1);
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleMultiValueInputSet.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleMultiValueInputSet.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleMultiValueInputSet.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,142 @@
+package org.exoplatform.sample.webui.component;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import org.exoplatform.upload.UploadResource;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormDateTimeInput;
+import org.exoplatform.webui.form.UIFormInput;
+import org.exoplatform.webui.form.UIFormInputBase;
+import org.exoplatform.webui.form.UIFormMultiValueInputSet;
+import org.exoplatform.webui.form.UIFormStringInput;
+import org.exoplatform.webui.form.UIFormTextAreaInput;
+import org.exoplatform.webui.form.UIFormUploadInput;
+import org.exoplatform.webui.form.ext.UIFormColorPicker;
+
+@ComponentConfig(lifecycle = UIFormLifecycle.class, template =
"system:/groovy/webui/form/UIFormWithTitle.gtmpl", events =
{@EventConfig(listeners = UISampleMultiValueInputSet.SubmitActionListener.class)})
+public class UISampleMultiValueInputSet extends UIForm
+{
+
+ public static final String MULTI_UPLOAD = "UploadInput";
+
+ public static final String MULTI_DATE = "DateTimeInput";
+
+ public static final String MULTI_COLOR = "ColorInput";
+
+ public static final String MULTI_STRING = "StringInput";
+
+ public static final String MULTI_TEXTAREA = "TextAreaInput";
+
+ public static final String[] ACTIONS = {"Submit"};
+
+ public UISampleMultiValueInputSet() throws Exception
+ {
+ // UIFormUploadInput
+ addUIFormInput(makeMultiValueInputSet(MULTI_UPLOAD, UIFormUploadInput.class));
+
+ // UIFormDateTimeInput
+ addUIFormInput(makeMultiValueInputSet(MULTI_DATE, UIFormDateTimeInput.class));
+
+ // UIFormColorPicker
+ addUIFormInput(makeMultiValueInputSet(MULTI_COLOR, UIFormColorPicker.class));
+
+ // UIFormStringInput
+ addUIFormInput(makeMultiValueInputSet(MULTI_STRING, UIFormStringInput.class));
+
+ // UIFormTextAreaInput
+ addUIFormInput(makeMultiValueInputSet(MULTI_TEXTAREA, UIFormTextAreaInput.class));
+
+ setActions(ACTIONS);
+ }
+
+ @SuppressWarnings("unchecked")
+ private UIFormInput makeMultiValueInputSet(String name, Class<? extends
UIFormInputBase> type) throws Exception
+ {
+ UIFormMultiValueInputSet multiInput = new UIFormMultiValueInputSet(name, null);
+ multiInput.setType(type);
+ return multiInput;
+ }
+
+ static public class SubmitActionListener extends
EventListener<UISampleMultiValueInputSet>
+ {
+ @Override
+ public void execute(Event<UISampleMultiValueInputSet> event) throws
Exception
+ {
+ WebuiRequestContext rcontext = event.getRequestContext();
+ rcontext.getUIApplication().addMessage(makeMsg(event.getSource()));
+ }
+
+ @SuppressWarnings("unchecked")
+ private ApplicationMessage makeMsg(UISampleMultiValueInputSet uiForm)
+ {
+ StringBuilder msgBuild = new StringBuilder();
+
+ for (UIComponent child : uiForm.getChildren())
+ {
+ UIFormMultiValueInputSet multiInput = (UIFormMultiValueInputSet)child;
+
+ if (multiInput.getUIFormInputBase().equals(UIFormUploadInput.class))
+ {
+ makeUploadInputMsg(multiInput, msgBuild);
+ }
+ else if (multiInput.getUIFormInputBase().equals(UIFormDateTimeInput.class))
+ {
+ makeDateInputMsg(multiInput, msgBuild);
+ }
+ else
+ {
+ for (UIComponent multiInputChild : multiInput.getChildren())
+ {
+ msgBuild.append(" " +
((UIFormInputBase)multiInputChild).getValue());
+ }
+ }
+ msgBuild.append("<br/>");
+ }
+
+ return new ApplicationMessage(msgBuild.toString(), null);
+ }
+
+ private void makeDateInputMsg(UIFormMultiValueInputSet multiInput, StringBuilder
msgBuild)
+ {
+ for (UIComponent multiInputChild : multiInput.getChildren())
+ {
+ UIFormDateTimeInput dateInput = (UIFormDateTimeInput)multiInputChild;
+ Calendar calendar = dateInput.getCalendar();
+ if (calendar != null)
+ {
+ SimpleDateFormat dateFormat = new
SimpleDateFormat(dateInput.getDatePattern_());
+ msgBuild.append(" " +
dateFormat.format(dateInput.getCalendar().getTime()));
+ }
+ else
+ {
+ msgBuild.append("null");
+ }
+ }
+ }
+
+ private void makeUploadInputMsg(UIFormMultiValueInputSet multiInput, StringBuilder
msgBuild)
+ {
+ for (UIComponent multiInputChild : multiInput.getChildren())
+ {
+ UploadResource uploadResource =
((UIFormUploadInput)multiInputChild).getUploadResource();
+ if (uploadResource != null)
+ {
+ msgBuild.append(" " +
uploadResource.getFileName().replace(".", "*"));
+ }
+ else
+ {
+ msgBuild.append("null");
+ }
+ }
+ }
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISamplePopupMessage.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISamplePopupMessage.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISamplePopupMessage.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,31 @@
+package org.exoplatform.sample.webui.component;
+
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.application.portlet.PortletRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIPopupMessages;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+
+@ComponentConfig(template =
"app:/groovy/webui/component/UISamplePopupMessage.gtmpl", events =
{@EventConfig(listeners = UISamplePopupMessage.ShowPopupMessageActionListener.class)})
+public class UISamplePopupMessage extends UIContainer
+{
+ static public class ShowPopupMessageActionListener extends
EventListener<UISamplePopupMessage>
+ {
+
+ @Override
+ public void execute(Event<UISamplePopupMessage> event) throws Exception
+ {
+ int popupType =
Integer.parseInt(event.getRequestContext().getRequestParameter(OBJECTID));
+
+ UIPopupMessages uiPopupMessages =
+
((PortletRequestContext)WebuiRequestContext.getCurrentInstance()).getUIApplication().getUIPopupMessages();
+ uiPopupMessages.addMessage(new ApplicationMessage("Test Message",
null, popupType));
+ uiPopupMessages.setShow(true);
+ }
+
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISamplePortlet.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISamplePortlet.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISamplePortlet.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,38 @@
+package org.exoplatform.sample.webui.component;
+
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIPortletApplication;
+import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+
+/**
+ * Created by The eXo Platform SAS Author : Nguyen Duc Khoi
+ * khoi.nguyen(a)exoplatform.com Apr 28, 2010
+ */
+
+@ComponentConfig(lifecycle = UIApplicationLifecycle.class, template =
"app:/groovy/webui/component/UISamplePortlet.gtmpl", events =
{@EventConfig(listeners = UISamplePortlet.ClickSplitBarActionListener.class)})
+public class UISamplePortlet extends UIPortletApplication
+{
+ public UISamplePortlet() throws Exception
+ {
+ addChild(UISampleTOC.class, null, null);
+ addChild(UISampleContent.class, null, null);
+ }
+
+ public void showUIComponent(int nodeType)
+ {
+ getChild(UISampleContent.class).showUIComponent(nodeType);
+ }
+
+ public static class ClickSplitBarActionListener extends
EventListener<UISamplePortlet>
+ {
+ @Override
+ public void execute(Event<UISamplePortlet> event) throws Exception
+ {
+ UISampleTOC uiSampleTOC = event.getSource().getChild(UISampleTOC.class);
+ uiSampleTOC.setRendered(!uiSampleTOC.isRendered());
+ }
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleRepeater.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleRepeater.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleRepeater.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,89 @@
+package org.exoplatform.sample.webui.component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.commons.utils.ListAccessImpl;
+import org.exoplatform.sample.webui.component.bean.User;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIGrid;
+import org.exoplatform.webui.core.UIPageIterator;
+import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+
+@ComponentConfig(lifecycle = UIContainerLifecycle.class, events = {
+ @EventConfig(listeners = UISampleRepeater.ViewActionListener.class),
+ @EventConfig(listeners = UISampleRepeater.EditActionListener.class),
+ @EventConfig(listeners = UISampleRepeater.DeleteActionListener.class)})
+public class UISampleRepeater extends UIContainer
+{
+ public static final String BEAN_ID = "userName";
+
+ public static final String[] BEAN_NAMES = {BEAN_ID, "favoriteColor",
"position", "dateOfBirth"};
+
+ public static final String[] ACTIONS = {"View", "Edit",
"Delete"};
+
+ public UISampleRepeater() throws Exception
+ {
+ UIGrid uiRepeater = addChild(UIGrid.class, null, null);
+ uiRepeater.configure(BEAN_ID, BEAN_NAMES, ACTIONS);
+
+ UIPageIterator pageIterator = uiRepeater.getUIPageIterator();
+ pageIterator.setPageList(makeDataSource());
+ pageIterator.setParent(this);
+ }
+
+ public void showPopupMessage(String msg) {
+ WebuiRequestContext rcontext = WebuiRequestContext.getCurrentInstance();
+ rcontext.getUIApplication().addMessage(new ApplicationMessage(msg, null));
+ }
+
+ private LazyPageList<User> makeDataSource()
+ {
+ List<User> userList = makeUserList();
+ return new LazyPageList<User>(new ListAccessImpl<User>(User.class,
userList), 5);
+ }
+
+ private List<User> makeUserList()
+ {
+ List<User> userList = new ArrayList<User>();
+ for (int i = 0; i < 30; i++) {
+ userList.add(new User("user " + i, "color " + i,
"position " + i, new Date()));
+ }
+ return userList;
+ }
+
+ static public class ViewActionListener extends EventListener<UISampleRepeater>
+ {
+ @Override
+ public void execute(Event<UISampleRepeater> event) throws Exception
+ {
+ event.getSource().showPopupMessage("View " +
event.getRequestContext().getRequestParameter(OBJECTID));
+ }
+ }
+
+ static public class EditActionListener extends EventListener<UISampleRepeater>
+ {
+ @Override
+ public void execute(Event<UISampleRepeater> event) throws Exception
+ {
+ event.getSource().showPopupMessage("Edit " +
event.getRequestContext().getRequestParameter(OBJECTID));
+ }
+ }
+
+ static public class DeleteActionListener extends
EventListener<UISampleRepeater>
+ {
+ @Override
+ public void execute(Event<UISampleRepeater> event) throws Exception
+ {
+ event.getSource().showPopupMessage("Delete " +
event.getRequestContext().getRequestParameter(OBJECTID));
+ }
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleRightClickPopupMenu.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleRightClickPopupMenu.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleRightClickPopupMenu.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,44 @@
+package org.exoplatform.sample.webui.component;
+
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.ComponentConfigs;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIRightClickPopupMenu;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+
+@ComponentConfigs({
+ @ComponentConfig(template =
"app:/groovy/webui/component/UISampleRightClickPopupMenu.gtmpl"),
+ @ComponentConfig(id = "UISamplePopupMenu", type =
UIRightClickPopupMenu.class, template =
"system:/groovy/webui/core/UIRightClickPopupMenu.gtmpl", events = {
+ @EventConfig(listeners =
UISampleRightClickPopupMenu.SayHelloActionListener.class),
+ @EventConfig(listeners =
UISampleRightClickPopupMenu.SayGoodByeActionListener.class)})})
+public class UISampleRightClickPopupMenu extends UIContainer
+{
+
+ public UISampleRightClickPopupMenu() throws Exception
+ {
+ UIRightClickPopupMenu popup = addChild(UIRightClickPopupMenu.class,
"UISamplePopupMenu", null).setRendered(true);
+ popup.setActions(new String[]{"SayHello", "SayGoodBye"});
+ }
+
+ static public class SayHelloActionListener extends
EventListener<UISampleRightClickPopupMenu>
+ {
+
+ @Override
+ public void execute(Event<UISampleRightClickPopupMenu> event) throws
Exception
+ {
+ System.out.println("Hello");
+ }
+ }
+
+ static public class SayGoodByeActionListener extends
EventListener<UISampleRightClickPopupMenu>
+ {
+
+ @Override
+ public void execute(Event<UISampleRightClickPopupMenu> event) throws
Exception
+ {
+ System.out.println("GoodBye");
+ }
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleTOC.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleTOC.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleTOC.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not,
see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.sample.webui.component;
+
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+
+/**
+ * Created by The eXo Platform SAS Author : Nguyen Duc Khoi
+ * khoi.nguyen(a)exoplatform.com Mar 12, 2010
+ */
+
+@ComponentConfig(template = "app:/groovy/webui/component/UISampleTOC.gtmpl",
events = {@EventConfig(listeners = UISampleTOC.ClickNodeActionListener.class)})
+public class UISampleTOC extends UIContainer
+{
+
+ public static class ClickNodeActionListener extends EventListener<UISampleTOC>
+ {
+ @Override
+ public void execute(Event<UISampleTOC> event) throws Exception
+ {
+ int nodeType = -1;
+ try
+ {
+ nodeType =
Integer.valueOf(event.getRequestContext().getRequestParameter(OBJECTID));
+ }
+ catch (Exception ex)
+ {
+ }
+
+ ((UISamplePortlet)event.getSource().getParent()).showUIComponent(nodeType);
+ }
+ }
+
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleUIForm.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleUIForm.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleUIForm.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,261 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not,
see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.sample.webui.component;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.core.model.SelectItemOption;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormCheckBoxInput;
+import org.exoplatform.webui.form.UIFormDateTimeInput;
+import org.exoplatform.webui.form.UIFormInput;
+import org.exoplatform.webui.form.UIFormInputSet;
+import org.exoplatform.webui.form.UIFormInputWithActions;
+import org.exoplatform.webui.form.UIFormRadioBoxInput;
+import org.exoplatform.webui.form.UIFormSelectBox;
+import org.exoplatform.webui.form.UIFormStringInput;
+import org.exoplatform.webui.form.UIFormTextAreaInput;
+import org.exoplatform.webui.form.UIFormInputWithActions.ActionData;
+import org.exoplatform.webui.form.ext.UIFormColorPicker;
+import org.exoplatform.webui.form.validator.MandatoryValidator;
+
+/**
+ * Created by The eXo Platform SAS Author : Nguyen Duc Khoi
+ * khoi.nguyen(a)exoplatform.com Mar 12, 2010
+ */
+
+@ComponentConfig(lifecycle = UIFormLifecycle.class, template =
"system:/groovy/webui/form/UIFormWithTitle.gtmpl", events = {
+ @EventConfig(listeners = UISampleUIForm.SearchUserActionListener.class),
+ @EventConfig(listeners = UISampleUIForm.SaveActionListener.class),
+ @EventConfig(listeners = UISampleUIForm.ResetActionListener.class)})
+public class UISampleUIForm extends UIForm
+{
+ private final static String[] ACTIONS = {"Save", "Reset"};
+
+ public static final String USERNAME = "userName";
+
+ public static final String PASSWORD = "password";
+
+ public static final String FAVORITE_COLOR = "favoriteColor";
+
+ public static final String POSITION = "position";
+
+ public static final String RECEIVE_EMAIL = "receiveEmail";
+
+ public static final String GENDER = "gender";
+
+ private static final String DATE_OF_BIRTH = "dateOfBirth";
+
+ private static final String DESCRIPTION = "description";
+
+ private List<String> userNames = new ArrayList<String>();
+
+ public UISampleUIForm() throws Exception
+ {
+ addUIFormInput(makeUIFormInputWithActions());
+ setActions(ACTIONS);
+ }
+
+ private UIFormInputWithActions makeUIFormInputWithActions() throws Exception
+ {
+ UIFormInputWithActions inputSet = new UIFormInputWithActions();
+ addUIComponentToSet(inputSet);
+
+ List<ActionData> searchUserAction = makeSearchUserActionData();
+ inputSet.setActionField(USERNAME, searchUserAction);
+
+ return inputSet;
+ }
+
+ private void addUIComponentToSet(UIFormInputWithActions inputSet) throws Exception
+ {
+ inputSet.addUIFormInput(new UIFormStringInput(USERNAME, null,
null).addValidator(MandatoryValidator.class));
+ inputSet.addUIFormInput(new UIFormStringInput(PASSWORD, null,
null).setType(UIFormStringInput.PASSWORD_TYPE));
+ inputSet.addUIFormInput(new UIFormColorPicker(FAVORITE_COLOR, null,
UIFormColorPicker.Colors.N_RED));
+ inputSet.addUIFormInput(new UIFormRadioBoxInput(GENDER, "Male",
makeRadioOptions())
+ .addValidator(MandatoryValidator.class));
+ inputSet.addUIFormInput(new UIFormDateTimeInput(DATE_OF_BIRTH, null, new Date()));
+ inputSet.addUIFormInput(new UIFormTextAreaInput(DESCRIPTION, null, ""));
+
+ List<SelectItemOption<String>> selectItemOptions =
makeSelectItemOptions();
+ inputSet.addUIFormInput(new UIFormSelectBox(POSITION, null, selectItemOptions));
+ inputSet.addUIFormInput(new UIFormCheckBoxInput<String>(RECEIVE_EMAIL, null,
"test"));
+ }
+
+ private List<SelectItemOption<String>> makeRadioOptions()
+ {
+ List<SelectItemOption<String>> selectItemOptions = new
ArrayList<SelectItemOption<String>>();
+ selectItemOptions.add(new SelectItemOption<String>("Male"));
+ selectItemOptions.add(new SelectItemOption<String>("Female"));
+ return selectItemOptions;
+ }
+
+ private List<SelectItemOption<String>> makeSelectItemOptions()
+ {
+ List<SelectItemOption<String>> selectItemOptions = new
ArrayList<SelectItemOption<String>>();
+ selectItemOptions.add(new SelectItemOption<String>("Boss"));
+ selectItemOptions.add(new SelectItemOption<String>("Employee"));
+ return selectItemOptions;
+ }
+
+ private List<ActionData> makeSearchUserActionData()
+ {
+ List<ActionData> actions = new ArrayList<ActionData>();
+ ActionData searchUser = new ActionData();
+ searchUser.setActionListener("SearchUser");
+ searchUser.setActionType(ActionData.TYPE_ICON);
+ searchUser.setActionName("SearchUser");
+ searchUser.setCssIconClass("SearchIcon");
+ actions.add(searchUser);
+ return actions;
+ }
+
+ public boolean isUserExist(String userName)
+ {
+ return userNames.contains(userName);
+ }
+
+ public void saveUser(String userName)
+ {
+ userNames.add(userName);
+ }
+
+ static public class SearchUserActionListener extends
EventListener<UISampleUIForm>
+ {
+
+ @Override
+ public void execute(Event<UISampleUIForm> event) throws Exception
+ {
+ WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+ UIApplication uiApp = context.getUIApplication();
+
+ UISampleUIForm uiForm = event.getSource();
+ String inputUserName = uiForm.getUIStringInput(USERNAME).getValue().trim();
+ String[] i18nParams = new String[]{inputUserName};
+
+ if (inputUserName.equals(""))
+ {
+ uiApp.addMessage(new
ApplicationMessage("UISampleUIForm.msg.empty-input", null,
ApplicationMessage.ERROR));
+ }
+ else if (uiForm.isUserExist(inputUserName))
+ {
+ uiApp.addMessage(new
ApplicationMessage("UISampleUIForm.msg.user-exist", i18nParams,
+ ApplicationMessage.WARNING));
+ }
+ else
+ {
+ uiApp.addMessage(new
ApplicationMessage("UISampleUIForm.msg.user-not-exist", i18nParams,
+ ApplicationMessage.INFO));
+ }
+ }
+ }
+
+ static public class SaveActionListener extends EventListener<UISampleUIForm>
+ {
+
+ @Override
+ public void execute(Event<UISampleUIForm> event) throws Exception
+ {
+ WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+ UIApplication uiApp = context.getUIApplication();
+
+ UISampleUIForm uiForm = event.getSource();
+ String inputUserName = uiForm.getUIStringInput(USERNAME).getValue();
+ String[] i18nParams = new String[]{inputUserName};
+
+ if (uiForm.isUserExist(inputUserName))
+ {
+ uiApp.addMessage(new
ApplicationMessage("UISampleUIForm.msg.user-exist", i18nParams,
+ ApplicationMessage.WARNING));
+ }
+ else
+ {
+ uiForm.saveUser(inputUserName);
+ uiApp.addMessage(new
ApplicationMessage("UISampleUIForm.msg.user-saved", i18nParams,
+ ApplicationMessage.INFO));
+ }
+
+ String traceMsg = makeTraceMsg(event);
+ uiApp.addMessage(new ApplicationMessage(traceMsg, null,
ApplicationMessage.INFO));
+ }
+
+ private String makeTraceMsg(Event<UISampleUIForm> event) throws Exception
+ {
+ UISampleUIForm uiForm = event.getSource();
+ String userName = uiForm.getUIStringInput(USERNAME).getValue();
+ String password = uiForm.getUIStringInput(PASSWORD).getValue();
+ boolean receiveEmail =
uiForm.getUIFormCheckBoxInput(RECEIVE_EMAIL).isChecked();
+ String favoriteColor = (String)uiForm.getUIInput(FAVORITE_COLOR).getValue();
+ String position = (String)uiForm.getUIInput(POSITION).getValue();
+ String gender = (String)uiForm.getUIInput(GENDER).getValue();
+
+ UIFormDateTimeInput dateInput = uiForm.getUIFormDateTimeInput(DATE_OF_BIRTH);
+ SimpleDateFormat dateFormat = new
SimpleDateFormat(dateInput.getDatePattern_());
+ Calendar calendar = dateInput.getCalendar();
+ String dateOfBirth = calendar == null ? null :
dateFormat.format(calendar.getTime());
+
+
+ StringBuilder strBuilder = new StringBuilder();
+ strBuilder.append(userName);
+ strBuilder.append("<br/>");
+ strBuilder.append(password);
+ strBuilder.append("<br/>");
+ strBuilder.append(favoriteColor);
+ strBuilder.append("<br/>");
+ strBuilder.append(gender);
+ strBuilder.append("<br/>");
+ strBuilder.append(dateOfBirth);
+ strBuilder.append("<br/>");
+ strBuilder.append(position);
+ strBuilder.append("<br/>");
+ strBuilder.append(receiveEmail);
+ return strBuilder.toString();
+ }
+ }
+
+ static public class ResetActionListener extends EventListener<UISampleUIForm>
+ {
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void execute(Event<UISampleUIForm> event) throws Exception
+ {
+ UIFormInputSet inputSet = event.getSource().getChild(UIFormInputSet.class);
+ for (UIComponent child : inputSet.getChildren())
+ {
+ if (child instanceof UIFormColorPicker)
+ {
+ continue;
+ }
+ ((UIFormInput)child).reset();
+ }
+ }
+ }
+}
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleVirtualList.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleVirtualList.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/UISampleVirtualList.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,90 @@
+package org.exoplatform.sample.webui.component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.commons.utils.ListAccessImpl;
+import org.exoplatform.sample.webui.component.bean.User;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIRepeater;
+import org.exoplatform.webui.core.UIVirtualList;
+import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+
+@ComponentConfig(lifecycle = UIContainerLifecycle.class, events = {
+ @EventConfig(listeners = UISampleVirtualList.ViewActionListener.class),
+ @EventConfig(listeners = UISampleVirtualList.EditActionListener.class),
+ @EventConfig(listeners = UISampleVirtualList.DeleteActionListener.class)})
+public class UISampleVirtualList extends UIContainer
+{
+ public static final String BEAN_ID = "userName";
+
+ public static final String[] BEAN_NAMES = {BEAN_ID, "favoriteColor",
"position", "dateOfBirth"};
+
+ public static final String[] ACTIONS = {"View", "Edit",
"Delete"};
+
+ public UISampleVirtualList() throws Exception
+ {
+ UIRepeater uiRepeater = createUIComponent(UIRepeater.class, null, null);
+ uiRepeater.configure(BEAN_ID, BEAN_NAMES, ACTIONS);
+ uiRepeater.setDataSource(makeDataSource());
+
+ UIVirtualList uiVirtualList = addChild(UIVirtualList.class, null, null);
+ uiVirtualList.setUIComponent(uiRepeater);
+ }
+
+ public void showPopupMessage(String msg) {
+ WebuiRequestContext rcontext = WebuiRequestContext.getCurrentInstance();
+ rcontext.getUIApplication().addMessage(new ApplicationMessage(msg, null));
+ }
+
+ private LazyPageList<User> makeDataSource()
+ {
+ List<User> userList = makeUserList();
+ return new LazyPageList<User>(new ListAccessImpl<User>(User.class,
userList), 5);
+ }
+
+ private List<User> makeUserList()
+ {
+ List<User> userList = new ArrayList<User>();
+ for (int i = 0; i < 30; i++) {
+ userList.add(new User("user " + i, "color " + i,
"position " + i, new Date()));
+ }
+ return userList;
+ }
+
+ static public class ViewActionListener extends
EventListener<UISampleVirtualList>
+ {
+ @Override
+ public void execute(Event<UISampleVirtualList> event) throws Exception
+ {
+ event.getSource().showPopupMessage("View " +
event.getRequestContext().getRequestParameter(OBJECTID));
+ }
+ }
+
+ static public class EditActionListener extends
EventListener<UISampleVirtualList>
+ {
+ @Override
+ public void execute(Event<UISampleVirtualList> event) throws Exception
+ {
+ event.getSource().showPopupMessage("Edit " +
event.getRequestContext().getRequestParameter(OBJECTID));
+ }
+ }
+
+ static public class DeleteActionListener extends
EventListener<UISampleVirtualList>
+ {
+ @Override
+ public void execute(Event<UISampleVirtualList> event) throws Exception
+ {
+ event.getSource().showPopupMessage("Delete " +
event.getRequestContext().getRequestParameter(OBJECTID));
+ }
+ }
+}
+
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/bean/User.java
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/bean/User.java
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/java/org/exoplatform/sample/webui/component/bean/User.java 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,71 @@
+package org.exoplatform.sample.webui.component.bean;
+
+import java.util.Date;
+
+public class User
+{
+ private String userName;
+
+ private String password;
+
+ private String favoriteColor;
+
+ private String position;
+
+ private boolean receiveEmail;
+
+ private String gender;
+
+ private Date dateOfBirth;
+
+ private String description;
+
+ public User(String userName, String favoriteColor, String position, Date dateOfBirth)
+ {
+ super();
+ this.userName = userName;
+ this.favoriteColor = favoriteColor;
+ this.position = position;
+ this.dateOfBirth = dateOfBirth;
+ }
+
+ public String getUserName()
+ {
+ return userName;
+ }
+
+ public void setUserName(String userName)
+ {
+ this.userName = userName;
+ }
+
+ public String getFavoriteColor()
+ {
+ return favoriteColor;
+ }
+
+ public void setFavoriteColor(String favoriteColor)
+ {
+ this.favoriteColor = favoriteColor;
+ }
+
+ public String getPosition()
+ {
+ return position;
+ }
+
+ public void setPosition(String position)
+ {
+ this.position = position;
+ }
+
+ public Date getDateOfBirth()
+ {
+ return dateOfBirth;
+ }
+
+ public void setDateOfBirth(Date dateOfBirth)
+ {
+ this.dateOfBirth = dateOfBirth;
+ }
+}
\ No newline at end of file
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/classes/locale/portlet/web/UISamplePortlet_en.properties
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/classes/locale/portlet/web/UISamplePortlet_en.properties
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/classes/locale/portlet/web/UISamplePortlet_en.properties 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2009 eXo Platform SAS.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+#
+
+UISampleContent.UIPopupMessage.msg=Hello {0}
+
+UISampleUIForm.action.Save=Save
+UISampleUIForm.action.Reset=Reset
+UISampleUIForm.label.userName=User Name
+UISampleUIForm.label.password=Password
+UISampleUIForm.label.favoriteColor=Favorite Color
+UISampleUIForm.label.position=Position
+UISampleUIForm.label.receiveEmail=Receive Email
+UISampleUIForm.label.gender=Gender
+UISampleUIForm.label.dateOfBirth=Date Of Birth
+UISampleUIForm.label.description=Description
+
+UISampleUIForm.title=This is sample
+UISampleUIForm.msg.empty-input=please enter username
+UISampleUIForm.msg.user-exist={0} is currently in-used
+UISampleUIForm.msg.user-not-exist={0} is available
+UISampleUIForm.msg.user-saved={0} is saved
+
+UISampleMultiValueInputSet.title=UIFormMultivalueInputSet sample
+UISampleMultiValueInputSet.action.Save=Save
+UISampleMultiValueInputSet.action.Reset=Reset
+
+UISamplePopupMenu.event.SayHello=Say Hello
+UISamplePopupMenu.event.SayGoodBye=Say GoodBye
\ No newline at end of file
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/conf/sample/webui/configuration.xml
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/conf/sample/webui/configuration.xml
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/conf/sample/webui/configuration.xml 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,33 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<webui-configuration>
+ <annotation-classes>
+ </annotation-classes>
+
+ <application>
+
<ui-component-root>org.exoplatform.sample.webui.component.UISamplePortlet</ui-component-root>
+
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
+ <application-lifecycle-listeners>
+
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
+ </application-lifecycle-listeners>
+ </application>
+</webui-configuration>
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/gatein-resources.xml
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/gatein-resources.xml 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<gatein-resources
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0
http://www.gatein.org/xml/ns/gatein_resources_1_0"
+
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
+
+ <!-- Skin sample -->
+ <portlet-skin>
+ <application-name>samplePortlets</application-name>
+ <portlet-name>UISamplePortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/webui/component/UISamplePortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+</gatein-resources>
\ No newline at end of file
Modified: portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/portlet.xml
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/portlet.xml 2010-05-18
02:44:21 UTC (rev 3108)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/WEB-INF/portlet.xml 2010-05-18
05:06:24 UTC (rev 3109)
@@ -1,139 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<portlet-app version="1.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2...
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
- <portlet>
- <description xml:lang="EN">Sample FCK Editor
Portlet</description>
- <portlet-name>SampleFCKPortlet</portlet-name>
- <display-name>Sample FCK Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/sample/fck/FCKPortlet/webui/configuration.xml</value>
- </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>edit</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portal.webui</resource-bundle>
- <portlet-info>
- <title>Sample FCK Editor Portlet</title>
- <short-title>FCK Editor Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Sample Lazy Tab Pane
Portlet</description>
- <portlet-name>LazyTabPanePortlet</portlet-name>
- <display-name>LazyTabPanePortlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/sample/lazytabpane/webui/configuration.xml</value>
- </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>edit</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portal.webui</resource-bundle>
- <portlet-info>
- <title>Sample Lazy Tab Pane Portlet</title>
- <short-title>Lazy Tab Pane Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Sample CS Input Portlet</description>
- <portlet-name>UICSInputPortlet</portlet-name>
- <display-name>CS Input Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/sample/csinput/webui/configuration.xml</value>
- </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>edit</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portal.webui</resource-bundle>
- <portlet-info>
- <title>CS Input Portlet</title>
- <short-title>CS Input Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Sample Virtual List
Portlet</description>
- <portlet-name>UIVirtualListPortlet</portlet-name>
- <display-name>Sample Virtual List Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/sample/virtuallist/webui/configuration.xml</value>
- </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>edit</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portal.webui</resource-bundle>
- <portlet-info>
- <title>Sample Virtual List Portlet</title>
- <short-title>Sample Virtual List Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
-
- <portlet>
- <description xml:lang="EN">Sample Download Upload
Portlet</description>
- <portlet-name>UIDownloadUploadPortlet</portlet-name>
- <display-name>Sample Download Upload Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/sample/downloadupload/webui/configuration.xml</value>
- </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>edit</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portal.webui</resource-bundle>
- <portlet-info>
- <title>Sample Download Upload Portlet</title>
- <short-title>Sample Download Upload Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
- <security-role-ref>
- <role-name>admin</role-name>
- <role-link>admin</role-link>
- </security-role-ref>
- </portlet>
-</portlet-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app version="1.0"
+
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1...
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+ <portlet>
+ <description xml:lang="EN">Sample WebUI</description>
+ <portlet-name>UISamplePortlet</portlet-name>
+ <display-name xml:lang="EN">Sample WebUI</display-name>
+ <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+
+ <init-param>
+ <name>webui.configuration</name>
+ <value>/WEB-INF/conf/sample/webui/configuration.xml</value>
+ </init-param>
+
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <resource-bundle>locale.portlet.web.UISamplePortlet</resource-bundle>
+ <portlet-info>
+ <title>Sample WebUI</title>
+ <short-title>Sample WebUI</short-title>
+ <keywords>Sample</keywords>
+ </portlet-info>
+ </portlet>
+</portlet-app>
\ No newline at end of file
Deleted:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UICSInputForm.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UICSInputForm.gtmpl 2010-05-18
02:44:21 UTC (rev 3108)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UICSInputForm.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -1,78 +0,0 @@
-<%
-import java.util.Iterator;
-import java.util.Map.Entry
-String fieldName;
-%>
-<div class="UIForm $uicomponent.id">
- <%uiform.begin()%>
- <div class="HorizontalLayout">
- <div class="FormContainer">
- <table class="UIFormGrid">
- <%
- for(field in uiform.getChildren()) {
- if(field.isRendered()) {
- %>
- <tr>
- <%fieldName = uicomponent.getLabel(field.getName());%>
- <%//TODO: Tung.Pham modified
- //if(!fieldName.equals(uicomponent.getId())) {
- if(fieldName != null && fieldName.length() > 0 &&
!fieldName.equals(uicomponent.getId())) {
- %>
- <td class="FieldLabel">
- <%/*if(fieldName != null && fieldName.length() > 0)
{*/%>
- <%=uicomponent.getLabel(field.getName()) %>
- <%/*}*/%>
- </td>
- <td class="FieldComponent"><%
uiform.renderField(field) %></td>
- <%} else {%>
- <td class="FieldComponent" colspan="2"><%
uiform.renderField(field) %></td>
- <%}%>
- </tr>
- <%
- }
- }
- %>
- </table>
- <div class="UIAction">
- <table class="ActionContainer">
- <tr>
- <td>
- <% for(action in uicomponent.getActions()) {
- String actionLabel = _ctx.appRes(uicomponent.getName() +
".action." + action) ;
- String link = uicomponent.event(action) ;
- %>
- <div onclick="$link" class="ActionButton
LightBlueStyle" onmouseover="this.style.color = '#058ee6'"
onmouseout="this.style.color='black'">
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <a
href="javascript:void(0);">$actionLabel</a>
- </div>
- </div>
- </div>
- </div>
- <%}%>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <%uiform.end()%>
- <div class="Preferences" style="border: 1px solid #b7b7b7; padding:
10px; margin: 10px; background: #f7f7f7">
- <table class="UIGrid" style="width: 99%">
- <tr>
- <th colspan="2">Results</th>
- </tr>
- <%
- Iterator<Entry<String, String>> itr =
uiform.data.entrySet().iterator();
- while(itr.hasNext()) {
- Entry<String, String> entry = itr.next();
- %>
- <tr>
- <td width="30%"><%= entry.getKey() %></td>
- <td width="30%"><%= entry.getValue() %></td>
- </tr>
- <%}%>
- </table>
- </div>
-</div>
\ No newline at end of file
Deleted:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UIDownloadUpload.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UIDownloadUpload.gtmpl 2010-05-18
02:44:21 UTC (rev 3108)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UIDownloadUpload.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -1,76 +0,0 @@
-<%
-String fieldName;
-downloadLink = uicomponent.getDownloadLink();
-fileName = uicomponent.getFileName();
-inputName = uicomponent.getInputName();
-%>
-<div id="UIDownloadUpload">
- <div class="UIForm $uicomponent.id">
- <%uiform.begin()%>
- <div class="HorizontalLayout">
- <div class="FormContainer">
- <table class="UIFormGrid">
- <%
- for(field in uiform.getChildren()) {
- if(field.isRendered()) {
- %>
- <tr>
- <%fieldName = uicomponent.getLabel(field.getName());%>
- <%
- if(fieldName != null && fieldName.length() > 0 &&
!fieldName.equals(uicomponent.getId())) {
- %>
- <td class="FieldLabel">
- <%/*if(fieldName != null && fieldName.length() > 0)
{*/%>
- <%=uicomponent.getLabel(field.getName()) %>
- <%/*}*/%>
- </td>
- <td class="FieldComponent"><%
uiform.renderField(field) %></td>
- <%} else {%>
- <td class="FieldComponent" colspan="2"><%
uiform.renderField(field) %></td>
- <%}%>
- </tr>
-
- <%
- }
- }
- %>
- <%if (downloadLink != null){ %>
- <%for(index=0;index<=2;index++) { %>
- <%if (downloadLink[index] != null){ %>
- <tr>
- <td>
- Download from [<%= inputName[index] %>] upload input:<a
href="<%= downloadLink[index] %>" style="color:red"><%=
fileName[index] %></a>
- </td>
- </tr>
- <% }
- }
- } %>
- <tr>
- <td>
- <div class="UIAction">
- <table class="ActionContainer">
- <tr>
- <td>
-
- <div onclick="<%=uicomponent.event("Submit")%>"
class="ActionButton LightBlueStyle" onmouseover="this.style.color =
'#058ee6'" onmouseout="this.style.color='black'">
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <a href="javascript:void(0);">Save</a>
- </div>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
-
- </div>
- </div>
- <%uiform.end()%>
- </div>
-</div>
\ No newline at end of file
Deleted:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UILazyTabPaneInputSet.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UILazyTabPaneInputSet.gtmpl 2010-05-18
02:44:21 UTC (rev 3108)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UILazyTabPaneInputSet.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -1,38 +0,0 @@
-<%
-String fieldName;
-%>
-<div class="UIForm $uicomponent.id">
- <%uiform.begin()%>
- <div class="HorizontalLayout">
- <div class="FormContainer">
- <table class="UIFormGrid">
- <%
- for(field in uiform.getChildren()) {
- if(field.isRendered()) {
- %>
- <tr>
- <%fieldName = uicomponent.getLabel(field.getName());%>
- <%
- if(fieldName != null && fieldName.length() > 0 &&
!fieldName.equals(uicomponent.getId())) {
- %>
- <td class="FieldLabel">
- <%/*if(fieldName != null && fieldName.length() > 0)
{*/%>
- <%=uicomponent.getLabel(field.getName()) %>
- <%/*}*/%>
- </td>
- <td class="FieldComponent"><%
uiform.renderField(field) %></td>
- <%} else {%>
- <td class="FieldComponent" colspan="2"><%
uiform.renderField(field) %></td>
- <%}%>
- </tr>
- <%
- }
- }
- %>
- </table>
- </div>
- </div>
- <%uiform.end()%>
-
- </div>
-</div>
\ No newline at end of file
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleDownloadUpload.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleDownloadUpload.gtmpl
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleDownloadUpload.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,76 @@
+<%
+String fieldName;
+downloadLink = uicomponent.getDownloadLink();
+fileName = uicomponent.getFileName();
+inputName = uicomponent.getInputName();
+%>
+<div id="UIDownloadUpload" style="margin-top: 100px;">
+ <div class="UIForm $uicomponent.id">
+ <%uiform.begin()%>
+ <div class="HorizontalLayout">
+ <div class="FormContainer">
+ <table class="UIFormGrid">
+ <%
+ for(field in uiform.getChildren()) {
+ if(field.isRendered()) {
+ %>
+ <tr>
+ <%fieldName = uicomponent.getLabel(field.getName());%>
+ <%
+ if(fieldName != null && fieldName.length() > 0 &&
!fieldName.equals(uicomponent.getId())) {
+ %>
+ <td class="FieldLabel">
+ <%/*if(fieldName != null && fieldName.length() > 0)
{*/%>
+ <%=uicomponent.getLabel(field.getName()) %>
+ <%/*}*/%>
+ </td>
+ <td class="FieldComponent"><%
uiform.renderField(field) %></td>
+ <%} else {%>
+ <td class="FieldComponent" colspan="2"><%
uiform.renderField(field) %></td>
+ <%}%>
+ </tr>
+
+ <%
+ }
+ }
+ %>
+ <%if (downloadLink != null){ %>
+ <%for(index=0;index<=2;index++) { %>
+ <%if (downloadLink[index] != null){ %>
+ <tr>
+ <td>
+ Download from [<%= inputName[index] %>] upload input:<a
href="<%= downloadLink[index] %>" style="color:red"><%=
fileName[index] %></a>
+ </td>
+ </tr>
+ <% }
+ }
+ } %>
+ <tr>
+ <td>
+ <div class="UIAction">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+
+ <div onclick="<%=uicomponent.event("Submit")%>"
class="ActionButton LightBlueStyle" onmouseover="this.style.color =
'#058ee6'" onmouseout="this.style.color='black'">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a href="javascript:void(0);">Save</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ </div>
+ <%uiform.end()%>
+ </div>
+</div>
\ No newline at end of file
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISamplePopupMessage.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISamplePopupMessage.gtmpl
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISamplePopupMessage.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,36 @@
+<%
+ import org.exoplatform.web.application.ApplicationMessage;
+%>
+<div class="UIToolbar" style="margin-top: 150px;">
+ <div class="LargeToolbar">
+ <div class="ToolbarContainer">
+ <div class="LeftToolbar">
+ <div class="RightToolbar">
+ <div class="MiddleToolbar">
+ <div class="ManagementIconContainer">
+ <%
+ style = "SelectButtonLabel";
+ %>
+ <a class="UserButton"
href="<%=uicomponent.event("ShowPopupMessage",
String.valueOf(ApplicationMessage.INFO))%>">
+ <div
class="UserManagementIcon"><span></span></div>
+ <div class="$style" style="text-align:
center;">Infomation</div>
+ </a>
+ <div
class="HorizontalSeparator"><span></span></div>
+ <a class="GroupButton"
href="<%=uicomponent.event("ShowPopupMessage",
String.valueOf(ApplicationMessage.WARNING))%>">
+ <div
class="GroupManagementIcon"><span></span></div>
+ <div class="$style" style="text-align:
center;">Warning</div>
+ </a>
+ <div
class="HorizontalSeparator"><span></span></div>
+ <a class="MembershipButton"
href="<%=uicomponent.event("ShowPopupMessage",
String.valueOf(ApplicationMessage.ERROR))%>" style="width: 120px;">
+ <div
class="MembershipManagementIcon"><span></span></div>
+ <div class="$style" style="text-align:
center;">Error</div>
+ </a>
+ <div
class="HorizontalSeparator"><span></span></div>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISamplePortlet.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISamplePortlet.gtmpl
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISamplePortlet.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,30 @@
+<div id="<%=uicomponent.id%>">
+ <table>
+ <tr>
+ <%
+ import org.exoplatform.sample.webui.component.UISampleTOC;
+ import org.exoplatform.sample.webui.component.UISampleContent;
+ import org.exoplatform.webui.core.UIPopupMessages;
+
+ UISampleTOC uiSampleTOC = uicomponent.getChild(UISampleTOC.class);
+ if (uiSampleTOC.isRendered())
+ {
+ print("<td style=\"width: 260px;\">");
+ uiSampleTOC.processRender(_ctx.getRequestContext());
+ print("</td>");
+ }
+ %>
+ <td width="8px" bgcolor="green" style="cursor:
pointer;"
+ onclick="<%=uicomponent.event("ClickSplitBar")%>"> </td>
+ <td valign="middle" align="center">
+ <%
+ uicomponent.renderChild(UISampleContent.class);
+ %>
+ </td>
+ </tr>
+ </table>
+ <%
+ UIPopupMessages uiPopupMessages = uicomponent.getUIPopupMessages();
+ uiPopupMessages.processRender(_ctx.getRequestContext());
+ %>
+</div>
Deleted:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleResourcesBrowser.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleResourcesBrowser.gtmpl 2010-05-18
02:44:21 UTC (rev 3108)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleResourcesBrowser.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -1,4 +0,0 @@
-<div id="<%=uicomponent.getId();%>">
- <% uicomponent.loadResources();
- uicomponent.renderChildren(); %>
-</div>
\ No newline at end of file
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleRightClickPopupMenu.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleRightClickPopupMenu.gtmpl
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleRightClickPopupMenu.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,25 @@
+<%
+ import org.exoplatform.webui.core.UIRightClickPopupMenu ;
+ import org.exoplatform.web.application.JavascriptManager;
+
+ UIRightClickPopupMenu uiPopupMenu = uicomponent.getChild(UIRightClickPopupMenu.class);
+ String popupMenu = "";
+%>
+<div id="<%=uicomponent.getId() %>" style="margin-top:
100px;">
+<%
+ if(uiPopupMenu != null && uiPopupMenu.isRendered()) {
+ String id = uicomponent.getParent().getId();
+
+ JavascriptManager jsmanager = _ctx.getRequestContext().getJavascriptManager();
+ jsmanager.importJavascript('eXo.webui.UIRightClickPopupMenu') ;
+ popupMenu = uiPopupMenu.getJSOnclickShowPopup("",
"SayHello,SayGoodBye");
+
jsmanager.addJavascript("eXo.webui.UIRightClickPopupMenu.disableContextMenu('"+id+"')
;");
+ uicomponent.renderUIComponent(uiPopupMenu) ;
+ }
+%>
+ <div class="UIForm $uicomponent.id">
+ <div class="HorizontalLayout">
+ <div class="FormContainer" style="text-align: center;font-size:
18px;" $popupMenu>Right Click On Me</div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleTOC.gtmpl
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleTOC.gtmpl
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/groovy/webui/component/UISampleTOC.gtmpl 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,97 @@
+<%
+ import org.exoplatform.web.application.JavascriptManager;
+ import org.exoplatform.sample.webui.component.UISampleContent;
+
+ def rContext = _ctx.getRequestContext();
+ JavascriptManager jsmanager = rContext.getJavascriptManager();
+ jsmanager.importJavascript("eXo.portal.UIPortal");
+ %>
+
+
+ <%uicomponent.renderChildren(); %>
+
+<div class="SampleWebUI" style="width: 260px;">
+ <div class="CollapseIcon ClearFix"
onclick="eXo.portal.UIPortal.collapseExpand(this);">
+ <a class='NodeIcon DefaultPageIcon'
href='javascript:void(0);'>WebUI Demo</a>
+ </div>
+ <div class="ChildrenContainer">
+ <div class="Node ClearFix">
+ <div class="">
+ <div class="ClearFix">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_UIFORM))%>">UIForm</a><br>
+ </div>
+ <div class="ChildrenContainer" style="display:block;">
+ <div class="Node ClearFix LastNode">
+ <div class="NullItem">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_MULTIVALUE_INPUTSET))%>">UIFormMultiValueInputSet</a><br>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="Node ClearFix">
+ <div class="">
+ <div class="ClearFix">
+ <div class="CollapseIcon ClearFix"
onclick="eXo.portal.UIPortal.collapseExpand(this);">
+ <a class="NodeIcon DefaultPageIcon"
href=#>UIPopup</a><br>
+ </div>
+ <div class="ChildrenContainer" style="display:block;">
+ <div class="Node ClearFix">
+ <div class="NullItem">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_UIPOPUPMESSAGE))%>">UIPopupMessage</a><br>
+ </div>
+ </div>
+ </div>
+ <div class="Node ClearFix LastNode">
+ <div class="NullItem">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_UIPOPUPCONFIRM))%>">UIPopupConfirm</a><br>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="Node ClearFix">
+ <div class="NullItem">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_LAZYTABPANE))%>">UILazyTabPane</a><br>
+ </div>
+ </div>
+ </div>
+ <div class="Node ClearFix">
+ <div class="NullItem">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_REPEATER))%>">UIRepeater</a><br>
+ </div>
+ </div>
+ </div>
+ <div class="Node ClearFix">
+ <div class="NullItem">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_VIRTUAL_LIST))%>">UIVirtualList</a><br>
+ </div>
+ </div>
+ </div>
+ <div class="Node ClearFix">
+ <div class="NullItem">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_RIGHTCLICKPOPUP))%>">UIRightClickPopup</a><br>
+ </div>
+ </div>
+ </div>
+ <div class="Node ClearFix LastNode">
+ <div class="NullItem">
+ <div class="ClearFix">
+ <a class="NodeIcon DefaultPageIcon"
href="<%=uicomponent.event("ClickNode",
String.valueOf(UISampleContent.NODE_DOWNLOADUPLOAD))%>">Download_Upload</a><br>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/CollapseAllIcon.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/CollapseAllIcon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/CollapseIcon.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/CollapseIcon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/Dotted.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/Dotted.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/ExpandAllIcon.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/ExpandAllIcon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/ExpandIcon.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/ExpandIcon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/LastNode.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/LastNode.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/NullItem.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/NullItem.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/RootTree.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/RootTree.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/SitemapItemBoxTitle150x1.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/SitemapItemBoxTitle150x1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/bullet.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/bullet.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/default_sitemap.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/default_sitemap.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/minus.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/minus.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/plus.gif
===================================================================
(Binary files differ)
Property changes on:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultSkin/background/plus.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultStylesheet.css
===================================================================
---
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultStylesheet.css
(rev 0)
+++
portal/trunk/testsuite/webuibasedsamples/src/main/webapp/skin/webui/component/UISamplePortlet/DefaultStylesheet.css 2010-05-18
05:06:24 UTC (rev 3109)
@@ -0,0 +1,116 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+/**
+ * Cated by The eXo Platform SAS
+ * Modifile : Nguyen Duc Khoi
+ * khoi.nguyen(a)exoplatform.com
+ * Apr 27, 2010
+ * version: $Id$
+ */
+
+.UIWindow .UISamplePortlet {
+ border: none;
+ margin: 0px;
+}
+
+.SampleWebUI {
+ background: #fff url('DefaultSkin/background/default_sitemap.gif') no-repeat 95%
90%;
+ padding: 10px 30px;
+ color: #4e4e4e;
+}
+
+.SampleWebUI .CollapseIcon {
+ background: url('DefaultSkin/background/CollapseIcon.gif') no-repeat left
center; /* orientation=lt */
+ background: url('DefaultSkin/background/CollapseIcon-rt.gif') no-repeat right
center; /* orientation=rt */
+ padding: 0px 5px 0px 35px; /* orientation=lt */
+ padding: 0px 35px 0px 5px; /* orientation=rt */
+ cursor: pointer;
+}
+
+.SampleWebUI .ExpandIcon {
+ background: url('DefaultSkin/background/ExpandIcon.gif') no-repeat left center;
/* orientation=lt */
+ background: url('DefaultSkin/background/ExpandIcon-rt.gif') no-repeat right
center; /* orientation=rt */
+ padding: 0px 5px 0px 35px; /* orientation=lt */
+ padding: 0px 35px 0px 5px; /* orientation=rt */
+ cursor: pointer;
+}
+
+.SampleWebUI .NullItem {
+ background: url('DefaultSkin/background/NullItem.gif') no-repeat left center; /*
orientation=lt */
+ background: url('DefaultSkin/background/NullItem-rt.gif') no-repeat right
center; /* orientation=rt */
+ padding: 0px 35px;
+}
+
+
+.SampleWebUI .DefaultPageIcon {
+ padding: 4px 0px 4px 20px; /* orientation=lt */
+ padding: 4px 20px 4px 0px; /* orientation=rt */
+ background-position: left center; /* orientation=lt */
+ background-position: right center; /* orientation=rt */
+ width: auto;
+}
+
+.SampleWebUI .ChildrenContainer {
+ padding-left: 31px; /* orientation=lt */
+ padding-right: 31px; /* orientation=rt */
+ float: none;
+}
+
+.SampleWebUI .Node {
+ line-height: 24px;
+ background: url('DefaultSkin/background/Dotted.gif') repeat-y 4px top; /*
orientation=lt */
+ background: url('DefaultSkin/background/Dotted-rt.gif') repeat-y 99.6% top; /*
orientation=rt */
+}
+
+.SampleWebUI .LastNode {
+ line-height: 24px;
+ background: url('DefaultSkin/background/LastNode.gif') no-repeat 4px top; /*
orientation=lt */
+ background: url('DefaultSkin/background/LastNode-rt.gif') no-repeat 99.6% top;
/* orientation=rt */
+}
+
+.SampleWebUI .ClearFix:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+.SampleWebUI .ClearFix {
+ !display: inline-block;
+ !zoom: 1;
+ !display: block;
+}
+
+.SampleWebUI a {
+ font-weight: bold;
+ display: block;
+ float: left;
+}
+
+.SayHello16x16Icon {
+ width: 16px; height: 16px;
+ background: url('/eXoResources/skin/DefaultSkin/skinIcons/16x16/icons/Lock.gif')
no-repeat;
+}
+
+.SayGoodBye16x16Icon {
+ width: 16px; height: 16px;
+ background:
url('/eXoResources/skin/DefaultSkin/skinIcons/16x16/icons/PastePalate.gif')
no-repeat;
+}
\ No newline at end of file