gatein SVN: r1201 - portal/trunk/docs/user-guide/en/images.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-01-08 01:45:41 -0500 (Fri, 08 Jan 2010)
New Revision: 1201
Modified:
portal/trunk/docs/user-guide/en/images/Wizard1.png
Log:
further edits
Modified: portal/trunk/docs/user-guide/en/images/Wizard1.png
===================================================================
(Binary files differ)
14 years, 11 months
gatein SVN: r1200 - portal/trunk/docs/user-guide/en/modules/portal.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-01-08 01:45:21 -0500 (Fri, 08 Jan 2010)
New Revision: 1200
Modified:
portal/trunk/docs/user-guide/en/modules/portal/Create_a_New_Portal.xml
portal/trunk/docs/user-guide/en/modules/portal/Drag_and_Drop_the_Page_Body.xml
portal/trunk/docs/user-guide/en/modules/portal/Page_Creation_Wizard.xml
Log:
further edits
Modified: portal/trunk/docs/user-guide/en/modules/portal/Create_a_New_Portal.xml
===================================================================
--- portal/trunk/docs/user-guide/en/modules/portal/Create_a_New_Portal.xml 2010-01-08 00:51:57 UTC (rev 1199)
+++ portal/trunk/docs/user-guide/en/modules/portal/Create_a_New_Portal.xml 2010-01-08 06:45:21 UTC (rev 1200)
@@ -22,6 +22,11 @@
02110-1301 USA, or see the FSF site: http://www.fsf.org.
--><title>Create a New Portal</title>
+<warning>
+<para>
+ The <emphasis role="bold">Add New Portal</emphasis> button mentioned in this section does not appear under the <emphasis role="bold">Site</emphasis> navigation in GateIn 3.0 Beta 3, even when logged in as the Administrator.
+</para>
+</warning>
<para>
Creating a new portal requires you to have a special permission that only an administrator can give you. You need follow these guides to create a new portal.
</para>
@@ -51,7 +56,7 @@
</step>
<step>
<para>
- Enter a value for the <emphasis role="bold">Portal Name</emphasis> field. This field is required and must be unique. Only alpha, digit and underscore characters are allowed for this field and it must have at least 3 characters.
+ Enter a value for the <emphasis role="bold">Portal Name</emphasis> field. This field is required and must be unique. Only alphabetical, numerical and underscore characters are allowed for this field and the name must have at least 3 characters.
</para>
</step>
<step>
@@ -66,24 +71,33 @@
</step>
<step>
<para>
- Click on the <emphasis role="bold">Properties</emphasis> tab to fill in the <emphasis role="bold">Keep session alive</emphasis> property. Keeping the working session for a long time to avoid a time out. There are 3 options:
- <itemizedlist>
- <listitem>
- <para>
- never : it never happens even if an application requests it
- </para>
- </listitem>
- <listitem>
- <para>
- on-demand : it starts to be used as soon as an application requests it
- </para>
- </listitem>
- <listitem>
- <para>
- always : it's always enabled (which has a cost but the administrator will be aware of that)
- </para>
- </listitem>
- </itemizedlist>
+ Click on the <emphasis role="bold">Properties</emphasis> tab to fill in the <emphasis role="bold">Keep session alive</emphasis> property. There are 3 options:
+ <variablelist>
+ <varlistentry>
+ <term>Never</term>
+ <listitem>
+ <para>
+ It never happens even if an application requests it <-- <emphasis role="bold"> WHAT never happens?</emphasis>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>On-demand</term>
+ <listitem>
+ <para>
+ It starts to be used as soon as an application requests it
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Always</term>
+ <listitem>
+ <para>
+ It's always enabled
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</para>
</step>
<step>
@@ -101,7 +115,7 @@
</step>
</procedure>
<para>
- You also can edit or delete a portal, see more details on <xref linkend="sect-User_Guide-Manage_Portals" />
+ You also can edit or delete a portal. See more details in <xref linkend="sect-User_Guide-Manage_Portals" />
</para>
</section>
Modified: portal/trunk/docs/user-guide/en/modules/portal/Drag_and_Drop_the_Page_Body.xml
===================================================================
--- portal/trunk/docs/user-guide/en/modules/portal/Drag_and_Drop_the_Page_Body.xml 2010-01-08 00:51:57 UTC (rev 1199)
+++ portal/trunk/docs/user-guide/en/modules/portal/Drag_and_Drop_the_Page_Body.xml 2010-01-08 06:45:21 UTC (rev 1200)
@@ -23,12 +23,12 @@
--><title>Drag and Drop the Page Body</title>
<para>
- You can easily drag and drop page body to the specific place where you want to in the page by following guides:
+ To assist administrators to modify or personalize their portal &PRODUCT; allows you to easily drag and drop page content within the page.
</para>
<procedure>
<step>
<para>
- Go to <emphasis role="bold">GateIn Start</emphasis> -> <emphasis role="bold">Administration</emphasis> -> <emphasis role="bold">Advanced</emphasis> --> <emphasis role="bold">Edit Current portal</emphasis>. It will display :
+ Go to <emphasis role="bold">Site Editor</emphasis> in the toolbar and click on <emphasis role="bold">Edit Layout</emphasis> It will display :
</para>
<mediaobject>
<imageobject>
@@ -38,7 +38,7 @@
</step>
<step>
<para>
- Click on the <emphasis role="bold">Portal Page</emphasis>, drag and drop to another reasonable places which you want to in this page.
+ Click on the <emphasis role="bold">Portal Page</emphasis>, drag and drop within the portal page.
</para>
<mediaobject>
<imageobject>
Modified: portal/trunk/docs/user-guide/en/modules/portal/Page_Creation_Wizard.xml
===================================================================
--- portal/trunk/docs/user-guide/en/modules/portal/Page_Creation_Wizard.xml 2010-01-08 00:51:57 UTC (rev 1199)
+++ portal/trunk/docs/user-guide/en/modules/portal/Page_Creation_Wizard.xml 2010-01-08 06:45:21 UTC (rev 1200)
@@ -23,45 +23,38 @@
--><title>Page Creation Wizard</title>
<para>
- Only by following there simple steps can you create a page quickly by using a wizard and publish this page on the Navigation bar:
+ A page creation wizard is included in &PRODUCT; to help administrators to create and publish a page quickly and easily.
</para>
<procedure>
<step>
<para>
- Go to <emphasis role="bold">GateIn Start</emphasis> -><emphasis role="bold">Administration</emphasis> -> <emphasis role="bold">Basic</emphasis> --> <emphasis role="bold">Create page wizard</emphasis>. <emphasis role="bold">Welcome to Page Creation Wizard</emphasis> appears:
+ Go to <emphasis role="bold">Site Editor</emphasis>and click on <emphasis role="bold">Add New Page</emphasis>. Yhe <emphasis role="bold">Page Creation Wizard</emphasis> will appear.
</para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Welcome.png" format="PNG" width="444" />
+ <imagedata fileref="images/Wizard1.png" format="PNG" width="444" />
</imageobject>
</mediaobject>
</step>
<step>
<para>
- Click the <emphasis role="bold">Next</emphasis> button or number '1' of the wizard steps in order to go to step 1. This step allows users to set up page setting such as :the navigation path, the node name, the display name, etc.
+ The wizard includes two parts: the left pane contains a list of navigations and shows the page list and the right pane displays the main information of the page selected in this list.
</para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Wizard1.png" format="PNG" width="444" />
+ <imagedata fileref="images/PageList.png" format="PNG" />
</imageobject>
</mediaobject>
- <para>
- There are two parts: the left pane is used to show a small description that will guide you what to do in this step. And the main wizard includes two parts: the left pane contains a list of navigations and shows the page list of each selected navigation, the right pane displays main information of a page.
- </para>
+
</step>
<step>
<para>
- On the left of wizard: Click the combo box icon !images/ComboBox.png! to see the navigations list. Select a navigation from the list that you want to create page. The pages list of selected navigation are displayed.
+ In the left pane, select the navigation that you want to create a new page for. Clicking a navigation displays the pages already existing for that navigation.
</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/PageList.png" format="PNG" />
- </imageobject>
- </mediaobject>
</step>
<step>
<para>
- Select a page from the above list or click on arrow up icon !images/ArrowIcon.png! to add a page at root.
+ Select a page from the list or click on arrow up icon to add a page at root.
</para>
<mediaobject>
<imageobject>
@@ -126,80 +119,8 @@
</listitem>
</varlistentry>
</variablelist>
-
- <!-- <informaltable colsep="0" frame="none" rowsep="0">
- <tgroup cols="2">
- <colspec align="center"></colspec>
- <colspec align="center"></colspec>
- <tbody>
- <row>
- <entry>
- <emphasis role="bold"> Name </emphasis>
- </entry>
- <entry>
- <emphasis role="bold"> Description </emphasis>
- </entry>
- </row>
- <row>
- <entry>
- Current Selected Page Node
- </entry>
- <entry>
- The path of the selected node to add a new sub page
- </entry>
- </row>
- <row>
- <entry>
- Node Name
- </entry>
- <entry>
- The node name of the added page. It is required field. This field must start with a character and must have a length between 3 and 30 characters.
- </entry>
- </row>
- <row>
- <entry>
- Display Name
- </entry>
- <entry>
- The display name of the node which contains the added page and must have a length between 3 and 30 characters.
- </entry>
- </row>
- <row>
- <entry>
- Visible
- </entry>
- <entry>
- This check box allows to hide this page. If not checked the page is under no circumstances shown, even if the publication period is OK. If checked the page or the page node appears on on the navigation bar, the page navigation and the site map. If "visible" is checked the visibility can depend on the "publication date & time" option.
- </entry>
- </row>
- <row>
- <entry>
- Publication date&time
- </entry>
- <entry>
- This option allows publishing the page for a period of time. If this option is checked the visibility of the page depends on the publication period start and end date.
- </entry>
- </row>
- <row>
- <entry>
- Start Publication Date
- </entry>
- <entry>
- The start date and time to publish the page
- </entry>
- </row>
- <row>
- <entry>
- End Publication Date
- </entry>
- <entry>
- The end date and time to publish the page
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable> -->
<note>
+ <title>Setting Time and Date</title>
<para>
You can set date and time by clicking the <emphasis role="bold">Start Publication Date</emphasis> field and <emphasis role="bold">End Publication Date</emphasis> field and select a date in the calendar pop up
</para>
@@ -209,10 +130,11 @@
<imagedata fileref="images/Calendar.png" format="PNG" />
</imageobject>
</mediaobject>
+
</step>
<step>
<para>
- 5. Click <emphasis role="bold">Next</emphasis> or number '2' of the wizard steps to go to step 2.
+ Click <emphasis role="bold">Next</emphasis> or number '2' of the wizard steps to go to step 2.
</para>
<mediaobject>
<imageobject>
@@ -222,77 +144,56 @@
</step>
<step>
<para>
- 6. Select <emphasis role="bold">Empty Layout</emphasis> or click the icon to see more templates to select.
+ Select <emphasis role="bold">Empty Layout</emphasis> or click the icon to see more templates to select.
</para>
</step>
<step>
<para>
- 7. Click the <emphasis role="bold">Next</emphasis> button or number '3' of the wizard step to go to step 3. You can drag portlets on the left pane and drop it on the right pane to constitute the content of this page.
+ Click the <emphasis role="bold">Next</emphasis> button or number '3' of the wizard step to go to step 3. You can drag portlets from the left pane into the right pane to create the content of this page.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="images/PageWizard3.png" format="PNG" width="444" />
</imageobject>
</mediaobject>
-<warning>
-<title>These Images are not present</title>
-<para>
- the images in the below table are not present in the raw document files.
-</para>
-</warning>
- <informaltable colsep="0" frame="none" rowsep="0">
- <tgroup cols="2">
- <colspec align="center"></colspec>
- <colspec align="center"></colspec>
- <tbody>
- <row>
- <entry>
- <emphasis role="bold"> Indicator </emphasis>
- </entry>
- <entry>
- <emphasis role="bold"> Meaning </emphasis>
- </entry>
- </row>
- <row>
- <entry>
- !images/preview.png!
- </entry>
- <entry>
- *Preview Page*: allows viewing a page in preview mode
- </entry>
- </row>
- <row>
- <entry>
- !images/ShowContainer.png!
- </entry>
- <entry>
- *Show Container*: allows listing all existing containers
- </entry>
- </row>
- <row>
- <entry>
- !images/ShowPortlet.png!
- </entry>
- <entry>
- *Show Portlets*: allows listing all existing portlets
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
+ <variablelist>
+ <varlistentry>
+ <term>Preview Page</term>
+ <listitem>
+ <para>
+ Allows viewing a page in preview mode
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Show Container</term>
+ <listitem>
+ <para>
+ Allows listing all existing containers
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Show Portlet</term>
+ <listitem>
+ <para>
+ Allows listing all existing portlets
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</step>
<step>
<para>
- 8. Click the <emphasis role="bold">Show Container</emphasis> icon !images/ShowContainer.png! if you want to see the existing containers and re-select the layout of the page. There will be a category list which contains specific containers when clicking the icon.
+ Click the <emphasis role="bold">Show Container</emphasis> icon if you want to see the existing containers and re-select the layout of the page. You can click on the <emphasis role="bold">Switch</emphasis> icon to view the content of this page.
</para>
</step>
- </procedure>
- <para>
- You can click on!images/Switch.png! to view the content of this page.
- </para>
- <para>
+ <step>
+ <para>
Click <emphasis role="bold">Save</emphasis> to accept creating a new page, the <emphasis role="bold">Back</emphasis> button to return the previous step or the <emphasis role="bold">Abort</emphasis> button to quit without creating a new page.
- </para>
+ </para>
+ </step>
+ </procedure>
</section>
14 years, 11 months
gatein SVN: r1199 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-01-07 19:51:57 -0500 (Thu, 07 Jan 2010)
New Revision: 1199
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java
Log:
- a bit more type safe
- added unsafe comments
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-01-08 00:38:50 UTC (rev 1198)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-01-08 00:51:57 UTC (rev 1199)
@@ -97,7 +97,7 @@
return (T)this;
}
- //
+ //
// public void processInit(WebuiRequestContext context) throws Exception {
// MonitorEvent<UIComponent> mevent = createMonitorEvent(Event.Phase.INIT, context);
// config.getUIComponentLifecycle().init(this, context) ;
@@ -106,7 +106,7 @@
// mevent.broadcast() ;
// }
// }
- //
+ //
public void processDecode(WebuiRequestContext context) throws Exception
{
MonitorEvent<UIComponent> mevent = createMonitorEvent(Event.Phase.DECODE, context);
@@ -258,7 +258,7 @@
String confirm = loadConfirmMesssage(event, context, beanId);
try
{
- return context.getURLBuilder().createURL(this, event.getName(), confirm, beanId, params);
+ return context.getURLBuilder().createURL(this, event.getName(), confirm, beanId, params).toString();
}
catch (Exception e)
{
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java 2010-01-08 00:38:50 UTC (rev 1198)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java 2010-01-08 00:51:57 UTC (rev 1199)
@@ -39,11 +39,6 @@
private List<UIComponent> children;
- public void visit() throws Exception
- {
-
- }
-
public boolean hasChildren()
{
return children != null;
@@ -99,6 +94,7 @@
return null;
}
+ // todo (julien) : this is not type safe
@SuppressWarnings("unchecked")
public <T extends UIComponent> T getChildById(String id)
{
@@ -113,6 +109,7 @@
return null;
}
+ // todo (julien) : this is not type safe
@SuppressWarnings("unchecked")
public <T extends UIComponent> T getChild(int idx)
{
@@ -135,6 +132,7 @@
return null;
}
+ // todo (julien) : this is not type safe
@SuppressWarnings("unchecked")
public <T extends UIComponent> T replaceChild(String targetChildId, UIComponent newComponent) throws Exception
{
@@ -154,7 +152,6 @@
throw new Exception("Cannot find the child : " + targetChildId);
}
- @SuppressWarnings("unchecked")
public <T extends UIComponent> T replaceChild(String targetChildId, Class<T> type, String configId, String id)
throws Exception
{
@@ -162,7 +159,7 @@
WebuiApplication app = (WebuiApplication)context.getApplication();
UIComponent comp = app.createUIComponent(type, configId, id, context);
comp = replaceChild(targetChildId, comp);
- return (T)comp;
+ return type.cast(comp);
}
public <T extends UIComponent> T addChild(Class<T> type, String configId, String id) throws Exception
@@ -174,6 +171,7 @@
return comp;
}
+ // todo (julien) : this is not type safe
@SuppressWarnings("unchecked")
public <T extends UIComponent> T findComponentById(String id)
{
14 years, 11 months
gatein SVN: r1198 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-01-07 19:38:50 -0500 (Thu, 07 Jan 2010)
New Revision: 1198
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java
Log:
remove non type safe code that can lead to class cast exception
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java 2010-01-07 23:20:21 UTC (rev 1197)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java 2010-01-08 00:38:50 UTC (rev 1198)
@@ -69,8 +69,7 @@
children.add(uicomponent);
}
- @SuppressWarnings("unchecked")
- public <T extends UIComponent> T removeChildById(String id)
+ public UIComponent removeChildById(String id)
{
if (children == null)
return null;
@@ -80,7 +79,7 @@
continue;
child.setParent(null);
children.remove(child);
- return (T)child;
+ return child;
}
return null;
}
14 years, 11 months
gatein SVN: r1196 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/event.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-01-07 17:07:33 -0500 (Thu, 07 Jan 2010)
New Revision: 1196
Removed:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/event/EventListenerInterceptor.java
Log:
remove useless class
Deleted: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/event/EventListenerInterceptor.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/event/EventListenerInterceptor.java 2010-01-07 13:44:09 UTC (rev 1195)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/event/EventListenerInterceptor.java 2010-01-07 22:07:33 UTC (rev 1196)
@@ -1,33 +0,0 @@
-/**
- * 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.
- */
-
-package org.exoplatform.webui.event;
-
-/**
- * Jun 3, 2004
- * @author: Tuan Nguyen
- * @email: tuan08(a)users.sourceforge.net
- * @version: $ID$
- **/
-public interface EventListenerInterceptor
-{
- public void preExecute(Event event) throws Exception;
-
- public void postExecute(Event event) throws Exception;
-}
\ No newline at end of file
14 years, 11 months
gatein SVN: r1195 - portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-01-07 08:44:09 -0500 (Thu, 07 Jan 2010)
New Revision: 1195
Added:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWSRPFormInputSet.java
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java
Log:
- Trying to control registration details via the registration required checkbox. Not working so far. :( So this is mostly a synch commit.
- Added UIWSRPFormInputSet as default one has strange and undesirable layout behavior.
Added: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWSRPFormInputSet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWSRPFormInputSet.java (rev 0)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWSRPFormInputSet.java 2010-01-07 13:44:09 UTC (rev 1195)
@@ -0,0 +1,93 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.
+*/
+
+package org.exoplatform.wsrp.webui.component;
+
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormInputBase;
+import org.exoplatform.webui.form.UIFormInputSet;
+
+import java.io.Writer;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class UIWSRPFormInputSet extends UIFormInputSet
+{
+ public UIWSRPFormInputSet(String name)
+ {
+ super(name);
+ }
+
+ @Override
+ public void processRender(WebuiRequestContext context) throws Exception
+ {
+ if (getComponentConfig() != null)
+ {
+ super.processRender(context);
+ return;
+ }
+
+ StringBuilder sb = new StringBuilder(512);
+ sb.append("<div class=\"UIFormInputSet\">");
+
+ ResourceBundle res = context.getApplicationResourceBundle();
+ UIForm uiForm = getAncestorOfType(UIForm.class);
+ for (UIComponent inputEntry : getChildren())
+ {
+ if (inputEntry.isRendered())
+ {
+ sb.append("<div class=\"row\">");
+
+ String label;
+ try
+ {
+ label = uiForm.getLabel(res, inputEntry.getId());
+ if (inputEntry instanceof UIFormInputBase)
+ {
+ ((UIFormInputBase)inputEntry).setLabel(label);
+ }
+ }
+ catch (MissingResourceException ex)
+ {
+ //label = " " ;
+ label = inputEntry.getName();
+ System.err.println("\n " + uiForm.getId() + ".label." + inputEntry.getId() + " not found value");
+ }
+
+ sb.append("<label>").append(label).append("</label>");
+ renderUIComponent(inputEntry);
+
+ sb.append("</div>");
+ }
+ }
+ sb.append("</div>");
+
+ Writer w = context.getWriter();
+ w.write(sb.toString());
+ }
+}
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java 2010-01-07 12:02:34 UTC (rev 1194)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java 2010-01-07 13:44:09 UTC (rev 1195)
@@ -39,8 +39,6 @@
import org.exoplatform.webui.form.UIFormCheckBoxInput;
import org.exoplatform.webui.form.UIFormInputBase;
import org.exoplatform.webui.form.UIFormStringInput;
-import org.exoplatform.webui.form.validator.MandatoryValidator;
-import org.gatein.common.util.ParameterValidation;
import org.gatein.registration.RegistrationPolicy;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
import org.gatein.wsrp.producer.config.ProducerConfiguration;
@@ -78,8 +76,10 @@
private static final String REQUIRES_REGISTRATION = "requiresregistration";
private static final String POLICY_CLASS = "policyClassName";
private static final String VALIDATOR_CLASS = "validatorClassName";
+ private static final String REGISTRATION_DETAILS = "registrationdetails";
private ProducerConfigurationService configService;
+ private UIWSRPFormInputSet registrationDetails;
public UIWsrpProducerEditor() throws Exception
{
@@ -95,10 +95,13 @@
popup.setRendered(false);
}
- public void initWith(ProducerConfigurationService configurationService) throws Exception
+ public void setConfigService(ProducerConfigurationService configService)
{
- ParameterValidation.throwIllegalArgExceptionIfNull(configurationService, "ProducerConfigurationService");
- configService = configurationService;
+ this.configService = configService;
+ }
+
+ private void init() throws Exception
+ {
ProducerConfiguration configuration = configService.getConfiguration();
ProducerRegistrationRequirements registrationRequirements = configuration.getRegistrationRequirements();
@@ -108,12 +111,21 @@
boolean registrationRequired = registrationRequirements.isRegistrationRequired();
getUIFormCheckBoxInput(REQUIRES_REGISTRATION).setValue(registrationRequired);
+ // reset potentially existing registration details
+ if (registrationDetails != null)
+ {
+ removeChild(registrationDetails.getClass());
+ }
+
// if registration is required then we display more information
if (registrationRequired)
{
+ registrationDetails = new UIWSRPFormInputSet(REGISTRATION_DETAILS);
+
// registration policy
- UIFormInputBase<String> policyInput = new UIFormStringInput(POLICY_CLASS, POLICY_CLASS, null).addValidator(MandatoryValidator.class);
+ UIFormInputBase<String> policyInput = new UIFormStringInput(POLICY_CLASS, POLICY_CLASS, null);
addUIFormInput(policyInput);
+
RegistrationPolicy policy = registrationRequirements.getPolicy();
String policyClassName = policy.getClass().getName();
policyInput.setValue(policyClassName);
@@ -121,16 +133,16 @@
// if policy is the default one, display information about the validator
if (ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
{
- UIFormInputBase<String> validatorInput = new UIFormStringInput(VALIDATOR_CLASS, VALIDATOR_CLASS, null).addValidator(MandatoryValidator.class);
- addUIFormInput(validatorInput);
+ UIFormInputBase<String> validatorInput = new UIFormStringInput(VALIDATOR_CLASS, VALIDATOR_CLASS, null);
+ registrationDetails.addUIFormInput(validatorInput);
DefaultRegistrationPolicy defaultPolicy = (DefaultRegistrationPolicy)policy;
- getUIStringInput(VALIDATOR_CLASS).setValue(defaultPolicy.getValidator().getClass().getName());
+ validatorInput.setValue(defaultPolicy.getValidator().getClass().getName());
}
// registration properties
Map<QName, RegistrationPropertyDescription> regProps = configuration.getRegistrationRequirements().getRegistrationProperties();
- UIGrid uiGrid = addChild(UIGrid.class, "RegistrationPropertySelector", null);
+ UIGrid uiGrid = registrationDetails.addChild(UIGrid.class, "RegistrationPropertySelector", null);
//configure the edit and delete buttons based on an id from the data list - this will also be passed as param to listener
uiGrid.configure("name", FIELDS, SELECT_ACTIONS);
@@ -141,6 +153,8 @@
LazyPageList propertyList = createPageList(getPropertyList(regProps));
uiGrid.getUIPageIterator().setPageList(propertyList);
+ addUIFormInput(registrationDetails);
+ registrationDetails.setRendered(true);
}
}
@@ -228,8 +242,13 @@
registrationRequirements.setRegistrationRequiredForFullDescription(Boolean.parseBoolean(getUIFormCheckBoxInput(REG_REQUIRED_FOR_DESCRIPTION).getValue().toString()));
producerConfiguration.setUsingStrictMode(Boolean.parseBoolean(getUIFormCheckBoxInput(STRICT_MODE).getValue().toString()));
- registrationRequirements.setRegistrationRequired(Boolean.parseBoolean(getUIFormCheckBoxInput(REQUIRES_REGISTRATION).getValue().toString()));
- registrationRequirements.reloadPolicyFrom(getUIStringInput(POLICY_CLASS).getValue(), getUIStringInput(VALIDATOR_CLASS).getValue());
+ boolean requiresReg = Boolean.parseBoolean(getUIFormCheckBoxInput(REQUIRES_REGISTRATION).getValue().toString());
+ registrationRequirements.setRegistrationRequired(requiresReg);
+ /*if (registrationDetails != null)
+ {
+ registrationRequirements.reloadPolicyFrom(registrationDetails.getUIStringInput(POLICY_CLASS).getValue(),
+ registrationDetails.getUIStringInput(VALIDATOR_CLASS).getValue());
+ }*/
configService.saveConfiguration();
uiApp.addMessage(new ApplicationMessage("Producer Successfully Changed", null));
@@ -307,4 +326,13 @@
}
}
+
+ @Override
+ public void processRender(WebuiRequestContext context) throws Exception
+ {
+ // reset the GUI
+ init();
+
+ super.processRender(context);
+ }
}
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java 2010-01-07 12:02:34 UTC (rev 1194)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java 2010-01-07 13:44:09 UTC (rev 1195)
@@ -41,7 +41,7 @@
public UIWsrpProducerOverview() throws Exception
{
producerForm = createUIComponent(UIWsrpProducerEditor.class, null, "Producer Editor");
- producerForm.initWith(getProducerConfigurationService());
+ producerForm.setConfigService(getProducerConfigurationService());
addChild(producerForm);
}
14 years, 11 months
gatein SVN: r1194 - portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-01-07 07:02:34 -0500 (Thu, 07 Jan 2010)
New Revision: 1194
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
Log:
GTNPORTAL-448: Remove error reported by PC about undefined 'NewAccountAdded' on startup
Defined event in portlet.xml
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2010-01-07 11:14:54 UTC (rev 1193)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2010-01-07 12:02:34 UTC (rev 1194)
@@ -412,4 +412,7 @@
</portlet-info>
</portlet>
-</portlet-app>
\ No newline at end of file
+ <event-definition>
+ <name>NewAccountAdded</name>
+ </event-definition>
+</portlet-app>
14 years, 11 months
gatein SVN: r1192 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-01-07 06:13:08 -0500 (Thu, 07 Jan 2010)
New Revision: 1192
Removed:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/SessionProviderFactory.java
Log:
removed now unused SessionProviderFactory
Deleted: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/SessionProviderFactory.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/SessionProviderFactory.java 2010-01-07 11:07:05 UTC (rev 1191)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/SessionProviderFactory.java 2010-01-07 11:13:08 UTC (rev 1192)
@@ -1,63 +0,0 @@
-/**
- * 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.
- */
-
-package org.exoplatform.portal.webui.util;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.services.jcr.ext.app.SessionProviderService;
-import org.exoplatform.services.jcr.ext.common.SessionProvider;
-
-/**
- * Created by The eXo Platform SAS Author : Hoa Pham hoa.pham(a)exoplatform.com
- * Jan 28, 2008
- */
-public class SessionProviderFactory
-{
-
- public static boolean isAnonim()
- {
- String userId = Util.getPortalRequestContext().getRemoteUser();
- if (userId == null)
- return true;
- return false;
- }
-
- public static SessionProvider createSystemProvider()
- {
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- SessionProviderService service =
- (SessionProviderService)container.getComponentInstanceOfType(SessionProviderService.class);
- return service.getSystemSessionProvider(null);
- }
-
- public static SessionProvider createSessionProvider()
- {
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- SessionProviderService service =
- (SessionProviderService)container.getComponentInstanceOfType(SessionProviderService.class);
- return service.getSessionProvider(null);
- }
-
- public static SessionProvider createAnonimProvider()
- {
- return SessionProvider.createAnonimProvider();
- }
-
-}
14 years, 11 months