[gatein-commits] gatein SVN: r475 - portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Nov 3 03:36:54 EST 2009


Author: truong.le
Date: 2009-11-03 03:36:54 -0500 (Tue, 03 Nov 2009)
New Revision: 475

Modified:
   portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIWizardPageSelectLayoutForm.gtmpl
Log:
GTNPORTAL-74: Problem at steps 2 when create page 

Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIWizardPageSelectLayoutForm.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIWizardPageSelectLayoutForm.gtmpl	2009-11-02 04:07:48 UTC (rev 474)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIWizardPageSelectLayoutForm.gtmpl	2009-11-03 08:36:54 UTC (rev 475)
@@ -9,7 +9,7 @@
 
 	def categories = uicomponent.getItemCategories();
 	UIForm form = uicomponent.getParent();
-	UIDropDownControl drop = form.getChild(UIDropDownControl.class);
+	UIDropDownControl drop = form.getChild(UIDropDownControl.class);
 %>
 <div class="UIItemSelector">
 	<div class="RightColumnStyle">
@@ -21,7 +21,20 @@
 				for(category in categories){
 					templates = category.getSelectItemOptions();
 					String display = "none";	
-					if(category.isSelected()) display = "block"; else templates.get(0).setSelected(true);	 
+					if(category.isSelected()) display = "block"; else 
+					{
+						boolean isSelected = false;
+						
+						for(template in templates) {
+							if(template.isSelected()) {
+								isSelected = true;
+								break;
+							}	
+						}
+						
+						if(!isSelected)
+							templates.get(0).setSelected(true);
+					}	 
 			%>
 					<div class="ItemList ItemListBackground"	style="display: $display;">
 						<%								



More information about the gatein-commits mailing list