JBoss Rich Faces SVN: r6588 - management/design/inplaceInput/design.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2008-03-06 06:52:44 -0500 (Thu, 06 Mar 2008)
New Revision: 6588
Modified:
management/design/inplaceInput/design/inplaceInput.html
Log:
Modified: management/design/inplaceInput/design/inplaceInput.html
===================================================================
--- management/design/inplaceInput/design/inplaceInput.html 2008-03-06 11:02:42 UTC (rev 6587)
+++ management/design/inplaceInput/design/inplaceInput.html 2008-03-06 11:52:44 UTC (rev 6588)
@@ -8,6 +8,8 @@
body{padding : 30px;}
fieldset{padding : 30px; border : 1px solid #c0c0c0;}
legend{font-weight : bold}
+.tab_example {width : 700px; border-top:1px solid #c0c0c0; border-left:1px solid #c0c0c0;}
+.tab_example td{width : 350px; border-bottom:1px solid #c0c0c0; border-right:1px solid #c0c0c0;}
@@ -19,6 +21,21 @@
.is_edit_state{position : relative; width : 100px;}
.is_field{background : #FBFF8E/*editBackgroundColor*/; padding : 0px 0px 0px 0px; border : 0px; margin : 0px; width : 100px; position : absolute; top:0px; left : 0px;}
.is_strut{width : 100px; height : 1px}
+
+
+.is_view_block{position : relative; width : 100%;; padding : 0px 0px 0px 0px; border : 0px; margin : 0px;}
+.is_edit_state_block{background : #FBFF8E/*editBackgroundColor*/; position : relative; width : 100%;; padding : 0px 0px 0px 0px; border : 0px; margin : 0px;}
+.is_field_block{background : #FBFF8E/*editBackgroundColor*/; padding : 0px 0px 0px 0px; border : 0px; margin : 0px; width : 100%;}
+
+
+
+.is_edit_state_block_div{position : relative;}
+.is_view_block_div{position : relative; padding : 2px 2px 2px 5px; border : 0px; margin :0px;}
+.is_edit_block_div{background : #FBFF8E/*editBackgroundColor*/; position : relative; padding : 0px; border : 0px; margin : 2px 2px 2px 5px;}
+.is_field_block_div{background : #FBFF8E/*editBackgroundColor*/;padding :0px; border : 0px; margin : 0px 0px 0px 0px; width : 344px;}
+.is_edit_block_bg_div{ position : absolute; top:0px; left : 0px; background : #FBFF8E/*editBackgroundColor*/; width : 349px; height : 17px; text-align : right}
+
+
.is_btn{
background : url(images/bg_btn.png) top repeat-x #C7D7EC; /*gradient - from generalBackgroundColor to tabBackgroundColor, background-color - tabBackgroundColor*/
border : 1px outset #BED6F8; /*panelBorderColor*/
@@ -29,6 +46,8 @@
border : 1px inset #BED6F8; /*panelBorderColor*/
padding : 0px;
margin : 0px;}
+.is_btn_set_block{ position : absolute; top:-12px; right : 0px; white-space : nowrap}
+
.is_btn_set{ position : absolute; top:0px; left : 100px; white-space : nowrap}
.is_btn_set_tl{ position : absolute; bottom:11px /*generalSizeFont*/; left : 0px; white-space : nowrap}
@@ -41,10 +60,10 @@
.is_shadow{ top:0; left:0; position : absolute;}
.is_shadow_size{ width : 34px; height : 16px;}
-.is_shadow_tl{ background : url(images/bg_shadow.png) repeat-x top left;}
-.is_shadow_tr{ background : url(images/bg_shadow.png) repeat-x top right;}
-.is_shadow_bl{ background : url(images/bg_shadow.png) repeat-x bottom left;}
-.is_shadow_br{ background : url(images/bg_shadow.png) repeat-x bottom right;}
+.is_shadow_tl{ background : url(images/bg_shadow.png) repeat-x top left; border : 0px !important}
+.is_shadow_tr{ background : url(images/bg_shadow.png) repeat-x top right; border : 0px !important}
+.is_shadow_bl{ background : url(images/bg_shadow.png) repeat-x bottom left; border : 0px !important}
+.is_shadow_br{ background : url(images/bg_shadow.png) repeat-x bottom right; border : 0px !important}
</style>
</head>
@@ -61,7 +80,7 @@
-<fieldset><legend>Edit State</legend><br><br>
+<fieldset><legend>Edit State (inline)</legend><br><br>
<div style="width : 300px;">
Fresh off his victory in the Florida primary, Sen. John McCain is poised to take another big prize. Former
<span class="is_edit_state">
@@ -105,5 +124,117 @@
</fieldset>
+<fieldset><legend>Edit State (block variant 1)</legend><br><br>
+<Table class="tab_example" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ <input type="Text" class="is_view_block" readonly="readonly" value="View mode">
+ </td>
+ <td>
+ <input type="Text" class="is_view_block" readonly="readonly" value="View mode">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="is_edit_state_block">
+ <input type="Text" value="Edit mode" class="is_field_block"><div class="is_btn_set_block">
+ <div class="is_shadow">
+ <table cellpadding="0" cellspacing="0" border="0" class="is_shadow_size">
+ <tr>
+ <td class="is_shadow_tl">
+ <img src="images/spacer.gif" width="10" height="1" alt="" border="0"><br>
+ </td>
+ <td class="is_shadow_tr">
+ <img src="images/spacer.gif" width="1" height="10" alt="" border="0"><br>
+ </td>
+ </tr>
+ <tr>
+ <td class="is_shadow_bl">
+ <img src="images/spacer.gif" width="1" height="10" alt="" border="0"><br>
+ </td>
+ <td class="is_shadow_br">
+ <img src="images/spacer.gif" width="10" height="1" alt="" border="0"><br>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div style="position : relative">
+ <input type="image" src="images/ico_ok.gif" class="is_btn" onmousedown="this.className='is_btn_press'" onmouseout="this.className='is_btn'" onmouseup="this.className='is_btn'"><input type="image" src="images/ico_cancel.gif" class="is_btn" onmousedown="this.className='is_btn_press'" onmouseout="this.className='is_btn'" onmouseup="this.className='is_btn'">
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <input type="Text" class="is_view_block" readonly="readonly" value="View mode">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="Text" class="is_view_block" readonly="readonly" value="View mode">
+ </td>
+ <td>
+ <input type="Text" class="is_view_block is_changed_state" readonly="readonly" value="View mode">
+ </td>
+ </tr>
+</table>
+</fieldset>
+
+
+<fieldset><legend>Edit State (variant 2)</legend><br><br>
+<Table class="tab_example" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ <div class="is_view_block_div">View mode</div>
+ </td>
+ <td>
+ <div class="is_view_block_div">View mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="is_edit_state_block_div" style="background : green">
+ <div class="is_view_block_div">View mode</div><div class="is_edit_block_bg_div"><input type="Text" value="Edit mode" class="is_field_block_div"></div><div class="is_btn_set_block">
+ <div class="is_shadow">
+ <table cellpadding="0" cellspacing="0" border="0" class="is_shadow_size">
+ <tr>
+ <td class="is_shadow_tl">
+ <img src="images/spacer.gif" width="10" height="1" alt="" border="0"><br>
+ </td>
+ <td class="is_shadow_tr">
+ <img src="images/spacer.gif" width="1" height="10" alt="" border="0"><br>
+ </td>
+ </tr>
+ <tr>
+ <td class="is_shadow_bl">
+ <img src="images/spacer.gif" width="1" height="10" alt="" border="0"><br>
+ </td>
+ <td class="is_shadow_br">
+ <img src="images/spacer.gif" width="10" height="1" alt="" border="0"><br>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div style="position : relative">
+ <input type="image" src="images/ico_ok.gif" class="is_btn" onmousedown="this.className='is_btn_press'" onmouseout="this.className='is_btn'" onmouseup="this.className='is_btn'"><input type="image" src="images/ico_cancel.gif" class="is_btn" onmousedown="this.className='is_btn_press'" onmouseout="this.className='is_btn'" onmouseup="this.className='is_btn'">
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="is_view_block_div">View mode</div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="is_view_block_div">View mode</div>
+ </td>
+ <td>
+ <div class="is_view_block_div">View mode</div>
+ </td>
+ </tr>
+</table>
+</fieldset>
+
+
</body>
</html>
16 years, 10 months
JBoss Rich Faces SVN: r6587 - trunk/ui/inplaceSelect/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-06 06:02:42 -0500 (Thu, 06 Mar 2008)
New Revision: 6587
Modified:
trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
Log:
fix valueChangeListener attribute generation
Modified: trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
===================================================================
--- trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-03-06 10:46:53 UTC (rev 6586)
+++ trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-03-06 11:02:42 UTC (rev 6587)
@@ -185,6 +185,7 @@
</property>
&html_events;
&ui_component_attributes;
+ &ui_input_attributes;
</properties>
</component>
16 years, 10 months
JBoss Rich Faces SVN: r6586 - in trunk/samples/simpleTogglePanel-sample/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-06 05:46:53 -0500 (Thu, 06 Mar 2008)
New Revision: 6586
Added:
trunk/samples/simpleTogglePanel-sample/src/main/java/org/richfaces/SimpleBean.java
trunk/samples/simpleTogglePanel-sample/src/main/webapp/pages/pageRF_2195.jsp
Modified:
trunk/samples/simpleTogglePanel-sample/src/main/webapp/WEB-INF/faces-config.xml
Log:
Update test sample for http://jira.jboss.com/jira/browse/RF-2195 issue
Added: trunk/samples/simpleTogglePanel-sample/src/main/java/org/richfaces/SimpleBean.java
===================================================================
--- trunk/samples/simpleTogglePanel-sample/src/main/java/org/richfaces/SimpleBean.java (rev 0)
+++ trunk/samples/simpleTogglePanel-sample/src/main/java/org/richfaces/SimpleBean.java 2008-03-06 10:46:53 UTC (rev 6586)
@@ -0,0 +1,49 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+/**
+ * Test bean for "\pages\pageRF_2195.jsp" for
+ * {@link http://jira.jboss.com/jira/browse/RF-2195} issue
+ *
+ * @author Vladislav Baranov
+ */
+public class SimpleBean {
+
+ Integer property = 1;
+
+ public Integer getProperty() {
+ return property;
+ }
+
+ public void setProperty(Integer property) {
+ this.property = property;
+ }
+
+ public String changeLabel() {
+ System.out.println("ActionEvent fired");
+ property++;
+ System.out.println("Value of property on server : " + property);
+
+ return "success";
+ }
+}
Property changes on: trunk/samples/simpleTogglePanel-sample/src/main/java/org/richfaces/SimpleBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/samples/simpleTogglePanel-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/simpleTogglePanel-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-03-06 10:46:09 UTC (rev 6585)
+++ trunk/samples/simpleTogglePanel-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-03-06 10:46:53 UTC (rev 6586)
@@ -12,5 +12,18 @@
<managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>simpleBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.SimpleBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <navigation-rule>
+ <from-view-id>/pages/pageRF_2195.jsf</from-view-id>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/pages/pageRF_2195.jsf</to-view-id>
+ </navigation-case>
+ </navigation-rule>
</faces-config>
Added: trunk/samples/simpleTogglePanel-sample/src/main/webapp/pages/pageRF_2195.jsp
===================================================================
--- trunk/samples/simpleTogglePanel-sample/src/main/webapp/pages/pageRF_2195.jsp (rev 0)
+++ trunk/samples/simpleTogglePanel-sample/src/main/webapp/pages/pageRF_2195.jsp 2008-03-06 10:46:53 UTC (rev 6586)
@@ -0,0 +1,20 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/simpleTogglePanel" prefix="stp" %>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
+<html>
+<head>
+ <title>RF-2195</title>
+</head>
+
+<body>
+ <f:view>
+ <h:form id="SimpleToglePanel_form">
+ <stp:simpleTogglePanel label="STP" switchType="ajax" reRender="out" action="#{simpleBean.changeLabel}">
+ <h:outputText value="content"/>
+ </stp:simpleTogglePanel>
+ <h:outputText value="#{simpleBean.property}" id="out"/>
+ </h:form>
+ </f:view>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/samples/simpleTogglePanel-sample/src/main/webapp/pages/pageRF_2195.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
16 years, 10 months
JBoss Rich Faces SVN: r6585 - trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-06 05:46:09 -0500 (Thu, 06 Mar 2008)
New Revision: 6585
Modified:
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-2195
Modified: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2008-03-06 10:30:56 UTC (rev 6584)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2008-03-06 10:46:09 UTC (rev 6585)
@@ -119,10 +119,16 @@
panel.setOpened(new Boolean((String) clnId).booleanValue());
}
+ // in case of "ajax" request and "ajax" switch mode of toggle panel
+ // set the regions to be rendered (reRendered) after operating this "ajax" request
if (AjaxRendererUtils.isAjaxRequest(context) && panel.getSwitchType().equals(UISimpleTogglePanel.AJAX_SWITCH_TYPE)) {
- AjaxRendererUtils.addRegionByName(context,
+ // add toggle panel itself to rendered list of components
+ AjaxRendererUtils.addRegionByName(context,
panel,
panel.getId());
+ // add regions specified in the "reRender" attribute of toggle panel
+ // to rendered list of components
+ AjaxRendererUtils.addRegionsFromComponent(panel, context);
}
}
16 years, 10 months
JBoss Rich Faces SVN: r6584 - in trunk/samples/panelmenu-sample/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-06 05:30:56 -0500 (Thu, 06 Mar 2008)
New Revision: 6584
Added:
trunk/samples/panelmenu-sample/src/main/java/org/richfaces/MenuBean.java
trunk/samples/panelmenu-sample/src/main/webapp/pages/pageFalse.jsp
trunk/samples/panelmenu-sample/src/main/webapp/pages/pageTrue.jsp
Modified:
trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF/faces-config.xml
Log:
Modified test sample for http://jira.jboss.com/jira/browse/RF-2192
Added: trunk/samples/panelmenu-sample/src/main/java/org/richfaces/MenuBean.java
===================================================================
--- trunk/samples/panelmenu-sample/src/main/java/org/richfaces/MenuBean.java (rev 0)
+++ trunk/samples/panelmenu-sample/src/main/java/org/richfaces/MenuBean.java 2008-03-06 10:30:56 UTC (rev 6584)
@@ -0,0 +1,60 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import javax.faces.event.ActionEvent;
+
+/**
+ * Backing bean for "\pages\pageFalse.jsp" and "\pages\pageTrue.jsp"
+ * to test {@link http://jira.jboss.com/jira/browse/RF-2192} issue.
+ *
+ * @author vbaranov
+ */
+public class MenuBean {
+
+ /**
+ * ActionListener method. Prints a string to "System.out" when invoked.
+ * @param event - ActionEvent
+ */
+ public void item1Clicked(ActionEvent event)
+ {
+ System.out.println("menu item 1 clicked");
+ }
+
+ /**
+ * ActionListener method. Prints a string to "System.out" when invoked.
+ * @param event - ActionEvent
+ */
+ public void item2Clicked(ActionEvent event)
+ {
+ System.out.println("menu item 2 clicked");
+ }
+
+ /**
+ * ActionListener method. Prints a string to "System.out" when invoked.
+ * @param event - ActionEvent
+ */
+ public void item3Clicked(ActionEvent event)
+ {
+ System.out.println("menu item 3 clicked");
+ }
+}
Property changes on: trunk/samples/panelmenu-sample/src/main/java/org/richfaces/MenuBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-03-06 10:21:19 UTC (rev 6583)
+++ trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-03-06 10:30:56 UTC (rev 6584)
@@ -12,6 +12,11 @@
<managed-bean-class>org.richfaces.Bean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>menu</managed-bean-name>
+ <managed-bean-class>org.richfaces.MenuBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
</faces-config>
Added: trunk/samples/panelmenu-sample/src/main/webapp/pages/pageFalse.jsp
===================================================================
--- trunk/samples/panelmenu-sample/src/main/webapp/pages/pageFalse.jsp (rev 0)
+++ trunk/samples/panelmenu-sample/src/main/webapp/pages/pageFalse.jsp 2008-03-06 10:30:56 UTC (rev 6584)
@@ -0,0 +1,25 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/panelmenu" prefix="pm"%>
+<html>
+<head>
+ <title>RF-2192</title>
+</head>
+<body>
+ <f:view>
+ <h:form>
+ <pm:panelMenu id="menu" expandSingle="true">
+ <pm:panelMenuGroup label="Group1">
+ <pm:panelMenuItem label="Item1" actionListener="#{menu.item1Clicked}"/>
+ </pm:panelMenuGroup>
+ <pm:panelMenuGroup label="Group2">
+ <pm:panelMenuItem label="Item2" actionListener="#{menu.item2Clicked}"/>
+ </pm:panelMenuGroup>
+ <pm:panelMenuGroup label="Group3">
+ <pm:panelMenuItem label="Item3" actionListener="#{menu.item3Clicked}"/>
+ </pm:panelMenuGroup>
+ </pm:panelMenu>
+ </h:form>
+ </f:view>
+</html>
\ No newline at end of file
Property changes on: trunk/samples/panelmenu-sample/src/main/webapp/pages/pageFalse.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/samples/panelmenu-sample/src/main/webapp/pages/pageTrue.jsp
===================================================================
--- trunk/samples/panelmenu-sample/src/main/webapp/pages/pageTrue.jsp (rev 0)
+++ trunk/samples/panelmenu-sample/src/main/webapp/pages/pageTrue.jsp 2008-03-06 10:30:56 UTC (rev 6584)
@@ -0,0 +1,25 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/panelmenu" prefix="pm"%>
+<html>
+<head>
+ <title>RF-2192</title>
+</head>
+<body>
+ <f:view>
+ <h:form>
+ <pm:panelMenu id="menu" expandSingle="false">
+ <pm:panelMenuGroup label="Group1">
+ <pm:panelMenuItem label="Item1" actionListener="#{menu.item1Clicked}"/>
+ </pm:panelMenuGroup>
+ <pm:panelMenuGroup label="Group2">
+ <pm:panelMenuItem label="Item2" actionListener="#{menu.item2Clicked}"/>
+ </pm:panelMenuGroup>
+ <pm:panelMenuGroup label="Group3">
+ <pm:panelMenuItem label="Item3" actionListener="#{menu.item3Clicked}"/>
+ </pm:panelMenuGroup>
+ </pm:panelMenu>
+ </h:form>
+ </f:view>
+</html>
\ No newline at end of file
Property changes on: trunk/samples/panelmenu-sample/src/main/webapp/pages/pageTrue.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
16 years, 10 months
JBoss Rich Faces SVN: r6583 - in trunk/ui/panelmenu/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-06 05:21:19 -0500 (Thu, 06 Mar 2008)
New Revision: 6583
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
http://jira.jboss.com/jira/browse/RF-2192
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2008-03-06 10:12:04 UTC (rev 6582)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2008-03-06 10:21:19 UTC (rev 6583)
@@ -85,8 +85,23 @@
return params;
}
+
+ @Override
+ protected void preEncodeBegin(FacesContext context, UIComponent component) throws IOException {
+ super.preEncodeBegin(context, component);
+
+ // In case of encoding the UIPanelMenu in "expandSingle=true" mode
+ // the value of "firstExpandedEncoded" attribute should be reset to
+ // initial "false" state
+ if (component instanceof UIPanelMenu) {
+ UIPanelMenu panelMenu = (UIPanelMenu) component;
+ if (panelMenu.isExpandSingle()) {
+ panelMenu.getAttributes().put("firstExpandedEncoded", false);
+ }
+ }
+ }
+
-
public void insertScript(FacesContext context, UIComponent component)
throws IOException {
@@ -504,7 +519,7 @@
}
public void renderChildren(FacesContext facesContext, UIComponent component)throws IOException {
-
+
if(component instanceof UIPanelMenu){
UIPanelMenu panelMenu = (UIPanelMenu)component;
if(panelMenu.getChildCount() > 0){
Modified: trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-03-06 10:12:04 UTC (rev 6582)
+++ trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-03-06 10:21:19 UTC (rev 6583)
@@ -286,9 +286,11 @@
this.expand();
}
}
- if (this.action){
- this.trigger(e);
- }
+ // trigger event not only for action, but also for actionListener
+ this.trigger(e);
+ //if (this.action){
+ // this.trigger(e);
+ //}
this.parentObj.lastExpanded = this;
} else {
if ("node" == this.type){
16 years, 10 months
JBoss Rich Faces SVN: r6582 - in trunk/samples/datascroller-sample/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-06 05:12:04 -0500 (Thu, 06 Mar 2008)
New Revision: 6582
Modified:
trunk/samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java
trunk/samples/datascroller-sample/src/main/webapp/pages/index.jsp
Log:
Update samples to test http://jira.jboss.com/jira/browse/RF-1834
Modified: trunk/samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java
===================================================================
--- trunk/samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java 2008-03-06 10:11:59 UTC (rev 6581)
+++ trunk/samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java 2008-03-06 10:12:04 UTC (rev 6582)
@@ -24,6 +24,7 @@
import javax.faces.event.ActionEvent;
+import org.ajax4jsf.component.html.HtmlAjaxCommandLink;
import org.richfaces.event.DataScrollerEvent;
public class TestBean {
@@ -87,6 +88,15 @@
}
+ /**
+ * ActionListener to test {@link http://jira.jboss.com/jira/browse/RF-1834}
+ *
+ * @param e - ActionEvent
+ */
+ public void doSort(ActionEvent e){
+ HtmlAjaxCommandLink a = (HtmlAjaxCommandLink)e.getComponent();
+ System.out.println("ActionListener :" + a.getValue().toString());
+ }
public void setRenderIfSinglePage(boolean renderIfSinglePage){
this.renderIfSinglePage = renderIfSinglePage;
Modified: trunk/samples/datascroller-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/datascroller-sample/src/main/webapp/pages/index.jsp 2008-03-06 10:11:59 UTC (rev 6581)
+++ trunk/samples/datascroller-sample/src/main/webapp/pages/index.jsp 2008-03-06 10:12:04 UTC (rev 6582)
@@ -3,6 +3,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/datascroller" prefix="ds"%>
<html>
@@ -32,7 +33,7 @@
</f:facet>
<h:column>
<f:facet name="header">
- <h:outputText value="Number 1" />
+ <a4j:commandLink value="Number 1" reRender="master" actionListener="#{testBean.doSort}"/>
</f:facet>
<h:outputText value="#{data.number1}" />
<f:facet name="footer">
16 years, 10 months
JBoss Rich Faces SVN: r6581 - in trunk/samples/richfaces-art-datatable/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-06 05:11:59 -0500 (Thu, 06 Mar 2008)
New Revision: 6581
Modified:
trunk/samples/richfaces-art-datatable/src/main/java/org/rf/datatable/ExpenseReport.java
trunk/samples/richfaces-art-datatable/src/main/webapp/pages/columnsSorting.jsp
Log:
Update samples to test http://jira.jboss.com/jira/browse/RF-1834
Modified: trunk/samples/richfaces-art-datatable/src/main/java/org/rf/datatable/ExpenseReport.java
===================================================================
--- trunk/samples/richfaces-art-datatable/src/main/java/org/rf/datatable/ExpenseReport.java 2008-03-05 23:37:52 UTC (rev 6580)
+++ trunk/samples/richfaces-art-datatable/src/main/java/org/rf/datatable/ExpenseReport.java 2008-03-06 10:11:59 UTC (rev 6581)
@@ -119,6 +119,11 @@
rec.getItems().add(new ExpenseReportRecordItem("30-Aug-97",100.50,80.0,32.0));
rec.getItems().add(new ExpenseReportRecordItem("31-Aug-97",180.00,80.0,32.0));
records.add(rec);
+ rec = new ExpenseReportRecord();
+ rec.setCity("New York");
+ rec.getItems().add(new ExpenseReportRecordItem("01-Sep-97",120.40,104.0,50.00));
+ rec.getItems().add(new ExpenseReportRecordItem("02-Sep-97",110.50,104.0,50.0));
+ records.add(rec);
}
public String sortCityNames(){
Modified: trunk/samples/richfaces-art-datatable/src/main/webapp/pages/columnsSorting.jsp
===================================================================
--- trunk/samples/richfaces-art-datatable/src/main/webapp/pages/columnsSorting.jsp 2008-03-05 23:37:52 UTC (rev 6580)
+++ trunk/samples/richfaces-art-datatable/src/main/webapp/pages/columnsSorting.jsp 2008-03-06 10:11:59 UTC (rev 6581)
@@ -11,7 +11,7 @@
<f:view>
<h:outputText value="RichFaces dataTable Article. Example #6. Sorting Rows."/>
<h:form>
- <rich:dataTable value="#{expenseReport.records}" var="record" id="table">
+ <rich:dataTable value="#{expenseReport.records}" var="record" id="table" rows="2">
<h:column>
<f:facet name="header">
<a4j:commandLink value="City Name" action="#{expenseReport.sortCityNames}" reRender="table" ajaxSingle="true"/>
@@ -50,6 +50,9 @@
<f:convertNumber pattern="$####.00" />
</h:outputText>
</h:column>
+ <f:facet name="footer">
+ <rich:datascroller for="table" rendered="true" />
+ </f:facet>
</rich:dataTable>
<a4j:status startText="Sorting in progress" stopText=" " startStyle="color:red">
</a4j:status>
16 years, 10 months
JBoss Rich Faces SVN: r6579 - in trunk: framework/api/src/test and 9 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-03-05 18:37:50 -0500 (Wed, 05 Mar 2008)
New Revision: 6579
Added:
trunk/framework/api/src/test/
trunk/framework/api/src/test/java/
trunk/framework/api/src/test/java/org/
trunk/framework/api/src/test/java/org/ajax4jsf/
trunk/framework/api/src/test/java/org/ajax4jsf/framework/
trunk/framework/api/src/test/java/org/ajax4jsf/framework/util/
trunk/framework/api/src/test/java/org/ajax4jsf/framework/util/javascript/
trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneTwoInvoker.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/context/InvokerCallback.java
trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneOneInvoker.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java
trunk/ui/core/src/main/java/org/ajax4jsf/component/UIAjaxRegion.java
Log:
Move ScriptUtil tests to api project.
Start to use invokeOnComponent for a region/ajaxSingle processing.
Copied: trunk/framework/api/src/test/java/org/ajax4jsf/framework/util/javascript (from rev 6573, trunk/framework/impl/src/test/java/org/ajax4jsf/framework/util/javascript)
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2008-03-05 23:13:02 UTC (rev 6578)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2008-03-05 23:37:50 UTC (rev 6579)
@@ -252,7 +252,7 @@
private InvokerCallback _decodeInvoker = new InvokerCallback() {
- public void invoke(FacesContext context, UIComponent component) {
+ public void invokeContextCallback(FacesContext context, UIComponent component) {
component.processDecodes(context);
}
@@ -283,7 +283,7 @@
private InvokerCallback _updatesInvoker = new InvokerCallback() {
- public void invoke(FacesContext context, UIComponent component) {
+ public void invokeContextCallback(FacesContext context, UIComponent component) {
component.processUpdates(context);
}
@@ -311,7 +311,7 @@
private InvokerCallback _validatorsInvoker = new InvokerCallback() {
- public void invoke(FacesContext context, UIComponent component) {
+ public void invokeContextCallback(FacesContext context, UIComponent component) {
component.processValidators(context);
}
@@ -365,7 +365,7 @@
// }
private InvokerCallback _ajaxInvoker = new InvokerCallback() {
- public void invoke(FacesContext context, UIComponent component) {
+ public void invokeContextCallback(FacesContext context, UIComponent component) {
try {
if (component instanceof AjaxContainer) {
AjaxContainer ajax = (AjaxContainer) component;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2008-03-05 23:13:02 UTC (rev 6578)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2008-03-05 23:37:50 UTC (rev 6579)
@@ -64,7 +64,6 @@
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.resource.InternetResourceBuilder;
import org.ajax4jsf.resource.ResourceNotFoundException;
-import org.ajax4jsf.util.ELUtils;
import org.ajax4jsf.webapp.BaseFilter;
import org.ajax4jsf.webapp.FilterServletResponseWrapper;
import org.apache.commons.logging.Log;
@@ -88,11 +87,6 @@
//as they have their own advanced styling
private static final Pattern USER_AGENTS = Pattern.compile(" AppleWebKit/|^Opera/| Opera ");
- private static final String INIT_PARAMETER_PREFIX = "_init_parameter_";
-
- //Object to put into application map as a value of cached parameter if it is null
- private static final Object NULL = new Object();
-
private static final Log log = LogFactory.getLog(AjaxContext.class);
private static ComponentInvoker invoker;
@@ -126,7 +120,7 @@
static {
try {
// Attempt to create JSF1.2 specific invoker.
- invoker = new JsfOneOneInvoker();
+ invoker = new JsfOneTwoInvoker();
} catch (Exception e) {
invoker = new JsfOneOneInvoker();
}
@@ -188,7 +182,7 @@
private InvokerCallback _ajaxInvoker = new InvokerCallback() {
- public void invoke(FacesContext context, UIComponent component) {
+ public void invokeContextCallback(FacesContext context, UIComponent component) {
if (component instanceof AjaxContainer) {
AjaxContainer ajax = (AjaxContainer) component;
renderAjaxRegion(context, component, true);
@@ -212,7 +206,7 @@
final boolean useFilterWriter) {
InvokerCallback ajaxInvoker = new InvokerCallback() {
- public void invoke(FacesContext context, UIComponent component) {
+ public void invokeContextCallback(FacesContext context, UIComponent component) {
if (component instanceof AjaxContainer) {
renderAjaxRegion(context, component, useFilterWriter);
} else {
@@ -426,15 +420,15 @@
boolean useStdControlsSkinning = false;
- String stdControlsSkinning = getInitParameterValue(context, InternetResourceBuilder.STD_CONTROLS_SKINNING_PARAM);
- if (stdControlsSkinning != null) {
+ String stdControlsSkinning = externalContext.getInitParameter(InternetResourceBuilder.STD_CONTROLS_SKINNING_PARAM);
+ if (stdControlsSkinning != null && stdControlsSkinning.length() != 0) {
useStdControlsSkinning = InternetResourceBuilder.ENABLE.equals(stdControlsSkinning);
}
boolean useStdControlsSkinningClasses = true;
- String stdControlsSkinningClasses = getInitParameterValue(context, InternetResourceBuilder.STD_CONTROLS_SKINNING_CLASSES_PARAM);
- if (stdControlsSkinningClasses != null) {
+ String stdControlsSkinningClasses = externalContext.getInitParameter(InternetResourceBuilder.STD_CONTROLS_SKINNING_CLASSES_PARAM);
+ if (stdControlsSkinningClasses != null && stdControlsSkinningClasses.length() != 0) {
useStdControlsSkinningClasses = InternetResourceBuilder.ENABLE.equals(stdControlsSkinningClasses);
}
@@ -898,55 +892,4 @@
return true;
}
}
-
- private String evaluate(FacesContext context, Object parameterValue) {
- if (parameterValue == NULL || parameterValue == null) {
- return null;
- } else if (parameterValue instanceof ValueExpression) {
- ValueExpression expression = (ValueExpression) parameterValue;
-
- return (String) expression.getValue(context.getELContext());
- } else {
- return parameterValue.toString();
- }
- }
-
- private String getInitParameterValue(FacesContext context, String parameterName) {
-
- String key = INIT_PARAMETER_PREFIX + parameterName;
-
- ExternalContext externalContext = context.getExternalContext();
- Map<String, Object> applicationMap = externalContext.getApplicationMap();
- Object mutex = externalContext.getRequest();
- Object parameterValue = null;
-
- synchronized (mutex) {
- parameterValue = applicationMap.get(key);
-
- if (parameterValue == null) {
-
- String initParameter = externalContext.getInitParameter(parameterName);
- if (initParameter != null) {
-
- if (ELUtils.isValueReference(initParameter)) {
- Application application = context.getApplication();
- ExpressionFactory expressionFactory = application.getExpressionFactory();
-
- parameterValue = expressionFactory.createValueExpression(context.getELContext(),
- initParameter,
- String.class);
- } else {
- parameterValue = initParameter;
- }
-
- } else {
- parameterValue = NULL;
- }
-
- applicationMap.put(key, parameterValue);
- }
- }
-
- return evaluate(context, parameterValue);
- }
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/InvokerCallback.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/InvokerCallback.java 2008-03-05 23:13:02 UTC (rev 6578)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/InvokerCallback.java 2008-03-05 23:37:50 UTC (rev 6579)
@@ -21,6 +21,7 @@
package org.ajax4jsf.context;
+import javax.faces.component.ContextCallback;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -30,14 +31,14 @@
* @author shura
*
*/
-public interface InvokerCallback {
+public interface InvokerCallback extends ContextCallback {
/**
* Process method on given component.
* @param context
* @param component
*/
- public void invoke(FacesContext context, UIComponent component);
+ public void invokeContextCallback(FacesContext context, UIComponent component);
/**
* Default processing on UIVewRoot
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneOneInvoker.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneOneInvoker.java 2008-03-05 23:13:02 UTC (rev 6578)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneOneInvoker.java 2008-03-05 23:37:50 UTC (rev 6579)
@@ -75,7 +75,7 @@
*/
public boolean invokeOnComponent(UIComponent root, FacesContext context, InvokerCallback callback, String regionId) {
if(regionId.equals(root.getClientId(context))){
- callback.invoke(context, root);
+ callback.invokeContextCallback(context, root);
return true;
}
for (Iterator iter = root.getFacetsAndChildren(); iter.hasNext();) {
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneTwoInvoker.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneTwoInvoker.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneTwoInvoker.java 2008-03-05 23:37:50 UTC (rev 6579)
@@ -0,0 +1,74 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.context;
+
+import java.util.Iterator;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.component.AjaxViewRoot;
+import org.ajax4jsf.context.AjaxContext;
+
+/**
+ * @author shura
+ *
+ */
+public class JsfOneTwoInvoker implements ComponentInvoker {
+
+
+
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.framework.ajax.AjaxInvoker#invokeOnRegionOrRoot(org.ajax4jsf.framework.ajax.AjaxViewRoot, javax.faces.context.FacesContext, org.ajax4jsf.framework.ajax.InvokerCallback, javax.faces.event.PhaseId)
+ */
+ public void invokeOnRegionOrRoot(AjaxViewRoot viewRoot, FacesContext context, InvokerCallback callback) {
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ String submittedRegionClientId = ajaxContext.getSubmittedRegionClientId(context);
+ if(null == submittedRegionClientId || viewRoot.getClientId(context).equals(submittedRegionClientId)){
+ // This is a not AJAX request, or active region is root.
+ callback.invokeRoot(context);
+ } else {
+ if(!invokeOnComponent(viewRoot, context, callback, submittedRegionClientId)){
+ // Region not found - perform default actions.
+ // TODO - log errors.
+ callback.invokeRoot(context);
+ }
+ }
+
+ }
+
+ public void invokeOnRegion(FacesContext context, InvokerCallback callback, String regionId) {
+ UIViewRoot viewRoot = context.getViewRoot();
+ invokeOnComponent(viewRoot,context,callback,regionId);
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.framework.ajax.AjaxInvoker#invokeOnComponent(javax.faces.component.UIComponent, javax.faces.context.FacesContext, org.ajax4jsf.framework.ajax.InvokerCallback, java.lang.String)
+ */
+ public boolean invokeOnComponent(UIComponent root, FacesContext context, InvokerCallback callback, String regionId) {
+ return root.invokeOnComponent(context, regionId, callback);
+ }
+
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/context/JsfOneTwoInvoker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java 2008-03-05 23:13:02 UTC (rev 6578)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java 2008-03-05 23:37:50 UTC (rev 6579)
@@ -117,18 +117,24 @@
* @return
* @throws IOException
*/
- public synchronized PreparedTemplate getTemplate(InternetResource base, ResourceContext context) throws IOException {
+ public synchronized PreparedTemplate getTemplate(InternetResource base,
+ ResourceContext context) throws IOException {
PreparedTemplate template;
- // if(base.isCacheable()){
- template = (PreparedTemplate) base.getProperty(COMPILED_TEMPLATE_PROPERTY);
- // }
- if(null == template){
- HtmlCompiler compiler = new HtmlCompiler();
- InputStream resourceAsStream = base.getResourceAsStream(context);
- template = compiler.compile(resourceAsStream, base.getKey());
- base.setProperty(COMPILED_TEMPLATE_PROPERTY, template);
- resourceAsStream.close();
- }
+ // if(base.isCacheable()){
+ template = (PreparedTemplate) base
+ .getProperty(COMPILED_TEMPLATE_PROPERTY);
+ // }
+ if (null == template) {
+ HtmlCompiler compiler = new HtmlCompiler();
+ InputStream resourceAsStream = base.getResourceAsStream(context);
+ if (null != resourceAsStream) {
+ template = compiler.compile(resourceAsStream, base.getKey());
+ base.setProperty(COMPILED_TEMPLATE_PROPERTY, template);
+ resourceAsStream.close();
+ } else {
+ throw new IOException("CSS Template "+base.getKey()+" not found");
+ }
+ }
return template;
}
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/component/UIAjaxRegion.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/component/UIAjaxRegion.java 2008-03-05 23:13:02 UTC (rev 6578)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/component/UIAjaxRegion.java 2008-03-05 23:37:50 UTC (rev 6579)
@@ -71,7 +71,7 @@
private InvokerCallback _ajaxInvoker = new InvokerCallback() {
- public void invoke(FacesContext context, UIComponent component) {
+ public void invokeContextCallback(FacesContext context, UIComponent component) {
try {
if (component instanceof AjaxContainer) {
AjaxContainer ajax = (AjaxContainer) component;
16 years, 10 months