Author: julien(a)jboss.com
Date: 2007-03-10 17:32:31 -0500 (Sat, 10 Mar 2007)
New Revision: 6631
Modified:
trunk/widget/src/main/org/jboss/portal/widget/google/type/DataType.java
trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
Log:
GG : handle hidden types in an input type=hidden
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/type/DataType.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/type/DataType.java 2007-03-10
22:29:21 UTC (rev 6630)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/type/DataType.java 2007-03-10
22:32:31 UTC (rev 6631)
@@ -23,6 +23,8 @@
package org.jboss.portal.widget.google.type;
/**
+ * An abstract type for the different datatypes.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
Modified: trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
===================================================================
--- trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-03-10 22:29:21 UTC
(rev 6630)
+++ trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-03-10 22:32:31 UTC
(rev 6631)
@@ -64,6 +64,19 @@
<p>You have selected the widget <%= selWidget.getTitle().getDefaultString()
%></p>
<p>
<form action="<p:actionURL><p:param name="meta_action"
value="select"/><p:param name="uri" value="<%=
selWidget.getId() %>"/></p:actionURL>" method="post">
+ <%
+ for (Iterator i =
selWidget.getPreferencesInfo().getPreferencesInfo().iterator(); i.hasNext();)
+ {
+ GGPreferenceInfo prefInfo = (GGPreferenceInfo)i.next();
+ if (prefInfo.getType().getOrdinal() == DataType.HIDDEN)
+ {
+
+ %>
+ <input type="hidden" name="param.<%= prefInfo.getName()
%>" value="<%= prefInfo.getDefaultValue() != null ?
prefInfo.getDefaultValue() : "" %>"/>
+ <%
+ }
+ }
+ %>
<table>
<tbody>
<%
@@ -76,6 +89,8 @@
<%
switch (prefInfo.getType().getOrdinal())
{
+ case DataType.HIDDEN:
+ break;
case DataType.ENUM:
%>
<td><select name="param.<%= prefInfo.getName()
%>" class="portlet-form-field">