JBoss Rich Faces SVN: r8958 - branches/3.1.x/test-applications/facelets/src/main/webapp/Effect.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-06-09 11:23:14 -0400 (Mon, 09 Jun 2008)
New Revision: 8958
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml
Log:
RF-3650
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml 2008-06-09 12:35:29 UTC (rev 8957)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml 2008-06-09 15:23:14 UTC (rev 8958)
@@ -126,7 +126,7 @@
<div id="divID"
style="width: 100px; height: 50px; background-color: red"><rich:effect
event="onclick" targetId="imageID" type="Opacity"
- params="duration:0.5,from:0.4,to:1.0" />
+ params="duration:0.5,from:0.4,to:1.0" /></div>
</f:verbatim>
</h:panelGrid>
16 years, 1 month
JBoss Rich Faces SVN: r8957 - trunk/test-applications/seleniumTest/src/test/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-06-09 08:35:29 -0400 (Mon, 09 Jun 2008)
New Revision: 8957
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-09 12:31:13 UTC (rev 8956)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-09 12:35:29 UTC (rev 8957)
@@ -131,48 +131,6 @@
selenium = null;
}
}
-
-// /**
-// * Renders page
-// */
-// @Deprecated
-// protected void renderPage(String homePage) {
-// selenium.open(protocol + "://" + host + ":" + port + "/" + APPLICATION_NAME + homePage);
-// selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
-//
-// checkPageRendering(); // At the first we check if page has been
-// // rendered
-// checkJSError(); // At the second we check if JS errors occurred
-//
-// // reRenderForm(); // ReRender component
-//
-// // checkPageRendering(); // Check all again
-// // checkJSError();
-//
-// }
-
-// /**
-// * Renders page
-// */
-// @Deprecated
-// protected void renderPage(String homePage, Template template) {
-// selenium.open(protocol + "://" + host + ":" + port + "/" + APPLICATION_NAME + homePage);
-// selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
-//
-// setParentId(template.getPrefix());
-// runScript("loadTemplate('" + template.getName() + "');", false);
-// waitForPageToLoad();
-//
-// checkPageRendering(); // At the first we check if page has been
-// // rendered
-// checkJSError(); // At the second we check if JS errors occurred
-//
-// reRenderForm(); // ReRender component
-//
-// checkPageRendering(); // Check all again
-// checkJSError();
-//
-// }
/**
* Renders page
@@ -666,18 +624,22 @@
}
}
-
- /**
- * Returns the url to test page to be opened by selenium
- * @return
- */
- protected String getTestUrl() {
- return null;
- }
-
+ /**
+ * Checks whether client is FireFox
+ * @return true if client is FireFox
+ */
public boolean isFF() {
return new Boolean(selenium.getEval("navigator.userAgent.indexOf('Firefox') > -1"));
}
+ /**
+ * Returns the url to test page to be opened by selenium
+ *
+ * @return
+ */
+ protected String getTestUrl() {
+ return null;
+ }
+
}
16 years, 1 month
JBoss Rich Faces SVN: r8956 - trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-06-09 08:31:13 -0400 (Mon, 09 Jun 2008)
New Revision: 8956
Modified:
trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-3481
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-06-09 11:35:56 UTC (rev 8955)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-06-09 12:31:13 UTC (rev 8956)
@@ -486,20 +486,20 @@
final FacesContext facesContext,
final UIComponent component) {
super(renderer, facesContext, component);
- if (component.getFacet("head") != null) {
+
+
+
+ if (component.getFacet("header") != null) {
this.putParameter("hasHead", Boolean.TRUE);
}
- if (component.getFacet("head") != null) {
- this.putParameter("hasHead", Boolean.TRUE);
- }
- // Fill child columns components
+ // Fill child columns components
columns = new ArrayList(component.getChildCount());
for (Iterator iter = component.getChildren().iterator(); iter
.hasNext();) {
UIComponent column = (UIComponent) iter.next();
if (column instanceof UIColumn) {
columns.add(column);
- if (column.getFacet("head") != null) {
+ if (column.getFacet("header") != null) {
this.putParameter("hasHead", Boolean.TRUE);
this.putParameter("hasColumnHead", Boolean.TRUE);
}
16 years, 1 month
JBoss Rich Faces SVN: r8955 - branches/3.1.x/test-applications/jsp/src/main/webapp/Effect.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-06-09 07:35:56 -0400 (Mon, 09 Jun 2008)
New Revision: 8955
Modified:
branches/3.1.x/test-applications/jsp/src/main/webapp/Effect/Effect.jsp
Log:
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/Effect/Effect.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/Effect/Effect.jsp 2008-06-09 11:35:53 UTC (rev 8954)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/Effect/Effect.jsp 2008-06-09 11:35:56 UTC (rev 8955)
@@ -128,11 +128,10 @@
<f:verbatim>
<div id="divID"
- style="width: 100px; height: 50px; background-color: red"><rich:effect
- event="onclick" targetId="imageID" type="Opacity"
- params="duration:0.5,from:0.4,to:1.0" /> <rich:effect
- event="onmouseout" type="Opacity"
- params="targetId:'imageID',duration:0.5,from:1.0,to:0.4" /></div>
+ style="width: 100px; height: 50px; background-color: red">
+ <rich:effect event="onclick" targetId="imageID" type="Opacity"
+ params="duration:0.5,from:0.4,to:1.0" />
+ </div>
</f:verbatim>
</h:panelGrid>
16 years, 1 month
JBoss Rich Faces SVN: r8954 - branches/3.1.x/test-applications/facelets/src/main/webapp/Effect.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-06-09 07:35:53 -0400 (Mon, 09 Jun 2008)
New Revision: 8954
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml
Log:
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml 2008-06-09 11:34:48 UTC (rev 8953)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml 2008-06-09 11:35:53 UTC (rev 8954)
@@ -126,9 +126,7 @@
<div id="divID"
style="width: 100px; height: 50px; background-color: red"><rich:effect
event="onclick" targetId="imageID" type="Opacity"
- params="duration:0.5,from:0.4,to:1.0" /> <rich:effect
- event="onmouseout" type="Opacity"
- params="targetId:'imageID',duration:0.5,from:1.0,to:0.4" /></div>
+ params="duration:0.5,from:0.4,to:1.0" />
</f:verbatim>
</h:panelGrid>
16 years, 1 month
JBoss Rich Faces SVN: r8953 - in trunk/ui/pickList/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-06-09 07:34:48 -0400 (Mon, 09 Jun 2008)
New Revision: 8953
Modified:
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
trunk/ui/pickList/src/main/templates/htmlPickList.jspx
Log:
http://jira.jboss.com/jira/browse/RF-3609
Modified: trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
--- trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-06-09 11:20:56 UTC (rev 8952)
+++ trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-06-09 11:34:48 UTC (rev 8953)
@@ -10,6 +10,7 @@
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import java.util.Set;
import javax.faces.component.EditableValueHolder;
import javax.faces.component.UIComponent;
@@ -23,6 +24,7 @@
import javax.faces.model.SelectItem;
import javax.faces.model.SelectItemGroup;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.javascript.ScriptString;
@@ -480,4 +482,13 @@
}
writer.endElement(HTML.DIV_ELEM);
}
+
+ public void reRenderScript(FacesContext context, UIComponent component) throws IOException {
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ Set <String> areas = ajaxContext.getAjaxRenderedAreas();
+ String clientId = component.getClientId(context);
+ if (ajaxContext.isAjaxRequest() && areas.contains(clientId)){
+ areas.add(clientId + "script");
+ }
+ }
}
Modified: trunk/ui/pickList/src/main/templates/htmlPickList.jspx
===================================================================
--- trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2008-06-09 11:20:56 UTC (rev 8952)
+++ trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2008-06-09 11:34:48 UTC (rev 8953)
@@ -152,19 +152,24 @@
</tbody>
</table>
<f:clientId var="clientId"/>
- <script type="text/javascript">
-
- var clientId = '#{clientId}';
- RichShuttleUtils.execOnLoad(
- function(){
- new Richfaces.PickList(
- new Richfaces.PickList.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', undefined, Richfaces.PickList.Target.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
- new Richfaces.PickList.Source('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper', undefined, Richfaces.PickList.Source.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
- "#{clientId}", [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']],
- "#{switchByClick}", {onlistchanged: #{this:getAsEventHandler(context, component, "onlistchanged")}},
- "#{clientId}valueKeeper");
- },
- RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100
- );
- </script>
+
+ <span id="#{clientId}script">
+ <f:call name="reRenderScript" />
+
+ <script type="text/javascript">
+
+ var clientId = '#{clientId}';
+ RichShuttleUtils.execOnLoad(
+ function(){
+ new Richfaces.PickList(
+ new Richfaces.PickList.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', undefined, Richfaces.PickList.Target.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
+ new Richfaces.PickList.Source('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper', undefined, Richfaces.PickList.Source.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
+ "#{clientId}", [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']],
+ "#{switchByClick}", {onlistchanged: #{this:getAsEventHandler(context, component, "onlistchanged")}},
+ "#{clientId}valueKeeper");
+ },
+ RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100
+ );
+ </script>
+ </span>
</f:root>
\ No newline at end of file
16 years, 1 month
JBoss Rich Faces SVN: r8952 - branches/3.1.x/test-applications/jsp/src/main/webapp/pages/RichMenu.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-06-09 07:20:56 -0400 (Mon, 09 Jun 2008)
New Revision: 8952
Modified:
branches/3.1.x/test-applications/jsp/src/main/webapp/pages/RichMenu/RichMenu.jsp
Log:
http://jira.jboss.com/jira/browse/RF-3660
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/pages/RichMenu/RichMenu.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/pages/RichMenu/RichMenu.jsp 2008-06-09 10:57:06 UTC (rev 8951)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/pages/RichMenu/RichMenu.jsp 2008-06-09 11:20:56 UTC (rev 8952)
@@ -3,7 +3,7 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-<h:form id="forvDivOpthID">
+<f:subview id="subviewDivOpthID">
<h:panelGrid columns="5" border="1">
<h:panelGrid columns="1">
<h:commandButton value="submit" style="width : 85px; height : 21px;"></h:commandButton>
@@ -42,4 +42,4 @@
</h:panelGrid>
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
-</h:form>
+</f:subview>
\ No newline at end of file
16 years, 1 month
JBoss Rich Faces SVN: r8951 - in trunk/ui/dataTable/src/main: java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-06-09 06:57:06 -0400 (Mon, 09 Jun 2008)
New Revision: 8951
Modified:
trunk/ui/dataTable/src/main/config/component/dataTable.xml
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
RF-2815
Modified: trunk/ui/dataTable/src/main/config/component/dataTable.xml
===================================================================
--- trunk/ui/dataTable/src/main/config/component/dataTable.xml 2008-06-09 10:36:07 UTC (rev 8950)
+++ trunk/ui/dataTable/src/main/config/component/dataTable.xml 2008-06-09 10:57:06 UTC (rev 8951)
@@ -187,6 +187,13 @@
<description>HTML: a script expression; a pointer is moved within of row
</description>
</property>
+
+ <property >
+ <name>reRender</name>
+ <classname>java.lang.Object</classname>
+ <description>Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection</description>
+ </property>
+
<property>
<name>sortPriority</name>
<classname>java.util.Collection</classname>
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-06-09 10:36:07 UTC (rev 8950)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-06-09 10:57:06 UTC (rev 8951)
@@ -515,9 +515,10 @@
}
}
- AjaxContext.getCurrentInstance()
- .addComponentToAjaxRender(component);
- AjaxContext.getCurrentInstance().addRenderedArea(clientId+ ":tb");
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
+ ajaxContext.addComponentToAjaxRender(component);
+ ajaxContext.addRenderedArea(clientId+ ":tb");
+ ajaxContext.addRegionsFromComponent(component);
}
}
16 years, 1 month
JBoss Rich Faces SVN: r8950 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-06-09 06:36:07 -0400 (Mon, 09 Jun 2008)
New Revision: 8950
Modified:
trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
Log:
RF-3490--rich:datascroller was changed
Modified: trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2008-06-09 09:26:14 UTC (rev 8949)
+++ trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2008-06-09 10:36:07 UTC (rev 8950)
@@ -199,7 +199,14 @@
<para>
Information about the <emphasis><property>"process"</property></emphasis> attribute usage you can find <link linkend="process">here</link>.
</para>
+ <note>
+ <title>Note:</title>
+ <para>Make sure, that all <property>data scrollers</property>, defined for a table, have same values for <emphasis><property>"pages"</property></emphasis> attributes.
+ The page, specified in the last <emphasis><property>"page"</property></emphasis>, will be rendered in browser.
+ </para>
+ </note>
</section>
+
<section>
<title>Look-and-Feel Customization</title>
16 years, 1 month
JBoss Rich Faces SVN: r8949 - in trunk/ui/tooltip/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-06-09 05:26:14 -0400 (Mon, 09 Jun 2008)
New Revision: 8949
Modified:
trunk/ui/tooltip/src/main/config/component/toolTip.xml
trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-1631, http://jira.jboss.com/jira/browse/RF-3429
Modified: trunk/ui/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- trunk/ui/tooltip/src/main/config/component/toolTip.xml 2008-06-07 12:49:04 UTC (rev 8948)
+++ trunk/ui/tooltip/src/main/config/component/toolTip.xml 2008-06-09 09:26:14 UTC (rev 8949)
@@ -42,6 +42,16 @@
<description>Block/inline mode flag. Possible value are: "inline" or "block". Default value is "inline". Tooltip will contain div/span elements respectively</description>
<defaultvalue><![CDATA["inline"]]></defaultvalue>
</property>
+
+ <property>
+ <name>ajaxSingle</name>
+ <classname>boolean</classname>
+ <description>
+ boolean attribute which provides possibility to limit JSF tree processing(decoding, conversion/validation, value applying) to the component which send the request only.
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+
<property>
<name>showDelay</name>
<classname>int</classname>
@@ -87,13 +97,13 @@
<description>Id of the target component</description>
</property>
-
- <property>
+<!-- <property>
<name>value</name>
<classname>java.lang.String</classname>
<description>Label on the tooltip</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
+ </property> -->
+
<property>
<name>mode</name>
<classname>java.lang.String</classname>
@@ -147,7 +157,8 @@
&ui_component_attributes;
&html_events;
-
+ &ui_command_attributes;
+
<property>
<name>onclick</name>
<classname>java.lang.String</classname>
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2008-06-07 12:49:04 UTC (rev 8948)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2008-06-09 09:26:14 UTC (rev 8949)
@@ -3,7 +3,7 @@
import java.io.IOException;
import java.util.Set;
-import javax.faces.component.UIComponentBase;
+import javax.faces.component.UICommand;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
@@ -12,14 +12,14 @@
import org.ajax4jsf.event.AjaxEvent;
import org.richfaces.renderkit.html.ToolTipRenderer;
-public abstract class UIToolTip extends UIComponentBase implements org.ajax4jsf.component.AjaxChildrenEncoder{
+public abstract class UIToolTip extends UICommand implements org.ajax4jsf.component.AjaxChildrenEncoder{
public static final String COMPONENT_TYPE = "org.richfaces.component.ToolTip";
public static final String CONTENT_FACET_NAME = "defaultContent";
- public abstract String getValue();
+// public abstract String getValue();
- public abstract void setValue(String value);
+// public abstract void setValue(String value);
public abstract String getLayout();
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2008-06-07 12:49:04 UTC (rev 8948)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2008-06-09 09:26:14 UTC (rev 8949)
@@ -2,12 +2,15 @@
import java.io.IOException;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import javax.faces.event.ActionEvent;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
@@ -17,7 +20,6 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxComponentRendererBase;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.ajax4jsf.renderkit.RendererUtils;
import org.ajax4jsf.resource.InternetResource;
import org.richfaces.component.UIToolTip;
import org.richfaces.skin.Skin;
@@ -156,7 +158,7 @@
//enable ajaxSingle mode, i.e. we do not need to submit all form controls to get tooltip content
eventOptions.put("control", JSReference.THIS);
-
+
if(eventOptions.containsKey("oncomplete")){
JSFunctionDefinition onComplete = (JSFunctionDefinition)eventOptions.get("oncomplete");
onComplete.addToBody(oncompleteTooltip);
@@ -210,6 +212,18 @@
}
+ public Map <String, Object> getParamsMap(FacesContext context, UIToolTip toolTip) {
+ List <UIComponent> children = toolTip.getChildren();
+ Map <String, Object> paramsMap = new HashMap<String, Object>();
+ for(UIComponent child: children ) {
+ if(child instanceof UIParameter) {
+ UIParameter param = (UIParameter)child;
+ paramsMap.put(param.getName(),param.getValue());
+ }
+ }
+ return paramsMap;
+ }
+
private String getTargetId(FacesContext context, UIComponent component) {
UIToolTip toolTip = (UIToolTip) component;
String forValue = toolTip.getFor();
@@ -253,6 +267,7 @@
String ajaxFunc = function.toScript();
Map<String, Object> ajaxOptions = buildEventOptions(context, toolTip, targetClientId);
+ ajaxOptions.putAll(getParamsMap(context, toolTip));
JSFunctionDefinition completeFunc = getUtils().getAsEventHandler(context, component, "oncomplete", "; return true;");
JSFunctionDefinition hideFunc = getUtils().getAsEventHandler(context, component,"onhide", "; return true;");
JSFunctionDefinition showFunc = getUtils().getAsEventHandler(context, component,"onshow", "; return true;");
@@ -287,6 +302,7 @@
if(context.getExternalContext().getRequestParameterMap().containsKey(clientId)){
if("ajax".equals(tooltip.getMode())){
new AjaxEvent(component).queue();
+ new ActionEvent(component).queue();
}
}
}
@@ -299,12 +315,12 @@
// we want to avoid rendering toolTip content during initialy page displaying
AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
if(ajaxContext != null && ajaxContext.getAjaxAreasToRender().contains(component.getClientId(context) + "content")){
- responseWriter.write(component.getValue() != null ? component.getValue() : "");
+ responseWriter.write(component.getValue() != null ? component.getValue().toString() : "");
super.renderChildren(context, component);
}
} else {
// client mode
- responseWriter.write(component.getValue() != null ? component.getValue() : "");
+ responseWriter.write(component.getValue() != null ? component.getValue().toString() : "");
super.renderChildren(context, component);
}
responseWriter.endElement(component.getUsedElementType());
16 years, 1 month