JBoss Portal SVN: r7490 - in tags/JBoss_Portal_2_6_0_CR3: identity/src/main/org/jboss/portal/identity and 4 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-20 17:29:53 -0400 (Wed, 20 Jun 2007)
New Revision: 7490
Modified:
tags/JBoss_Portal_2_6_0_CR3/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java
tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/identity/UserProfileModule.java
tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java
tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java
Log:
allow user to nillate his theme property to revert to portal theme
Modified: tags/JBoss_Portal_2_6_0_CR3/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java 2007-06-20 21:23:37 UTC (rev 7489)
+++ tags/JBoss_Portal_2_6_0_CR3/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java 2007-06-20 21:29:53 UTC (rev 7490)
@@ -871,7 +871,7 @@
ctx.put("REALEMAIL", (String)getProperty(user, P3PConstants.INFO_USER_BUSINESS_INFO_ONLINE_EMAIL));
ctx.put("FAKEEMAIL", (String)getProperty(user, User.INFO_USER_EMAIL_FAKE));
ctx.put("THEME", (String)getProperty(user, User.INFO_USER_THEME));
- ctx.put("VIEWREALEMAIL", ((String)getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL)).equals("true") ? "checked=\"checked\"" : "");
+ ctx.put("VIEWREALEMAIL", (getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL)).equals("true") ? "checked=\"checked\"" : "");
ctx.put("HOMEPAGE", (String)getProperty(user,User.INFO_USER_HOMEPAGE));
ctx.put("ICQ", (String)getProperty(user,User.INFO_USER_IM_ICQ));
ctx.put("AIM", (String)getProperty(user,User.INFO_USER_IM_AIM));
@@ -1029,7 +1029,24 @@
log.error("Cannot convert locale format", e);
}
- putNonEmptyProperty(user, User.INFO_USER_THEME, theme);
+ // It means we want to erase the current theme choice and use the default provided by the site
+ if (theme != null && theme.length() == 0)
+ {
+ try
+ {
+ userProfileModule.setProperty(user, User.INFO_USER_THEME, null);
+ }
+ catch (IdentityException e)
+ {
+ log.error("Cannot update theme property", e);
+ }
+ }
+ else
+ {
+ putNonEmptyProperty(user, User.INFO_USER_THEME, theme);
+ }
+
+ //
putNonEmptyProperty(user, User.INFO_USER_HOMEPAGE, homepage);
putNonEmptyProperty(user, User.INFO_USER_SECURITY_QUESTION, question);
putNonEmptyProperty(user, User.INFO_USER_SECURITY_ANSWER, answer);
@@ -1374,8 +1391,6 @@
private void putNonEmptyProperty(User user, String key, Object value)
{
-
-
if (value != null)
{
if (value instanceof String && !(((String)value).trim().length() != 0) )
Modified: tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/identity/UserProfileModule.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/identity/UserProfileModule.java 2007-06-20 21:23:37 UTC (rev 7489)
+++ tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/identity/UserProfileModule.java 2007-06-20 21:29:53 UTC (rev 7490)
@@ -48,10 +48,10 @@
public Object getProperty(User user, String propertyName) throws IdentityException, IllegalArgumentException;
/**
- * Sets user property
+ * Sets user property. If the property value is null the property will be removed.
* @param user
* @param name
- * @param property
+ * @param property value
* @throws IdentityException
* @throws IllegalArgumentException
*/
Modified: tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-06-20 21:23:37 UTC (rev 7489)
+++ tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-06-20 21:29:53 UTC (rev 7490)
@@ -142,14 +142,21 @@
throw new IdentityException("Property is not allowed for write access: " + propertyName);
}
- if (!pi.getType().equals(propertyValue.getClass().getName()))
+ if (propertyValue != null && !pi.getType().equals(propertyValue.getClass().getName()))
{
throw new IdentityException("Wrong property type. Must be: " + pi.getType() + "; and found: " + propertyValue.getClass().getName());
}
//if value is null reset property
- dbUser.getProfileMap().put(propertyName, propertyValue);
+ if (propertyValue != null)
+ {
+ dbUser.getProfileMap().put(propertyName, propertyValue);
+ }
+ else
+ {
+ dbUser.getProfileMap().remove(propertyName);
+ }
}
public Map getProperties(User user) throws IdentityException
Modified: tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-06-20 21:23:37 UTC (rev 7489)
+++ tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-06-20 21:29:53 UTC (rev 7490)
@@ -501,6 +501,29 @@
ctx.commit();
}
+ public void testNullProperty() throws Exception
+ {
+ ctx.begin();
+
+ User user = userModule.createUser("testname", "testpassword");
+
+ userProfileModule.setProperty(user, User.INFO_USER_THEME, "some theme value");
+
+ Object o = userProfileModule.getProperty(user, User.INFO_USER_THEME);
+
+ assertNotNull(o);
+ assertEquals(o.toString(), "some theme value");
+
+ userProfileModule.setProperty(user, User.INFO_USER_THEME, null);
+
+ o = userProfileModule.getProperty(user, User.INFO_USER_THEME);
+
+ assertNull(o);
+
+ ctx.commit();
+
+ }
+
public void testGetProperties() throws Exception
{
ctx.begin();
Modified: tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java 2007-06-20 21:23:37 UTC (rev 7489)
+++ tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java 2007-06-20 21:29:53 UTC (rev 7490)
@@ -187,6 +187,11 @@
commit();
}
+ public void testNullProperty() throws Exception
+ {
+ utc.testNullProperty();
+ }
+
public void testGetProperties() throws Exception
{
utc.testGetProperties();
Modified: tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java 2007-06-20 21:23:37 UTC (rev 7489)
+++ tags/JBoss_Portal_2_6_0_CR3/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java 2007-06-20 21:29:53 UTC (rev 7490)
@@ -176,4 +176,10 @@
{
utc.testStaticProperty();
}
+
+ public void testNullProperty() throws Exception
+ {
+ utc.testNullProperty();
+ }
+
}
18 years, 10 months
JBoss Portal SVN: r7489 - trunk/core/src/main/org/jboss/portal/core/ui/portlet/user.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-20 17:23:37 -0400 (Wed, 20 Jun 2007)
New Revision: 7489
Modified:
trunk/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java
Log:
allow user to nillate his theme property to revert to portal theme
Modified: trunk/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java 2007-06-20 21:13:29 UTC (rev 7488)
+++ trunk/core/src/main/org/jboss/portal/core/ui/portlet/user/UserPortlet.java 2007-06-20 21:23:37 UTC (rev 7489)
@@ -871,7 +871,7 @@
ctx.put("REALEMAIL", (String)getProperty(user, P3PConstants.INFO_USER_BUSINESS_INFO_ONLINE_EMAIL));
ctx.put("FAKEEMAIL", (String)getProperty(user, User.INFO_USER_EMAIL_FAKE));
ctx.put("THEME", (String)getProperty(user, User.INFO_USER_THEME));
- ctx.put("VIEWREALEMAIL", ((String)getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL)).equals("true") ? "checked=\"checked\"" : "");
+ ctx.put("VIEWREALEMAIL", (getProperty(user, User.INFO_USER_VIEW_EMAIL_VIEW_REAL)).equals("true") ? "checked=\"checked\"" : "");
ctx.put("HOMEPAGE", (String)getProperty(user,User.INFO_USER_HOMEPAGE));
ctx.put("ICQ", (String)getProperty(user,User.INFO_USER_IM_ICQ));
ctx.put("AIM", (String)getProperty(user,User.INFO_USER_IM_AIM));
@@ -1029,7 +1029,24 @@
log.error("Cannot convert locale format", e);
}
- putNonEmptyProperty(user, User.INFO_USER_THEME, theme);
+ // It means we want to erase the current theme choice and use the default provided by the site
+ if (theme != null && theme.length() == 0)
+ {
+ try
+ {
+ userProfileModule.setProperty(user, User.INFO_USER_THEME, null);
+ }
+ catch (IdentityException e)
+ {
+ log.error("Cannot update theme property", e);
+ }
+ }
+ else
+ {
+ putNonEmptyProperty(user, User.INFO_USER_THEME, theme);
+ }
+
+ //
putNonEmptyProperty(user, User.INFO_USER_HOMEPAGE, homepage);
putNonEmptyProperty(user, User.INFO_USER_SECURITY_QUESTION, question);
putNonEmptyProperty(user, User.INFO_USER_SECURITY_ANSWER, answer);
@@ -1374,8 +1391,6 @@
private void putNonEmptyProperty(User user, String key, Object value)
{
-
-
if (value != null)
{
if (value instanceof String && !(((String)value).trim().length() != 0) )
18 years, 10 months
JBoss Portal SVN: r7488 - in tags/JBoss_Portal_2_6_0_CR3/core-admin/src: resources/portal-admin-war/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-20 17:13:29 -0400 (Wed, 20 Jun 2007)
New Revision: 7488
Modified:
tags/JBoss_Portal_2_6_0_CR3/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
tags/JBoss_Portal_2_6_0_CR3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java
tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
Log:
when portlet provider is changed, reset the pagination index to 0 / increased the pagination size to 20 / externalized the pagination size in faces-config.xml / do not display paginator when count < pagination size
Modified: tags/JBoss_Portal_2_6_0_CR3/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2007-06-20 21:11:01 UTC (rev 7487)
+++ tags/JBoss_Portal_2_6_0_CR3/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2007-06-20 21:13:29 UTC (rev 7488)
@@ -85,7 +85,7 @@
private Integer selectedRow;
/** . */
- private final int paginationSize = 10;
+ private int paginationSize;
// Runtime fields depending on the navigational state
@@ -140,6 +140,11 @@
return paginationSize;
}
+ public void setPaginationSize(int paginationSize)
+ {
+ this.paginationSize = paginationSize;
+ }
+
public int getSelectedFrom()
{
return selectedFrom;
@@ -247,7 +252,7 @@
List list = getInstances();
//
- int to = Math.min(selectedFrom + 10, list.size());
+ int to = Math.min(selectedFrom + paginationSize, list.size());
//
return list.subList(selectedFrom, to);
Modified: tags/JBoss_Portal_2_6_0_CR3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java 2007-06-20 21:11:01 UTC (rev 7487)
+++ tags/JBoss_Portal_2_6_0_CR3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java 2007-06-20 21:13:29 UTC (rev 7488)
@@ -85,7 +85,7 @@
private int selectedFrom;
/** . */
- private final int paginationSize = 10;
+ private int paginationSize;
/** . */
private String selectedPortletId;
@@ -162,6 +162,11 @@
return paginationSize;
}
+ public void setPaginationSize(int paginationSize)
+ {
+ this.paginationSize = paginationSize;
+ }
+
public int getSelectedFrom()
{
return selectedFrom;
@@ -191,6 +196,7 @@
{
this.selectedPortletInvokerId = selectedPortletInvokerId;
this.selectedPortletId = null;
+ this.selectedFrom = 0;
}
// Runtime state
Modified: tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-20 21:11:01 UTC (rev 7487)
+++ tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-20 21:13:29 UTC (rev 7488)
@@ -135,6 +135,10 @@
<property-name>domainConfigurator</property-name>
<value>#{applicationScope.AuthorizationDomainRegistry.instance.configurator}</value>
</managed-property>
+ <managed-property>
+ <property-name>paginationSize</property-name>
+ <value>20</value>
+ </managed-property>
</managed-bean>
<!-- The portlet manager managed bean -->
@@ -162,6 +166,10 @@
<property-name>selectedPortletInvokerId</property-name>
<value>local</value>
</managed-property>
+ <managed-property>
+ <property-name>paginationSize</property-name>
+ <value>20</value>
+ </managed-property>
</managed-bean>
<managed-bean>
Modified: tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-06-20 21:11:01 UTC (rev 7487)
+++ tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-06-20 21:13:29 UTC (rev 7488)
@@ -48,13 +48,15 @@
</tbody>
</table>
<ul class="pagination">
- <c:forEach begin="0" end="#{instancemgr.instanceCount - 1}" step="#{instancemgr.paginationSize}"
- 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>
- </li>
- </c:forEach>
+ <c:if test="#{instancemgr.instanceCount > instancemgr.paginationSize}">
+ <c:forEach begin="0" end="#{instancemgr.instanceCount - 1}" step="#{instancemgr.paginationSize}"
+ 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>
+ </li>
+ </c:forEach>
+ </c:if>
</ul>
</h:form>
Modified: tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-06-20 21:11:01 UTC (rev 7487)
+++ tags/JBoss_Portal_2_6_0_CR3/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-06-20 21:13:29 UTC (rev 7488)
@@ -63,14 +63,16 @@
</tbody>
</table>
<ul class="pagination">
- <c:forEach begin="0" end="#{portletmgr.portletCount - 1}" step="#{portletmgr.paginationSize}"
- 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>
- </li>
- </c:forEach>
+ <c:if test="#{portletmgr.portletCount > portletmgr.paginationSize}">
+ <c:forEach begin="0" end="#{portletmgr.portletCount - 1}" step="#{portletmgr.paginationSize}"
+ 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>
+ </li>
+ </c:forEach>
+ </c:if>
</ul>
</h:form>
18 years, 10 months
JBoss Portal SVN: r7487 - in trunk/identity/src/main/org/jboss/portal: identity/db and 3 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-06-20 17:11:01 -0400 (Wed, 20 Jun 2007)
New Revision: 7487
Modified:
trunk/identity/src/main/org/jboss/portal/identity/UserProfileModule.java
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
trunk/identity/src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java
Log:
make UserProfileModule remove property when provided value is null + tests
Modified: trunk/identity/src/main/org/jboss/portal/identity/UserProfileModule.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/UserProfileModule.java 2007-06-20 20:59:29 UTC (rev 7486)
+++ trunk/identity/src/main/org/jboss/portal/identity/UserProfileModule.java 2007-06-20 21:11:01 UTC (rev 7487)
@@ -48,10 +48,10 @@
public Object getProperty(User user, String propertyName) throws IdentityException, IllegalArgumentException;
/**
- * Sets user property
+ * Sets user property. If the property value is null the property will be removed.
* @param user
* @param name
- * @param property
+ * @param property value
* @throws IdentityException
* @throws IllegalArgumentException
*/
Modified: trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-06-20 20:59:29 UTC (rev 7486)
+++ trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserProfileModuleImpl.java 2007-06-20 21:11:01 UTC (rev 7487)
@@ -142,14 +142,21 @@
throw new IdentityException("Property is not allowed for write access: " + propertyName);
}
- if (!pi.getType().equals(propertyValue.getClass().getName()))
+ if (propertyValue != null && !pi.getType().equals(propertyValue.getClass().getName()))
{
throw new IdentityException("Wrong property type. Must be: " + pi.getType() + "; and found: " + propertyValue.getClass().getName());
}
//if value is null reset property
- dbUser.getProfileMap().put(propertyName, propertyValue);
+ if (propertyValue != null)
+ {
+ dbUser.getProfileMap().put(propertyName, propertyValue);
+ }
+ else
+ {
+ dbUser.getProfileMap().remove(propertyName);
+ }
}
public Map getProperties(User user) throws IdentityException
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-06-20 20:59:29 UTC (rev 7486)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-06-20 21:11:01 UTC (rev 7487)
@@ -501,6 +501,29 @@
ctx.commit();
}
+ public void testNullProperty() throws Exception
+ {
+ ctx.begin();
+
+ User user = userModule.createUser("testname", "testpassword");
+
+ userProfileModule.setProperty(user, User.INFO_USER_THEME, "some theme value");
+
+ Object o = userProfileModule.getProperty(user, User.INFO_USER_THEME);
+
+ assertNotNull(o);
+ assertEquals(o.toString(), "some theme value");
+
+ userProfileModule.setProperty(user, User.INFO_USER_THEME, null);
+
+ o = userProfileModule.getProperty(user, User.INFO_USER_THEME);
+
+ assertNull(o);
+
+ ctx.commit();
+
+ }
+
public void testGetProperties() throws Exception
{
ctx.begin();
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java 2007-06-20 20:59:29 UTC (rev 7486)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/db/DBIdentityTestCase.java 2007-06-20 21:11:01 UTC (rev 7487)
@@ -187,6 +187,11 @@
commit();
}
+ public void testNullProperty() throws Exception
+ {
+ utc.testNullProperty();
+ }
+
public void testGetProperties() throws Exception
{
utc.testGetProperties();
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java 2007-06-20 20:59:29 UTC (rev 7486)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPIdentityTestCase.java 2007-06-20 21:11:01 UTC (rev 7487)
@@ -176,4 +176,10 @@
{
utc.testStaticProperty();
}
+
+ public void testNullProperty() throws Exception
+ {
+ utc.testNullProperty();
+ }
+
}
18 years, 10 months
JBoss Portal SVN: r7486 - in trunk/core-admin/src: resources/portal-admin-war/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-20 16:59:29 -0400 (Wed, 20 Jun 2007)
New Revision: 7486
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
Log:
when portlet provider is changed, reset the pagination index to 0 / increased the pagination size to 20 / externalized the pagination size in faces-config.xml / do not display paginator when count < pagination size
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2007-06-20 20:57:37 UTC (rev 7485)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/InstanceManagerBean.java 2007-06-20 20:59:29 UTC (rev 7486)
@@ -85,7 +85,7 @@
private Integer selectedRow;
/** . */
- private final int paginationSize = 10;
+ private int paginationSize;
// Runtime fields depending on the navigational state
@@ -140,6 +140,11 @@
return paginationSize;
}
+ public void setPaginationSize(int paginationSize)
+ {
+ this.paginationSize = paginationSize;
+ }
+
public int getSelectedFrom()
{
return selectedFrom;
@@ -247,7 +252,7 @@
List list = getInstances();
//
- int to = Math.min(selectedFrom + 10, list.size());
+ int to = Math.min(selectedFrom + paginationSize, list.size());
//
return list.subList(selectedFrom, to);
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java 2007-06-20 20:57:37 UTC (rev 7485)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortletManagerBean.java 2007-06-20 20:59:29 UTC (rev 7486)
@@ -85,7 +85,7 @@
private int selectedFrom;
/** . */
- private final int paginationSize = 10;
+ private int paginationSize;
/** . */
private String selectedPortletId;
@@ -162,6 +162,11 @@
return paginationSize;
}
+ public void setPaginationSize(int paginationSize)
+ {
+ this.paginationSize = paginationSize;
+ }
+
public int getSelectedFrom()
{
return selectedFrom;
@@ -191,6 +196,7 @@
{
this.selectedPortletInvokerId = selectedPortletInvokerId;
this.selectedPortletId = null;
+ this.selectedFrom = 0;
}
// Runtime state
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-20 20:57:37 UTC (rev 7485)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-06-20 20:59:29 UTC (rev 7486)
@@ -135,6 +135,10 @@
<property-name>domainConfigurator</property-name>
<value>#{applicationScope.AuthorizationDomainRegistry.instance.configurator}</value>
</managed-property>
+ <managed-property>
+ <property-name>paginationSize</property-name>
+ <value>20</value>
+ </managed-property>
</managed-bean>
<!-- The portlet manager managed bean -->
@@ -162,6 +166,10 @@
<property-name>selectedPortletInvokerId</property-name>
<value>local</value>
</managed-property>
+ <managed-property>
+ <property-name>paginationSize</property-name>
+ <value>20</value>
+ </managed-property>
</managed-bean>
<managed-bean>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-06-20 20:57:37 UTC (rev 7485)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-06-20 20:59:29 UTC (rev 7486)
@@ -48,13 +48,15 @@
</tbody>
</table>
<ul class="pagination">
- <c:forEach begin="0" end="#{instancemgr.instanceCount - 1}" step="#{instancemgr.paginationSize}"
- 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>
- </li>
- </c:forEach>
+ <c:if test="#{instancemgr.instanceCount > instancemgr.paginationSize}">
+ <c:forEach begin="0" end="#{instancemgr.instanceCount - 1}" step="#{instancemgr.paginationSize}"
+ 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>
+ </li>
+ </c:forEach>
+ </c:if>
</ul>
</h:form>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-06-20 20:57:37 UTC (rev 7485)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/portlets.xhtml 2007-06-20 20:59:29 UTC (rev 7486)
@@ -63,14 +63,16 @@
</tbody>
</table>
<ul class="pagination">
- <c:forEach begin="0" end="#{portletmgr.portletCount - 1}" step="#{portletmgr.paginationSize}"
- 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>
- </li>
- </c:forEach>
+ <c:if test="#{portletmgr.portletCount > portletmgr.paginationSize}">
+ <c:forEach begin="0" end="#{portletmgr.portletCount - 1}" step="#{portletmgr.paginationSize}"
+ 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>
+ </li>
+ </c:forEach>
+ </c:if>
</ul>
</h:form>
18 years, 10 months
JBoss Portal SVN: r7485 - trunk/core/src/resources/portal-core-sar/conf/data.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-20 16:57:37 -0400 (Wed, 20 Jun 2007)
New Revision: 7485
Modified:
trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
Log:
configure error handling of dashboard by default
Modified: trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-06-20 16:20:23 UTC (rev 7484)
+++ trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-06-20 20:57:37 UTC (rev 7485)
@@ -31,7 +31,37 @@
<context>
<context-name/>
<properties>
+ <!--
+ | Set the layout for the default portal, see also portal-layouts.xml.
+ -->
<property>
+ <name>layout.id</name>
+ <value>generic</value>
+ </property>
+ <!--
+ | Set the theme for the default portal, see also portal-themes.xml.
+ -->
+ <property>
+ <name>theme.id</name>
+ <value>renaissance</value>
+ </property>
+ <!--
+ | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
+ -->
+ <property>
+ <name>theme.renderSetId</name>
+ <value>divRenderer</value>
+ </property>
+ <!--
+ | The default page name, if the property is not explicited then the default page name is "default"
+ -->
+ <property>
+ <name>portal.defaultObjectName</name>
+ <value>default</value>
+ </property>
+
+ <!-- Control policy config -->
+ <property>
<name>control.portal.access_denied</name>
<value>ignore</value>
</property>
@@ -97,36 +127,6 @@
<window-state>minimized</window-state>
<window-state>maximized</window-state>
</supported-window-states>
- <properties>
- <!--
- | Set the layout for the default portal, see also portal-layouts.xml.
- -->
- <property>
- <name>layout.id</name>
- <value>generic</value>
- </property>
- <!--
- | Set the theme for the default portal, see also portal-themes.xml.
- -->
- <property>
- <name>theme.id</name>
- <value>renaissance</value>
- </property>
- <!--
- | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
- -->
- <property>
- <name>theme.renderSetId</name>
- <value>divRenderer</value>
- </property>
- <!--
- | The default page name, if the property is not explicited then the default page name is "default"
- -->
- <property>
- <name>portal.defaultObjectName</name>
- <value>default</value>
- </property>
- </properties>
<security-constraint>
<policy-permission>
<action-name>viewrecursive</action-name>
@@ -212,6 +212,55 @@
<value>true</value>
</property>
+ <!-- Control policy config -->
+ <property>
+ <name>control.portal.access_denied</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.unavailable</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.not_found</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.resource_uri</name>
+ <value>/WEB-INF/jsp/error/portal.jsp</value>
+ </property>
+ <property>
+ <name>control.page.access_denied</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.unavailable</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.not_found</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.resource_uri</name>
+ <value>/WEB-INF/jsp/error/page.jsp</value>
+ </property>
</properties>
</context>
</deployment>
@@ -230,36 +279,6 @@
<window-state>minimized</window-state>
<window-state>maximized</window-state>
</supported-window-states>
- <properties>
- <!--
- | Set the layout for the default portal, see also portal-layouts.xml.
- -->
- <property>
- <name>layout.id</name>
- <value>generic</value>
- </property>
- <!--
- | Set the theme for the default portal, see also portal-themes.xml.
- -->
- <property>
- <name>theme.id</name>
- <value>renaissance</value>
- </property>
- <!--
- | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
- -->
- <property>
- <name>theme.renderSetId</name>
- <value>divRenderer</value>
- </property>
- <!--
- | The default page name, if the property is not explicited then the default page name is "default"
- -->
- <property>
- <name>portal.defaultObjectName</name>
- <value>default</value>
- </property>
- </properties>
<page>
<page-name>default</page-name>
<properties>
@@ -307,36 +326,6 @@
<window-state>minimized</window-state>
<window-state>maximized</window-state>
</supported-window-states>
- <properties>
- <!--
- | Set the layout for the default portal, see also portal-layouts.xml.
- -->
- <property>
- <name>layout.id</name>
- <value>generic</value>
- </property>
- <!--
- | Set the theme for the default portal, see also portal-themes.xml.
- -->
- <property>
- <name>theme.id</name>
- <value>renaissance</value>
- </property>
- <!--
- | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
- -->
- <property>
- <name>theme.renderSetId</name>
- <value>divRenderer</value>
- </property>
- <!--
- | The default page name, if the property is not explicited then the default page name is "default"
- -->
- <property>
- <name>portal.defaultObjectName</name>
- <value>default</value>
- </property>
- </properties>
<security-constraint>
<policy-permission>
<action-name>viewrecursive</action-name>
18 years, 10 months
JBoss Portal SVN: r7483 - tags/JBoss_Portal_2_6_0_CR3/core/src/resources/portal-core-sar/conf/data.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-06-20 12:07:18 -0400 (Wed, 20 Jun 2007)
New Revision: 7483
Modified:
tags/JBoss_Portal_2_6_0_CR3/core/src/resources/portal-core-sar/conf/data/default-object.xml
Log:
update default config of portal objects
Modified: tags/JBoss_Portal_2_6_0_CR3/core/src/resources/portal-core-sar/conf/data/default-object.xml
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-06-20 15:01:28 UTC (rev 7482)
+++ tags/JBoss_Portal_2_6_0_CR3/core/src/resources/portal-core-sar/conf/data/default-object.xml 2007-06-20 16:07:18 UTC (rev 7483)
@@ -31,7 +31,37 @@
<context>
<context-name/>
<properties>
+ <!--
+ | Set the layout for the default portal, see also portal-layouts.xml.
+ -->
<property>
+ <name>layout.id</name>
+ <value>generic</value>
+ </property>
+ <!--
+ | Set the theme for the default portal, see also portal-themes.xml.
+ -->
+ <property>
+ <name>theme.id</name>
+ <value>renaissance</value>
+ </property>
+ <!--
+ | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
+ -->
+ <property>
+ <name>theme.renderSetId</name>
+ <value>divRenderer</value>
+ </property>
+ <!--
+ | The default page name, if the property is not explicited then the default page name is "default"
+ -->
+ <property>
+ <name>portal.defaultObjectName</name>
+ <value>default</value>
+ </property>
+
+ <!-- Control policy config -->
+ <property>
<name>control.portal.access_denied</name>
<value>ignore</value>
</property>
@@ -97,36 +127,6 @@
<window-state>minimized</window-state>
<window-state>maximized</window-state>
</supported-window-states>
- <properties>
- <!--
- | Set the layout for the default portal, see also portal-layouts.xml.
- -->
- <property>
- <name>layout.id</name>
- <value>generic</value>
- </property>
- <!--
- | Set the theme for the default portal, see also portal-themes.xml.
- -->
- <property>
- <name>theme.id</name>
- <value>renaissance</value>
- </property>
- <!--
- | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
- -->
- <property>
- <name>theme.renderSetId</name>
- <value>divRenderer</value>
- </property>
- <!--
- | The default page name, if the property is not explicited then the default page name is "default"
- -->
- <property>
- <name>portal.defaultObjectName</name>
- <value>default</value>
- </property>
- </properties>
<security-constraint>
<policy-permission>
<action-name>viewrecursive</action-name>
@@ -212,6 +212,55 @@
<value>true</value>
</property>
+ <!-- Control policy config -->
+ <property>
+ <name>control.portal.access_denied</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.unavailable</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.not_found</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.resource_uri</name>
+ <value>/WEB-INF/jsp/error/portal.jsp</value>
+ </property>
+ <property>
+ <name>control.page.access_denied</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.unavailable</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.not_found</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.resource_uri</name>
+ <value>/WEB-INF/jsp/error/page.jsp</value>
+ </property>
</properties>
</context>
</deployment>
@@ -230,36 +279,6 @@
<window-state>minimized</window-state>
<window-state>maximized</window-state>
</supported-window-states>
- <properties>
- <!--
- | Set the layout for the default portal, see also portal-layouts.xml.
- -->
- <property>
- <name>layout.id</name>
- <value>generic</value>
- </property>
- <!--
- | Set the theme for the default portal, see also portal-themes.xml.
- -->
- <property>
- <name>theme.id</name>
- <value>renaissance</value>
- </property>
- <!--
- | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
- -->
- <property>
- <name>theme.renderSetId</name>
- <value>divRenderer</value>
- </property>
- <!--
- | The default page name, if the property is not explicited then the default page name is "default"
- -->
- <property>
- <name>portal.defaultObjectName</name>
- <value>default</value>
- </property>
- </properties>
<page>
<page-name>default</page-name>
<properties>
@@ -307,36 +326,6 @@
<window-state>minimized</window-state>
<window-state>maximized</window-state>
</supported-window-states>
- <properties>
- <!--
- | Set the layout for the default portal, see also portal-layouts.xml.
- -->
- <property>
- <name>layout.id</name>
- <value>generic</value>
- </property>
- <!--
- | Set the theme for the default portal, see also portal-themes.xml.
- -->
- <property>
- <name>theme.id</name>
- <value>renaissance</value>
- </property>
- <!--
- | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
- -->
- <property>
- <name>theme.renderSetId</name>
- <value>divRenderer</value>
- </property>
- <!--
- | The default page name, if the property is not explicited then the default page name is "default"
- -->
- <property>
- <name>portal.defaultObjectName</name>
- <value>default</value>
- </property>
- </properties>
<security-constraint>
<policy-permission>
<action-name>viewrecursive</action-name>
18 years, 10 months
JBoss Portal SVN: r7481 - trunk/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-06-19 21:05:25 -0400 (Tue, 19 Jun 2007)
New Revision: 7481
Modified:
trunk/build/build-thirdparty.xml
Log:
Rollback so that it works in 4.0 (but won't in 4.2)
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2007-06-19 23:26:29 UTC (rev 7480)
+++ trunk/build/build-thirdparty.xml 2007-06-20 01:05:25 UTC (rev 7481)
@@ -111,7 +111,7 @@
<componentref name="wutka-dtdparser" version="1.2.1"/>
<componentref name="portals-bridges" version="1.0"/>
<!-- patched jsf-portlet bridge -->
- <componentref name="portals-bridges/jsf-portlet" version="1.2-patched"/>
+ <componentref name="portals-bridges/jsf-portlet" version="1.1.4-patched"/>
</build>
<synchronizeinfo/>
18 years, 10 months
JBoss Portal SVN: r7480 - in trunk: core-admin/src/main/org/jboss/portal/core/admin/ui/actions and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-06-19 19:26:29 -0400 (Tue, 19 Jun 2007)
New Revision: 7480
Modified:
trunk/build/build-thirdparty.xml
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AddPageAction.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java
trunk/faces/src/main/org/jboss/portal/faces/el/ClassConstantPublisherBean.java
Log:
Attempt to get the same JBoss Portal working in 4.0.x with MyFaces + JDK 1.4 and 4.2.x with JSF Sun RI + JDK 5
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2007-06-19 19:42:21 UTC (rev 7479)
+++ trunk/build/build-thirdparty.xml 2007-06-19 23:26:29 UTC (rev 7480)
@@ -111,7 +111,7 @@
<componentref name="wutka-dtdparser" version="1.2.1"/>
<componentref name="portals-bridges" version="1.0"/>
<!-- patched jsf-portlet bridge -->
- <componentref name="portals-bridges/jsf-portlet" version="1.1.4-patched"/>
+ <componentref name="portals-bridges/jsf-portlet" version="1.2-patched"/>
</build>
<synchronizeinfo/>
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AddPageAction.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AddPageAction.java 2007-06-19 19:42:21 UTC (rev 7479)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/actions/AddPageAction.java 2007-06-19 23:26:29 UTC (rev 7480)
@@ -118,4 +118,34 @@
{
void pageCreated(Page page);
}
+
+ public PageContainer getPageContainer()
+ {
+ return pageContainer;
+ }
+
+ public void setPageContainer(PageContainer pageContainer)
+ {
+ this.pageContainer = pageContainer;
+ }
+
+ public String getMessageTarget()
+ {
+ return messageTarget;
+ }
+
+ public void setMessageTarget(String messageTarget)
+ {
+ this.messageTarget = messageTarget;
+ }
+
+ public Listener getListener()
+ {
+ return listener;
+ }
+
+ public void setListener(Listener listener)
+ {
+ this.listener = listener;
+ }
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java 2007-06-19 19:42:21 UTC (rev 7479)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java 2007-06-19 23:26:29 UTC (rev 7480)
@@ -204,4 +204,44 @@
e.printStackTrace();
}
}
+
+ public PortalObjectContainer getPortalObjectContainer()
+ {
+ return portalObjectContainer;
+ }
+
+ public void setPortalObjectContainer(PortalObjectContainer portalObjectContainer)
+ {
+ this.portalObjectContainer = portalObjectContainer;
+ }
+
+ public LayoutService getLayoutService()
+ {
+ return layoutService;
+ }
+
+ public void setLayoutService(LayoutService layoutService)
+ {
+ this.layoutService = layoutService;
+ }
+
+ public ThemeService getThemeService()
+ {
+ return themeService;
+ }
+
+ public void setThemeService(ThemeService themeService)
+ {
+ this.themeService = themeService;
+ }
+
+ public InstanceContainer getInstanceContainer()
+ {
+ return instanceContainer;
+ }
+
+ public void setInstanceContainer(InstanceContainer instanceContainer)
+ {
+ this.instanceContainer = instanceContainer;
+ }
}
Modified: trunk/faces/src/main/org/jboss/portal/faces/el/ClassConstantPublisherBean.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/el/ClassConstantPublisherBean.java 2007-06-19 19:42:21 UTC (rev 7479)
+++ trunk/faces/src/main/org/jboss/portal/faces/el/ClassConstantPublisherBean.java 2007-06-19 23:26:29 UTC (rev 7480)
@@ -139,4 +139,14 @@
return false;
}
}
+
+ public String getClassName()
+ {
+ return className;
+ }
+
+ public void setClassName(String className)
+ {
+ this.className = className;
+ }
}
18 years, 10 months
JBoss Portal SVN: r7479 - in tags/JBoss_Portal_2_6_0_CR3/wsrp/src: main/org/jboss/portal/wsrp/consumer and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-06-19 15:42:21 -0400 (Tue, 19 Jun 2007)
New Revision: 7479
Modified:
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
tags/JBoss_Portal_2_6_0_CR3/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml
Log:
- Implemented access to modifyRegistration.
Modified: tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2007-06-19 19:38:37 UTC (rev 7478)
+++ tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/admin/ui/ConsumerBean.java 2007-06-19 19:42:21 UTC (rev 7479)
@@ -47,6 +47,7 @@
private Boolean useWSDL = null;
private ConsumerManagerBean manager;
private boolean modified;
+ private boolean registrationModified;
private String serviceDescription;
private String markup;
@@ -213,6 +214,11 @@
}
}
+ public boolean isRegistrationModified()
+ {
+ return registrationModified;
+ }
+
public boolean isRegistrationChecked()
{
return getProducerInfo().isRegistrationChecked();
@@ -258,6 +264,8 @@
}
registry.updateProducerInfo(prodInfo);
+ modified = false;
+ registrationModified = false;
}
catch (Exception e)
{
@@ -303,6 +311,8 @@
{
createInfoMessage(null, result.getStatus());
}
+
+ registrationModified = false;
}
catch (Exception e)
{
@@ -324,6 +334,7 @@
{
getProducerInfo().modifyRegistration();
createInfoMessage(null, "Successfully modified Registration!");
+ registrationModified = false;
}
catch (Exception e)
{
@@ -337,15 +348,6 @@
return null;
}
- // Listeners
-
- public void useWSDLListener(ValueChangeEvent event)
- {
- useWSDL = (Boolean)event.getNewValue();
- // bypass the rest of the life cycle and re-display page
- FacesContext.getCurrentInstance().renderResponse();
- }
-
private String modifyIfNeeded(String oldValue, String newValue, String target)
{
if ((oldValue != null && !oldValue.equals(newValue)) || (oldValue == null && newValue != null))
@@ -371,4 +373,22 @@
return oldValue;
}
+
+ // Listeners
+
+ public void useWSDLListener(ValueChangeEvent event)
+ {
+ useWSDL = (Boolean)event.getNewValue();
+
+ // bypass the rest of the life cycle and re-display page
+ FacesContext.getCurrentInstance().renderResponse();
+ }
+
+ public void regPropListener(ValueChangeEvent event)
+ {
+ registrationModified = true;
+
+ // bypass the rest of the life cycle and re-display page
+ FacesContext.getCurrentInstance().renderResponse();
+ }
}
\ No newline at end of file
Modified: tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-06-19 19:38:37 UTC (rev 7478)
+++ tags/JBoss_Portal_2_6_0_CR3/wsrp/src/main/org/jboss/portal/wsrp/consumer/RegistrationInfo.java 2007-06-19 19:42:21 UTC (rev 7479)
@@ -116,7 +116,7 @@
public boolean isRefreshNeeded()
{
- boolean result = dirty || requiresRegistration == null;
+ boolean result = isModified() || requiresRegistration == null;
if (result)
{
log.debug("Refresh needed");
@@ -196,7 +196,7 @@
public RegistrationData getRegistrationData()
{
- if (dirty || registrationData == null)
+ if (isModified() || registrationData == null)
{
registrationData = WSRPTypeFactory.createDefaultRegistrationData();
registrationData.setConsumerName(persistentConsumerName);
@@ -561,6 +561,11 @@
}
}
+ public boolean isModified()
+ {
+ return dirty;
+ }
+
public class RegistrationRefreshResult extends RefreshResult
{
public RegistrationRefreshResult()
Modified: tags/JBoss_Portal_2_6_0_CR3/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml
===================================================================
--- tags/JBoss_Portal_2_6_0_CR3/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-06-19 19:38:37 UTC (rev 7478)
+++ tags/JBoss_Portal_2_6_0_CR3/wsrp/src/resources/portal-wsrp-war/WEB-INF/jsf/consumers/editConsumer.xhtml 2007-06-19 19:42:21 UTC (rev 7479)
@@ -92,8 +92,10 @@
<h:outputText value="#{prop.name}"/>
</td>
<td>
- <h:inputText value="#{prop.value}" size="40"/>
- <h:outputText styleClass="error" value="#{prop.status}" rendered="#{prop.determinedInvalid}"/>
+ <h:inputText value="#{prop.value}" size="40" onchange="this.form.submit()"
+ immediate="true" valueChangeListener="#{consumer.regPropListener}"/>
+ <h:outputText styleClass="error" value="#{prop.status}"
+ rendered="#{prop.determinedInvalid}"/>
</td>
</tr>
</c:forEach>
@@ -146,6 +148,15 @@
</c:if>
</c:otherwise>
</c:choose>
+ <c:if test="#{consumer.registrationModified}">
+ <tr>
+ <td colspan="2">
+ <h:commandLink action="#{consumer.modifyRegistration}" value="Modify registration"
+ title="Modify the registration held with this Producer"
+ styleClass="portlet-form-button"/>
+ </td>
+ </tr>
+ </c:if>
</c:if>
<tr>
<td colspan="2" style="padding: 1em 1em 1em 0;">
18 years, 10 months