JBoss Portal SVN: r7715 - in branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf: wizard and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 02:51:09 -0400 (Wed, 11 Jul 2007)
New Revision: 7715
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml
Log:
JBPORTAL-1568: Navigation broken after 120 elements, now it can handle 127*nBelementsPerPage elements.
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-07-11 03:59:52 UTC (rev 7714)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-07-11 06:51:09 UTC (rev 7715)
@@ -49,11 +49,11 @@
</table>
<ul class="pagination">
<c:if test="#{instancemgr.instanceCount > instancemgr.paginationSize}">
- <c:forEach begin="0" end="#{instancemgr.instanceCount - 1}" step="#{instancemgr.paginationSize}"
+ <c:forEach begin="0" end="#{(instancemgr.instanceCount - 1)/ instancemgr.paginationSize}" step="1"
var="index">
<li class="#{index == instancemgr.selectedFrom ? 'selected' : ''}">
- <h:commandLink action="#{instancemgr.selectFrom}"><f:param name="from" value="#{index}"/><h:outputText
- value="#{index}"/></h:commandLink>
+ <h:commandLink action="#{instancemgr.selectFrom}"><f:param name="from" value="#{index * instancemgr.paginationSize}"/><h:outputText
+ value="#{index * instancemgr.paginationSize}"/></h:commandLink>
</li>
</c:forEach>
</c:if>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-07-11 03:59:52 UTC (rev 7714)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-07-11 06:51:09 UTC (rev 7715)
@@ -64,12 +64,12 @@
</table>
<ul class="pagination">
<c:if test="#{portletmgr.portletCount > portletmgr.paginationSize}">
- <c:forEach begin="0" end="#{portletmgr.portletCount - 1}" step="#{portletmgr.paginationSize}"
+ <c:forEach begin="0" end="#{(portletmgr.portletCount - 1) / portletmgr.paginationSize}" step="1"
var="index">
<li class="#{index == portletmgr.selectedFrom ? 'selected' : ''}">
<h:commandLink action="#{portletmgr.selectFrom}"><f:param name="from"
- value="#{index}"/><h:outputText
- value="#{index}"/></h:commandLink>
+ value="#{index * portletmgr.paginationSize}"/><h:outputText
+ value="#{index * portletmgr.paginationSize}"/></h:commandLink>
</li>
</c:forEach>
</c:if>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml 2007-07-11 03:59:52 UTC (rev 7714)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/wizard/selectPortlet.xhtml 2007-07-11 06:51:09 UTC (rev 7715)
@@ -38,12 +38,12 @@
</tbody>
</table>
<ul class="pagination">
- <c:forEach begin="0" end="#{portletmgr.portletCount - 1}" step="#{portletmgr.paginationSize}"
+ <c:forEach begin="0" end="#{(portletmgr.portletCount - 1)/portletmgr.paginationSize}" step="1"
var="index">
<li class="#{index == portletmgr.selectedFrom ? 'selected' : ''}">
<h:commandLink action="#{portletmgr.selectFrom}">
- <f:param name="from" value="#{index}"/>
- <h:outputText value="#{index}"/>
+ <f:param name="from" value="#{index * portletmgr.paginationSize}"/>
+ <h:outputText value="#{index * portletmgr.paginationSize}"/>
</h:commandLink>
</li>
</c:forEach>
18 years, 10 months
JBoss Portal SVN: r7714 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: xhuang(a)jboss.com
Date: 2007-07-10 23:59:52 -0400 (Tue, 10 Jul 2007)
New Revision: 7714
Modified:
docs/trunk/referenceGuide/en/modules/themeandlayouts.xml
Log:
JBPORTAL-1523
Modified: docs/trunk/referenceGuide/en/modules/themeandlayouts.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/themeandlayouts.xml 2007-07-11 03:57:57 UTC (rev 7713)
+++ docs/trunk/referenceGuide/en/modules/themeandlayouts.xml 2007-07-11 03:59:52 UTC (rev 7714)
@@ -149,7 +149,7 @@
appearing on the left.
</para>
<para> Again, you have several choices, either to edit the included JSPs directly or create your own,
- store them in a web application then edit the following file: <literal>portal-core.sar/META-INF/jboss-service.xml</literal>.
+ store them in a web application then edit the following file: <literal>jboss-portal.sar/META-INF/jboss-service.xml</literal>.
The interesting part in that file is the following:
<programlisting><![CDATA[<mbean
code="org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor"
18 years, 10 months
JBoss Portal SVN: r7713 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: xhuang(a)jboss.com
Date: 2007-07-10 23:57:57 -0400 (Tue, 10 Jul 2007)
New Revision: 7713
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/themeandlayouts.xml
Log:
JBPORTAL-1523
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/themeandlayouts.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/themeandlayouts.xml 2007-07-10 23:08:11 UTC (rev 7712)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/themeandlayouts.xml 2007-07-11 03:57:57 UTC (rev 7713)
@@ -149,7 +149,7 @@
appearing on the left.
</para>
<para> Again, you have several choices, either to edit the included JSPs directly or create your own,
- store them in a web application then edit the following file: <literal>portal-core.sar/META-INF/jboss-service.xml</literal>.
+ store them in a web application then edit the following file: <literal>jboss-portal.sar/META-INF/jboss-service.xml</literal>.
The interesting part in that file is the following:
<programlisting><![CDATA[<mbean
code="org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor"
18 years, 10 months
JBoss Portal SVN: r7712 - trunk/core-cms/src/main/org/jboss/portal/core/cms/ui.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-07-10 19:08:11 -0400 (Tue, 10 Jul 2007)
New Revision: 7712
Modified:
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java
Log:
CMSPortlet : change internal properties from private to protected - JBPORTAL-1506
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java 2007-07-10 22:06:06 UTC (rev 7711)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java 2007-07-10 23:08:11 UTC (rev 7712)
@@ -135,7 +135,7 @@
private static final PortletMode EDIT_CONTENT = new PortletMode("edit_content");
/** . */
- private CMS CMSService;
+ protected CMS CMSService;
/** . */
private CMSContentEditorPortlet hack = new CMSContentEditorPortlet();
@@ -331,7 +331,7 @@
/**
*
*/
- private String cleanupContent(String content)
+ protected String cleanupContent(String content)
{
//including content only between the <body> and </body>
if (content.toLowerCase().indexOf("<body") != -1)
@@ -350,7 +350,7 @@
/**
* Creates CMS urls which is used for image src calls from the html.
*/
- private abstract static class URLFactory
+ protected abstract static class URLFactory
{
public abstract String createURL(String path);
}
@@ -358,7 +358,7 @@
/**
* Implementation that uses a PortletURL object.
*/
- private static class LocalURLFactory extends URLFactory
+ protected static class LocalURLFactory extends URLFactory
{
/** . */
@@ -379,7 +379,7 @@
/**
* Implementation that routes thru the CMSObjectCommandMapper.
*/
- private static class GlobalURLFactory extends URLFactory
+ protected static class GlobalURLFactory extends URLFactory
{
/** . */
18 years, 10 months
JBoss Portal SVN: r7711 - in branches/JBoss_Portal_Branch_2_6: wsrp/src/main/org/jboss/portal/wsrp/admin/ui and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-07-10 18:06:06 -0400 (Tue, 10 Jul 2007)
New Revision: 7711
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml
Log:
- JBPORTAL-1565: Fixed issue with refresh not taking registration refresh result into account.
- JBPORTAL-1508: Correctly un/register with federated portlet invoker and removed cache of markup on admin portlet.
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-10 22:01:55 UTC (rev 7710)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-10 22:06:06 UTC (rev 7711)
@@ -36,7 +36,6 @@
<name>VIEW</name>
<value>/WEB-INF/jsf/objects.xhtml</value>
</init-param>
- <expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2007-07-10 22:01:55 UTC (rev 7710)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2007-07-10 22:06:06 UTC (rev 7711)
@@ -228,9 +228,22 @@
if (result.hasIssues())
{
beanContext.createErrorMessage(result.getStatus());
+
+ // refresh had issues, we should deactivate this consumer
+ registry.deactivateConsumerWith(consumer.getProducerId());
}
else
{
+ // activate the consumer if it's supposed to be active
+ if (consumer.isActive())
+ {
+ registry.activateConsumerWith(consumer.getProducerId());
+ }
+ else
+ {
+ registry.deactivateConsumerWith(consumer.getProducerId());
+ }
+
beanContext.createInfoMessage(null, result.getStatus());
}
return result;
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-07-10 22:01:55 UTC (rev 7710)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-07-10 22:06:06 UTC (rev 7711)
@@ -246,10 +246,19 @@
// update DB
if (result.specificCode())
{
- if (!isActive())
+ // mark as inactive if the refresh had issues...
+ if (result.hasIssues())
{
- setActive(true);
+ setActive(false);
}
+ else
+ {
+ // mark as active if it wasn't already
+ if (!isActive())
+ {
+ setActive(true);
+ }
+ }
registry.updateProducerInfo(this);
}
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml 2007-07-10 22:01:55 UTC (rev 7710)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml 2007-07-10 22:06:06 UTC (rev 7711)
@@ -34,7 +34,6 @@
<name>VIEW</name>
<value>/WEB-INF/jsf/consumers/consumers.xhtml</value>
</init-param>
- <expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
@@ -43,6 +42,5 @@
<title>WSRP Consumers Configuration</title>
<keywords>management,admin,wsrp</keywords>
</portlet-info>
- </portlet>
-</portlet-app>
-
+ </portlet>
+</portlet-app>
\ No newline at end of file
18 years, 10 months
JBoss Portal SVN: r7710 - in trunk: wsrp/src/main/org/jboss/portal/wsrp/admin/ui and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-07-10 18:01:55 -0400 (Tue, 10 Jul 2007)
New Revision: 7710
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml
Log:
- JBPORTAL-1565: Fixed issue with refresh not taking registration refresh result into account.
- JBPORTAL-1508: Correctly un/register with federated portlet invoker and removed cache of markup on admin portlet.
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-10 21:18:34 UTC (rev 7709)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-10 22:01:55 UTC (rev 7710)
@@ -36,7 +36,6 @@
<name>VIEW</name>
<value>/WEB-INF/jsf/objects.xhtml</value>
</init-param>
- <expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2007-07-10 21:18:34 UTC (rev 7709)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerManagerBean.java 2007-07-10 22:01:55 UTC (rev 7710)
@@ -228,9 +228,22 @@
if (result.hasIssues())
{
beanContext.createErrorMessage(result.getStatus());
+
+ // refresh had issues, we should deactivate this consumer
+ registry.deactivateConsumerWith(consumer.getProducerId());
}
else
{
+ // activate the consumer if it's supposed to be active
+ if (consumer.isActive())
+ {
+ registry.activateConsumerWith(consumer.getProducerId());
+ }
+ else
+ {
+ registry.deactivateConsumerWith(consumer.getProducerId());
+ }
+
beanContext.createInfoMessage(null, result.getStatus());
}
return result;
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-07-10 21:18:34 UTC (rev 7709)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-07-10 22:01:55 UTC (rev 7710)
@@ -246,10 +246,19 @@
// update DB
if (result.specificCode())
{
- if (!isActive())
+ // mark as inactive if the refresh had issues...
+ if (result.hasIssues())
{
- setActive(true);
+ setActive(false);
}
+ else
+ {
+ // mark as active if it wasn't already
+ if (!isActive())
+ {
+ setActive(true);
+ }
+ }
registry.updateProducerInfo(this);
}
Modified: trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml 2007-07-10 21:18:34 UTC (rev 7709)
+++ trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/portlet.xml 2007-07-10 22:01:55 UTC (rev 7710)
@@ -34,7 +34,6 @@
<name>VIEW</name>
<value>/WEB-INF/jsf/consumers/consumers.xhtml</value>
</init-param>
- <expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
18 years, 10 months
JBoss Portal SVN: r7709 - trunk/thirdparty.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-07-10 17:18:34 -0400 (Tue, 10 Jul 2007)
New Revision: 7709
Removed:
trunk/thirdparty/apache-ant/
Log:
rolling back accidental commit
18 years, 10 months
JBoss Portal SVN: r7708 - trunk/tools/etc/buildfragments.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-07-10 17:14:23 -0400 (Tue, 10 Jul 2007)
New Revision: 7708
Modified:
trunk/tools/etc/buildfragments/modules.ent
Log:
rolling back accidental commit
Modified: trunk/tools/etc/buildfragments/modules.ent
===================================================================
--- trunk/tools/etc/buildfragments/modules.ent 2007-07-10 20:55:32 UTC (rev 7707)
+++ trunk/tools/etc/buildfragments/modules.ent 2007-07-10 21:14:23 UTC (rev 7708)
@@ -186,13 +186,7 @@
<pathelement path="${jboss.portal-workflow.lib}/portal-workflow-lib.jar"/>
</path>
- <!-- uiserver -->
- <property name="jboss.portal-uiserver.root" value="${project.root}/uiserver/output"/>
- <property name="jboss.portal-uiserver.lib" value="${jboss.portal-uiserver.root}/lib"/>
- <path id="jboss.portal-uiserver.classpath">
- <pathelement path="${jboss.portal-uiserver.lib}/portal-uiserver-lib.jar"/>
- </path>
-
+
<!-- samples -->
<property name="jboss.portal-samples.root" value="${project.root}/samples/output"/>
<property name="jboss.portal-samples.lib" value="${jboss.portal-samples.root}/lib"/>
18 years, 10 months
JBoss Portal SVN: r7707 - in trunk: core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin and 4 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-07-10 16:55:32 -0400 (Tue, 10 Jul 2007)
New Revision: 7707
Added:
trunk/thirdparty/apache-ant/
trunk/thirdparty/apache-ant/component-info.xml
trunk/thirdparty/apache-ant/lib/
trunk/thirdparty/apache-ant/lib/ant.jar
Modified:
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminConstants.java
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp
trunk/thirdparty/
trunk/tools/etc/buildfragments/modules.ent
Log:
CMS Administration: Create File: Validate title has content - JBPORTAL-1544
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminConstants.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminConstants.java 2007-07-10 17:29:07 UTC (rev 7706)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminConstants.java 2007-07-10 20:55:32 UTC (rev 7707)
@@ -105,4 +105,6 @@
public static final String OP_VIEWPENDING = "view_pending_items";
public static final String OP_VIEWSEARCHRESULTS = "view_search_results";
+
+ public static final String OP_CREATEFILE_VALIDATION_ERROR = "create_file_validation_error";
}
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2007-07-10 17:29:07 UTC (rev 7706)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2007-07-10 20:55:32 UTC (rev 7707)
@@ -391,7 +391,7 @@
javax.portlet.PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/editbinary.jsp");
prd.include(rReq, rRes);
}
- else if (CMSAdminConstants.OP_CREATENEWTEXT.equals(op))
+ else if (CMSAdminConstants.OP_CREATENEWTEXT.equals(op) || CMSAdminConstants.OP_CREATEFILE_VALIDATION_ERROR.equals(op))
{
String sPath = rReq.getParameter("path");
@@ -422,9 +422,28 @@
rRes.setContentType("text/html");
rReq.setAttribute("currpath", sPath);
rReq.setAttribute("document_base_url", sbUrl.toString() + this.buildURL(rReq, "/"));
+
+ //If a validation error occurred, re-populate data already submitted
+ if(rReq.getParameter("error:content") != null)
+ {
+ rReq.setAttribute("error:content", rReq.getParameter("error:content"));
+ }
+ if(rReq.getParameter("error:description") != null)
+ {
+ rReq.setAttribute("error:description", rReq.getParameter("error:description"));
+ }
+ if(rReq.getParameter("error:title") != null)
+ {
+ rReq.setAttribute("error:title", rReq.getParameter("error:title"));
+ }
+ if(rReq.getParameter("error:language") != null)
+ {
+ rReq.setAttribute("error:language", rReq.getParameter("error:language"));
+ }
+
javax.portlet.PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher(CMSAdminConstants.CMS_JSP_PATH + "/create.jsp");
prd.include(rReq, rRes);
- }
+ }
else if (CMSAdminConstants.OP_EDIT.equals(op))
{
String sPath = rReq.getParameter("path");
@@ -984,6 +1003,27 @@
String sTitle = aReq.getParameter("title");
String sDescription = aReq.getParameter("description");
String sLanguage = aReq.getParameter("language");
+
+ //Perform server side data validation
+ if(sFileName == null || sFileName.trim().length() == 0)
+ {
+ //Validation Error occurred
+ //FileName should not be empty
+ aRes.setRenderParameter("op", CMSAdminConstants.OP_CREATEFILE_VALIDATION_ERROR);
+
+ //set render parameters here
+ aRes.setRenderParameter("path", sDirectory);
+
+ //used to remember the data already submitted by the user
+ aRes.setRenderParameter("error:content", aReq.getParameter("elm1"));
+ aRes.setRenderParameter("error:description", aReq.getParameter("description"));
+ aRes.setRenderParameter("error:title", aReq.getParameter("title"));
+ aRes.setRenderParameter("error:language", aReq.getParameter("language"));
+
+ return;
+ }
+
+
if (!"".equals(sFileName) && !"".equals(sDirectory))
{
String sContent = aReq.getParameter("elm1");
@@ -1026,7 +1066,7 @@
CMSService.execute(newFileCMD);
}
aRes.setRenderParameter("path", sNewFilePath);
- }
+ }
aRes.setRenderParameter("op", CMSAdminConstants.OP_VIEWFILE);
}
Modified: trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp
===================================================================
--- trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp 2007-07-10 17:29:07 UTC (rev 7706)
+++ trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/create.jsp 2007-07-10 20:55:32 UTC (rev 7707)
@@ -13,6 +13,28 @@
String[] langs = Locale.getISOLanguages();
String sDocBase = (String)request.getAttribute("document_base_url");
String sCSSURL = (String)request.getAttribute("css_url");
+
+ //validation handling related data
+ String sContent = (String)request.getAttribute("error:content");
+ String description = (String)request.getAttribute("error:description");
+ String title = (String)request.getAttribute("error:title");
+ String language = (String)request.getAttribute("error:language");
+ if(sContent == null)
+ {
+ sContent = "";
+ }
+ if(description == null)
+ {
+ description = "";
+ }
+ if(title == null)
+ {
+ title = "";
+ }
+ if(language == null)
+ {
+ language = "";
+ }
%>
<!-- tinyMCE -->
@@ -53,6 +75,21 @@
</script>
<!-- /tinyMCE -->
+<!-- data validation -->
+<script language="javascript" type="text/javascript">
+ function validateAndSubmit()
+ {
+ if(document.pickform.filename.value.length == 0)
+ {
+ alert("${n:i18n("CMS_FILENAME")} is required.");
+ }
+ else
+ {
+ document.pickform.submit();
+ }
+ }
+</script>
+
<form name="pickform" method="post" action="<portlet:actionURL>
<portlet:param name="op" value="<%= CMSAdminConstants.OP_SAVENEWTEXT %>"/>
<portlet:param name="path" value=""/>
@@ -75,15 +112,17 @@
</tr>
<tr>
<td>${n:i18n("CMS_FILENAME")}:</td>
- <td><input
+ <td>
+ <input
type="text" name="filename"
- class="portlet-form-input-field">
+ class="portlet-form-input-field"/>
+ : Required
</td>
</tr>
<tr>
<td>${n:i18n("CMS_DESCRIPTION")}:</td>
<td><input type="text" size="40" maxlength="80"
- name="description" value=""
+ name="description" value="<%=description%>"
class="portlet-form-input-field"/></td>
</tr>
<tr>
@@ -91,8 +130,9 @@
${n:i18n("CMS_TITLE")}:
</td>
<td><input type="text" size="40" maxlength="80"
- name="title" value=""
- class="portlet-form-input-field"/></td>
+ name="title" value="<%=title%>"
+ class="portlet-form-input-field"/>
+ </td>
</tr>
<tr>
<td>
@@ -100,18 +140,26 @@
</td>
<td><select name="language"
class="portlet-form-input-field">
- <option selected
- value="<%= Locale.getDefault().getLanguage() %>"><%= Locale.getDefault().getDisplayLanguage() %>
- </option>
+
+ <%if(language.equals("")){%>
<%
for (int i = 0; i < langs.length; i++)
{
%>
- <option value="<%= langs[i] %>"><%= new Locale(langs[i]).getDisplayLanguage() %>
- </option>
+ <option value="<%= langs[i] %>" <%if(langs[i].equals(Locale.getDefault().getLanguage())){%>selected<%}%>><%= new Locale(langs[i]).getDisplayLanguage() %></option>
<%
}
%>
+ <%}else{%>
+ <%
+ for (int i = 0; i < langs.length; i++)
+ {
+ %>
+ <option value="<%= langs[i] %>" <%if(langs[i].equals(language)){%>selected<%}%>><%= new Locale(langs[i]).getDisplayLanguage() %></option>
+ <%
+ }
+ %>
+ <%}%>
</select>
</td>
</tr>
@@ -144,9 +192,9 @@
</tr>
<tr>
<td align="center">
- <textarea id="elm1" name="elm1" rows="20" cols="80" style="width: 100%"></textarea>
+ <textarea id="elm1" name="elm1" rows="20" cols="80" style="width: 100%"><%= sContent %></textarea>
<br>
- <input type="submit" name="save" value="${n:i18n("CMS_CREATE")}" class="portlet-form-button"/>
+ <input type="button" name="save" value="${n:i18n("CMS_CREATE")}" class="portlet-form-button" onclick="javascript:validateAndSubmit();"/>
<input type="reset" name="reset" value="Reset" class="portlet-form-button"/>
</td>
</tr>
Property changes on: trunk/thirdparty
___________________________________________________________________
Name: svn:ignore
+ antlr
*.ent
Added: trunk/thirdparty/apache-ant/component-info.xml
===================================================================
--- trunk/thirdparty/apache-ant/component-info.xml (rev 0)
+++ trunk/thirdparty/apache-ant/component-info.xml 2007-07-10 20:55:32 UTC (rev 7707)
@@ -0,0 +1,19 @@
+<project name="apache-ant-component-info">
+
+ <component id="apache-ant"
+ licenseType="apache-2.0"
+ version="1.6.5"
+ projectHome="http://ant.apache.org/"
+ description="Ant is a Java-based build tool"
+ >
+
+ <artifact id="ant.jar"/>
+ <artifact id="ant-launcher.jar"/>
+ <export>
+ <include input="ant.jar"/>
+ <include input="ant-launcher.jar"/>
+ </export>
+ </component>
+
+
+</project>
Added: trunk/thirdparty/apache-ant/lib/ant.jar
===================================================================
(Binary files differ)
Property changes on: trunk/thirdparty/apache-ant/lib/ant.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/tools/etc/buildfragments/modules.ent
===================================================================
--- trunk/tools/etc/buildfragments/modules.ent 2007-07-10 17:29:07 UTC (rev 7706)
+++ trunk/tools/etc/buildfragments/modules.ent 2007-07-10 20:55:32 UTC (rev 7707)
@@ -186,6 +186,13 @@
<pathelement path="${jboss.portal-workflow.lib}/portal-workflow-lib.jar"/>
</path>
+ <!-- uiserver -->
+ <property name="jboss.portal-uiserver.root" value="${project.root}/uiserver/output"/>
+ <property name="jboss.portal-uiserver.lib" value="${jboss.portal-uiserver.root}/lib"/>
+ <path id="jboss.portal-uiserver.classpath">
+ <pathelement path="${jboss.portal-uiserver.lib}/portal-uiserver-lib.jar"/>
+ </path>
+
<!-- samples -->
<property name="jboss.portal-samples.root" value="${project.root}/samples/output"/>
<property name="jboss.portal-samples.lib" value="${jboss.portal-samples.root}/lib"/>
18 years, 10 months
JBoss Portal SVN: r7706 - trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-07-10 13:29:07 -0400 (Tue, 10 Jul 2007)
New Revision: 7706
Modified:
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
Log:
charset encoding with commons-fileupload-1.1.1 - http://jira.jboss.com/jira/browse/JBPORTAL-1550 [Thanks to patch provided by Luca Stancapiano(l.stancapiano(a)k-tech.it)]
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2007-07-10 12:33:21 UTC (rev 7705)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2007-07-10 17:29:07 UTC (rev 7706)
@@ -739,19 +739,19 @@
String fieldName = item.getFieldName();
if ("destination".equals(fieldName))
{
- sPath = item.getString();
+ sPath = item.getString(aReq.getCharacterEncoding());
}
else if ("description".equals(fieldName))
{
- sDescription = item.getString();
+ sDescription = item.getString(aReq.getCharacterEncoding());
}
else if ("title".equals(fieldName))
{
- sTitle = item.getString();
+ sTitle = item.getString(aReq.getCharacterEncoding());
}
else if ("language".equals(fieldName))
{
- sLanguage = item.getString();
+ sLanguage = item.getString(aReq.getCharacterEncoding());
}
}
}
@@ -800,11 +800,11 @@
String fieldName = item.getFieldName();
if ("destination".equals(fieldName))
{
- sPath = item.getString();
+ sPath = item.getString(aReq.getCharacterEncoding());
}
else if ("language".equals(fieldName))
{
- sLanguage = item.getString();
+ sLanguage = item.getString(aReq.getCharacterEncoding());
}
}
}
@@ -950,23 +950,23 @@
String fieldName = item.getFieldName();
if ("destination".equals(fieldName))
{
- sPath = item.getString();
+ sPath = item.getString(aReq.getCharacterEncoding());
}
else if ("description".equals(fieldName))
{
- sDescription = item.getString();
+ sDescription = item.getString(aReq.getCharacterEncoding());
}
else if ("makelive".equals(fieldName))
{
- sMakeLive = item.getString();
+ sMakeLive = item.getString(aReq.getCharacterEncoding());
}
else if ("title".equals(fieldName))
{
- sTitle = item.getString();
+ sTitle = item.getString(aReq.getCharacterEncoding());
}
else if ("language".equals(fieldName))
{
- sLanguage = item.getString();
+ sLanguage = item.getString(aReq.getCharacterEncoding());
}
}
}
18 years, 10 months