JBoss Rich Faces SVN: r11713 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-10 14:27:44 -0500 (Wed, 10 Dec 2008)
New Revision: 11713
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
/RF-5233
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 19:05:21 UTC (rev 11712)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 19:27:44 UTC (rev 11713)
@@ -269,6 +269,25 @@
}
@Test
+ public void testLinitToListAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ calendarHeaderId = calendarId + "Header";
+ tester.testLimitToList();
+ }
+
+ @Test
+ public void testReRenderAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ calendarHeaderId = calendarId + "Header";
+ currentDateHeaderXpath = "//td[@id='"+calendarHeaderId+"']/table/tbody/tr/td[3]/div";
+ tester.testReRender();
+ }
+
+ @Test
public void testConverterAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
@@ -771,7 +790,7 @@
AssertPresent(weeksBarId, "Weeks bar is not present");
}
- @Test
+ @Test
public void testShowInput(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
@@ -885,7 +904,7 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
- @Test
+ @Test
public void buttonRelatedAttributesTest(Template template) {
renderPage(BUTTON_RELATED_TEST_URL, template, null);
writeStatus("Check button-related attributes");
@@ -961,4 +980,9 @@
public void changeValue() {
changeDate();
}
+
+ @Override
+ public void sendAjax() {
+ changeCurrentDate(true);
+ }
}
16 years, 1 month
JBoss Rich Faces SVN: r11712 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/layout/autotest and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-10 14:05:21 -0500 (Wed, 10 Dec 2008)
New Revision: 11712
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5232
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2008-12-10 19:05:21 UTC (rev 11712)
@@ -8,8 +8,11 @@
import java.util.Date;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
import javax.faces.event.ActionEvent;
import javax.faces.event.FacesEvent;
import javax.faces.event.ValueChangeEvent;
@@ -19,6 +22,8 @@
import org.richfaces.event.NodeExpandedEvent;
import org.richfaces.event.NodeSelectedEvent;
+import sun.awt.datatransfer.DataTransferer.IndexOrderComparator;
+
/**
* Bean for auto test
*
@@ -42,6 +47,8 @@
public static final String NODE_SELECTED_LISTENER_STATUS = "NodeSelectedListener";
public static final String NODE_EXPANDED_LISTENER_STATUS = "NodeExpandedListener";
+
+ public static final String CONVERTER_ID = "autoTestConverter";
public static final String VALIDATOR_ID = "autoTestValidator";
@@ -71,7 +78,51 @@
private String validatorId = VALIDATOR_DEFAULT_ID;
- public void actionListener(ActionEvent event) {
+ private Object value;
+
+ private boolean converterSet;
+
+ public class AutoTestConverter implements Converter {
+
+ public static final String AS_OBJECT_STRING = "AUTO_TEST_CONVERTER_AS_OBJECT";
+
+ /* (non-Javadoc)
+ * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
+ */
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String v) {
+ value = AS_OBJECT_STRING;
+ return v;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
+ */
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ return null;
+ }
+
+ };
+
+ AutoTestConverter converter = new AutoTestConverter();
+
+
+ /**
+ * @return the value
+ */
+ public Object getValue() {
+ return value;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ public void actionListener(ActionEvent event) {
setStatus(getStatus() + ACTION_LISTENER_STATUS);
}
@@ -91,6 +142,13 @@
public void processExpansion(NodeExpandedEvent nodeExpandedEvent) {
setStatus(getStatus() + NODE_EXPANDED_LISTENER_STATUS);
}
+
+ public void validate(FacesContext context, UIComponent component, Object o) {
+ if (VALIDATOR_ID.equals(this.validatorId)) {
+ AutoTestValidator validator = new AutoTestValidator();
+ validator.validate(context, component, o);
+ }
+ }
public String load() {
status = null;
@@ -99,6 +157,7 @@
public String reset() {
status = null;
+ value = null;
return null;
}
@@ -340,5 +399,29 @@
return VALIDATOR_MESSAGE;
}
+ /**
+ * @return the converter
+ */
+ public Converter getConverter() {
+ if (converterSet) {
+ return converter;
+ }
+ return null;
+ }
+ /**
+ * @return the converterSet
+ */
+ public boolean isConverterSet() {
+ return converterSet;
+ }
+
+ /**
+ * @param converterSet the converterSet to set
+ */
+ public void setConverterSet(boolean converterSet) {
+ this.converterSet = converterSet;
+ }
+
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestControls.xhtml 2008-12-10 19:05:21 UTC (rev 11712)
@@ -55,6 +55,12 @@
</td>
</tr>
<tr>
+ <td>Converter:</td>
+ <td>
+ <h:selectBooleanCheckbox id="_auto_converter" value="#{autoTestBean.converterSet}"></h:selectBooleanCheckbox>
+ </td>
+ </tr>
+ <tr>
<td colspan="2"><h:commandButton id="_auto_load" actionListener="#{templateBean.reset}" action="#{autoTestBean.load}" value="Load"></h:commandButton> </td>
</tr>
</table>
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-12-10 19:05:21 UTC (rev 11712)
@@ -9,6 +9,7 @@
<h:outputText id="_auto_status" style="display: none;" value="#{autoTestBean.status}"></h:outputText>
</a4j:outputPanel>
<h:outputText id="_auto_time" style="display: none;" value="#{autoTestBean.text}"></h:outputText>
+ <h:outputText id="_auto_value" style="display: none;" value="#{autoTestBean.value}"></h:outputText>
<h:commandButton id="_auto_simple_submit" value="Simple submit" immediate="#{autoTestBean.immediate}" style="display: none;" />
<a4j:commandButton id="_auto_ajax_submit" value="Ajax submit" reRender="componentId" immediate="#{autoTestBean.immediate}" style="display: none;" />
<a4j:commandButton id="_auto_ajax_reset" value="Ajax reset" ajaxSingle="true" style="display: none;" action="#{autoTestBean.reset}" />
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/calendarAutoTest.xhtml 2008-12-10 19:05:21 UTC (rev 11712)
@@ -17,10 +17,11 @@
rendered="#{autoTestBean.rendered}"
oncomplete="#{autoTestBean.oncomplete}"
validatorMessage="#{autoTestBean.validatorMessage}"
+ validator="#{autoTestBean.validate}"
+ converter="#{autoTestBean.converter}"
mode="ajax"
popup="false"
>
- <f:validator validatorId="#{autoTestBean.validatorId}" />
<f:param name="parameter1" value="value1" />
</rich:calendar>
</ui:define>
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-10 19:05:21 UTC (rev 11712)
@@ -29,6 +29,8 @@
private static final String INPUT_ID = "_auto_input";
public static final String STATUS_ID = "_auto_status";
+
+ public static final String VALUE_ID = "_auto_value";
private static final String TIME_ID = "_auto_time";
@@ -404,10 +406,22 @@
}
}
+ public void testConverterAttribute() {
+ setupControl(TestSetupEntry.converter, true);
+ clickLoad();
+
+ changeValue();
+
+ clickSubmit();
+ String value = getComponentValue();
+ if (!AutoTestBean.AutoTestConverter.AS_OBJECT_STRING.equals(value)) {
+ Assert.fail("Converter attribute does not work: getAsObject method failed of converter was not triggered. Expected component value: ["+AutoTestBean.AutoTestConverter.AS_OBJECT_STRING+"]. But was: ["+value+"]");
+ }
+ }
+
public void testValidatorAndValidatorMessageAttributes() {
setInternalValidation(true);
clickLoad();
- renderPage(base.getTemplate(), null);
changeValue();
clickSubmit();
@@ -419,7 +433,6 @@
setInternalValidation(false);
clickLoad();
- renderPage(base.getTemplate(), null);
changeValue();
clickSubmit();
@@ -490,6 +503,10 @@
private String getStatus() {
return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + STATUS_ID);
}
+
+ private String getComponentValue() {
+ return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + VALUE_ID);
+ }
public static class TestSetupEntry {
@@ -523,6 +540,8 @@
public static final TestSetupEntry bypassUpdate = new TestSetupEntry("bypassUpdate", Boolean.class, Boolean.FALSE);
public static final TestSetupEntry limitToList = new TestSetupEntry("limitToList", Boolean.class, Boolean.FALSE);
+
+ public static final TestSetupEntry converter = new TestSetupEntry("converter", Boolean.class, Boolean.FALSE);
public static final List<TestSetupEntry> list = new ArrayList<TestSetupEntry>();
static {
@@ -534,7 +553,7 @@
list.add(bypassUpdate);
list.add(limitToList);
list.add(oncomplete);
-
+ list.add(converter);
}
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 18:43:52 UTC (rev 11711)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 19:05:21 UTC (rev 11712)
@@ -268,6 +268,13 @@
}
}
+ @Test
+ public void testConverterAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ tester.testConverterAttribute();
+ }
@Test
public void testValidatorAndValidatorMessageAttributes(Template template) {
16 years, 1 month
JBoss Rich Faces SVN: r11711 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-10 13:43:52 -0500 (Wed, 10 Dec 2008)
New Revision: 11711
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
Log:
https://jira.jboss.org/jira/browse/RF-5089
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-12-10 18:41:53 UTC (rev 11710)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-12-10 18:43:52 UTC (rev 11711)
@@ -49,7 +49,7 @@
this.outjectListFromBody(this.listParentContainer, this.listParent);
this.resetState();
if (this.iframe) {
- this.iframe.hide();
+ Element.hide(this.iframe);
}
var component = this.listParent.parentNode;
component.style.zIndex = 0;
16 years, 1 month
JBoss Rich Faces SVN: r11710 - in trunk/test-applications/regressionArea: regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644 and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-10 13:41:53 -0500 (Wed, 10 Dec 2008)
New Revision: 11710
Added:
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java
trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java
trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml
Log:
Example for RF-2644 committed
Added: trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java (rev 0)
+++ trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBean.java 2008-12-10 18:41:53 UTC (rev 11710)
@@ -0,0 +1,54 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelection;
+
+@Stateful
+@Name("rf2644")
+(a)Scope(ScopeType.SESSION)
+public class DataBean implements DataBeanLocal {
+
+ @DataModel
+ private List<Item> items = new ArrayList<Item>();
+
+ @DataModelSelection
+ private Item item;
+
+ public DataBean() {
+ super();
+ }
+
+ @Factory("rf2644Items")
+ public void createList() {
+ for (int i = 0; i < 5000; i++) {
+ Item item = new Item();
+ item.setName(UUID.randomUUID().toString());
+
+ items.add(item);
+ }
+ }
+
+ public Item getItem() {
+ return item;
+ }
+
+ public void setItem(Item item) {
+ this.item = item;
+ }
+
+ @Remove
+ public void destroy() {
+
+ }
+}
Added: trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java (rev 0)
+++ trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/DataBeanLocal.java 2008-12-10 18:41:53 UTC (rev 11710)
@@ -0,0 +1,13 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+import javax.ejb.Local;
+
+@Local
+public interface DataBeanLocal {
+
+ public void createList();
+
+ public void setItem(Item item);
+ public Item getItem();
+
+}
Added: trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java (rev 0)
+++ trunk/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf2644/Item.java 2008-12-10 18:41:53 UTC (rev 11710)
@@ -0,0 +1,17 @@
+package org.richfaces.regressionarea.issues.rf2644;
+
+public class Item {
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void action() {
+ System.out.println("Item.action() " + name);
+ }
+}
Added: trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml
===================================================================
--- trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml (rev 0)
+++ trunk/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf2644.xhtml 2008-12-10 18:41:53 UTC (rev 11710)
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<ui:composition template="/layout/layout.xhtml">
+ <ui:define name="template">
+ <h:form id="form">
+ <rich:scrollableDataTable id="table" value="#{rf2644Items}" var="item" rows="100">
+ <rich:column width="400">
+ <s:link value="#{item.name}" action="#{item.action}" />
+ </rich:column>
+ </rich:scrollableDataTable>
+
+ <h:dataTable value="#{rf2644Items}" var="item" rows="100">
+ <rich:column width="400">
+ <s:link value="#{item.name}" action="#{item.action}" />
+ </rich:column>
+ </h:dataTable>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
16 years, 1 month
JBoss Rich Faces SVN: r11709 - in trunk/ui/tooltip/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-10 13:36:37 -0500 (Wed, 10 Dec 2008)
New Revision: 11709
Modified:
trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
https://jira.jboss.org/jira/browse/RF-4474
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-12-10 17:31:26 UTC (rev 11708)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2008-12-10 18:36:37 UTC (rev 11709)
@@ -279,10 +279,11 @@
eventsMap.put(new JSReference("delay"), new Integer(toolTip.getShowDelay()));
eventsMap.put(new JSReference("hideDelay"), new Integer(toolTip.getHideDelay()));
+ JSFunctionDefinition ajaxFunc = new JSFunctionDefinition("event", "ajaxOptions");
JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
JSReference ref = new JSReference("ajaxOptions");
function.addParameter(ref);
- String ajaxFunc = function.toScript();
+ ajaxFunc.addToBody(function);
Map<String, Object> ajaxOptions = buildEventOptions(context, toolTip, targetClientId);
ajaxOptions.putAll(getParamsMap(context, toolTip));
@@ -305,7 +306,7 @@
append(toolTip.isFollowMouse()).append(comma).
append(toolTip.getHorizontalOffset()).append(comma).
append(toolTip.getVerticalOffset()).append(comma).
- append("\"").append(ajaxFunc).append("\"").append(comma).append(ScriptUtils.toScript(ajaxOptions)).append(");");
+ append(ajaxFunc.toScript()).append(comma).append(ScriptUtils.toScript(ajaxOptions)).append(");");
return ret.toString();
}
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-12-10 17:31:26 UTC (rev 11708)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-12-10 18:36:37 UTC (rev 11709)
@@ -29,7 +29,7 @@
this.horizontalOffset = horizontalOffset;
this.verticalOffset = verticalOffset;
- this.ajaxExecuteString = ajaxFunction;
+ if (ajaxFunction) this.ajaxExecuteFunction = (ajaxFunction) ? ajaxFunction : function() {};
this.ajaxOptions = ajaxOptions;
this.clientAjaxParams = {};
@@ -249,12 +249,9 @@
this.toolTip.style.visibility = "hidden";
this.toolTip.style.display = 'block';
-
- this.setToolTipPosition(e);
- this.setToolTipVisible(false);
-
+ this.setToolTipPosition(e);
}
- var event = e;
+ var event = A4J.AJAX.CloneObject(e, false);
var ajaxOptions = this.ajaxOptions;
if(this.clientAjaxParams){
if(e.clientX){
@@ -268,7 +265,23 @@
Object.extend(ajaxOptions['parameters'], this.clientAjaxParams);
}
- eval(this.ajaxExecuteString);
+ if (this.delay>0)
+ {
+ this.setToolTipPosition(e);
+ this.activationTimerHandle = window.setTimeout(function()
+ {
+ if (this.toolTipDefaultContent)
+ {
+ this.setToolTipVisible(false);
+ }
+ this.ajaxExecuteFunction(event, ajaxOptions);
+ }.bind(this), this.delay);
+ }
+ else
+ {
+ this.setToolTipVisible(false);
+ this.ajaxExecuteFunction(event, ajaxOptions);
+ }
} else {
this.setToolTipPosition(e);
if (this.delay>0)
@@ -276,7 +289,7 @@
this.activationTimerHandle = window.setTimeout(function()
{
this.displayDiv();
- }.bindAsEventListener(this), this.delay);
+ }.bind(this), this.delay);
}
else this.displayDiv();
}
@@ -318,11 +331,6 @@
if (this.ffcheck(relTarg)) return;
- if (this.activationTimerHandle) {
- window.clearTimeout(this.activationTimerHandle);
- this.activationTimerHandle = undefined;
- }
-
var className;
if (relTarg)
{
16 years, 1 month
JBoss Rich Faces SVN: r11708 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-10 12:31:26 -0500 (Wed, 10 Dec 2008)
New Revision: 11708
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
https://jira.jboss.org/jira/browse/RF-4190
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-12-10 17:23:41 UTC (rev 11707)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-12-10 17:31:26 UTC (rev 11708)
@@ -191,50 +191,52 @@
//bug : http://jira.jboss.com/jira/browse/RF-2810,
//will be corrected in a future version (http://jira.jboss.com/jira/browse/RF-2814)
var unescapedValue = this.currentItemValue;
- var params = {itemValue: unescapedValue,itemLabel: this.tempValueKeeper.value}
+ // var params = {itemValue: unescapedValue,itemLabel: this.tempValueKeeper.value}
// var unescapeText = this.tempValueKeeper.value.unescapeHTML();
- this.setValue(e,params);
+ this.setValue(e,unescapedValue);
}
},
- getParameters : function (args) {
- var result = {};
- var label = args[1]['itemLabel'];
- if(label) {
- var value = args[1]['itemValue'];
- result.itemLabel = label;
- result.itemValue = value;
- } else {
- result.itemLabel = args[0];
- result.itemValue = args[1];
- }
- return result;
- },
+ findLabel : function(lookupItems, value) {
+ var items = lookupItems;
+ for(var i=0; i < items.length; i++) {
+ if(items[i][1] == value) {
+ return items[i][0];
+ }
+ }
+ },
- setValue : function(e, params) {
- var args = $A(arguments);
- var params = this.getParameters(args);
+ setValue : function(e, param) {
+ var item = {};
+ item.itemValue = this.getParameters(e,param,"value");
+ item.itemLabel = this.findLabel(this.comboList.itemsText,item.itemValue);
+
+ if (!item.itemLabel) {
+ item.itemValue = this.currentItemValue;
+ item.itemLabel = this.tempValueKeeper.value;
+ }
+
var value = this.valueKeeper.value;
- if (this.invokeEvent(this.events.onviewactivation, this.inplaceInput, "rich:onviewactivation", {oldValue : this.valueKeeper.value, value : params.itemValue})) {
+ if (this.invokeEvent(this.events.onviewactivation, this.inplaceInput, "rich:onviewactivation", {oldValue : this.valueKeeper.value, value : item.itemValue})) {
this.endEditableState();
- if (params.itemValue == "") {
+ if (item.itemValue == "") {
this.setDefaultText();
this.valueKeeper.value = "";
//this.startViewState();
} else {
- if (params.itemLabel == "") {
+ if (item.itemLabel == "") {
this.setDefaultText();
} else {
- this.currentText = params.itemLabel;
+ this.currentText = item.itemLabel;
}
- this.valueKeeper.value = params.itemValue;
+ this.valueKeeper.value = item.itemValue;
}
- if (params.itemValue != this.value) {
+ if (item.itemValue != this.value) {
this.startChangedState();
- if (this.tempValueKeeper != params.itemLabel) {
- this.tempValueKeeper.value = params.itemLabel;
+ if (this.tempValueKeeper != item.itemLabel) {
+ this.tempValueKeeper.value = item.itemLabel;
}
- this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", params);
+ this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", item.itemValue);
} else {
this.startViewState();
}
16 years, 1 month
JBoss Rich Faces SVN: r11707 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-10 12:23:41 -0500 (Wed, 10 Dec 2008)
New Revision: 11707
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
https://jira.jboss.org/jira/browse/RF-4848
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-10 17:18:57 UTC (rev 11706)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-10 17:23:41 UTC (rev 11707)
@@ -517,7 +517,7 @@
if (this.iframe) return;
var div = document.createElement("div");
div.style.display = 'none';
- var child = "<iframe name='"+this.id+"_iframe' id='"+this.id+"_iframe'></iframe>";
+ var child = "<iframe name='"+this.id+"_iframe' id='"+this.id+"_iframe'"+ (!Richfaces.browser.isOpera ? " src=\"javascript:''\"" : "")+"></iframe>";
div.innerHTML = child;
document.body.appendChild(div);
this.iframe = $(this.id + "_iframe");
16 years, 1 month
JBoss Rich Faces SVN: r11706 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-10 12:18:57 -0500 (Wed, 10 Dec 2008)
New Revision: 11706
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
deprecated method usage removed
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 17:08:13 UTC (rev 11705)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 17:18:57 UTC (rev 11706)
@@ -429,25 +429,25 @@
String calendarPopupButton = calendarCollapsedId + "Button";
String outputPanel = containerId + "outputPanel";
- Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
+ Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
writeStatus("Mouse click on calendar InputDate field");
clickById(calendarInputDate);
- Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be visible on the component!");
+ Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
writeStatus("Mouse click outside calendar");
clickById(outputPanel);
- Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
+ Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
writeStatus("Mouse click on calendar popup button");
clickById(calendarPopupButton);
- Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be visible on the component!");
+ Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
}
- @Test
+ @Test
public void testSelectDateComponent(Template template) {
renderPage(template);
@@ -460,10 +460,10 @@
String calendarPopupButton = calendarCollapsedId + "Button";
String outputPanel = containerId + "outputPanel";
- Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
+ Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
writeStatus("Mouse click on calendar popup button");
clickById(calendarPopupButton);
- Assert.assertTrue(isVisibleById(calendarOpenedId), "Calendar window should be visible on the component!");
+ Assert.assertTrue(isVisible(calendarOpenedId), "Calendar window should be visible on the component!");
String inputDateString = getValueById(calendarInputDate);
Date readDate = null;
@@ -489,7 +489,7 @@
}
Assert.assertEquals(readDate, newSelectedDate, "Date representation after selecting 15.May.2008 is wrong!");
- Assert.assertFalse(isVisibleById(calendarOpenedId), "Calendar window should NOT be visible on the component!");
+ Assert.assertFalse(isVisible(calendarOpenedId), "Calendar window should NOT be visible on the component!");
}
@Test
16 years, 1 month
JBoss Rich Faces SVN: r11705 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/images/calendar and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-10 12:08:13 -0500 (Wed, 10 Dec 2008)
New Revision: 11705
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_disabled.gif
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_enabled.gif
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/buttonRelatedAttributesTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5253
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_disabled.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_disabled.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_enabled.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/images/calendar/icon_enabled.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/buttonRelatedAttributesTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/buttonRelatedAttributesTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 16:09:05 UTC (rev 11704)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-10 17:08:13 UTC (rev 11705)
@@ -49,6 +49,8 @@
static final String TODAY_CONTROL_MODE_URL = "pages/calendar/todayControlModeTest.xhtml";
+ static final String BUTTON_RELATED_TEST_URL = "pages/calendar/buttonRelatedAttributesTest.xhtml";
+
static final String CONTROLS_FORM_ID = "_controls:";
static final String availableDayCellClass = "rich-calendar-cell-size rich-calendar-cell rich-calendar-btn";
@@ -876,6 +878,29 @@
Assert.assertFalse(isVisible(todayControlXpath), "Control 'Today' has to be hidden");
}
+ @Test
+ public void buttonRelatedAttributesTest(Template template) {
+ renderPage(BUTTON_RELATED_TEST_URL, template, null);
+ writeStatus("Check button-related attributes");
+
+ String calendar = getParentId() + FORM_ID + "calendar";
+ String enabledIconPopupBtnId = calendar + "EnabledIconPopupButton";
+ String disabledIconPopupBtnId = calendar + "DisabledIconPopupButton";
+ String labeledPopupBtnId = calendar + "LabeledPopupButton";
+
+ writeStatus("Check enabled popup button are rendered with a proper icon");
+ testIcon(enabledIconPopupBtnId, "icon_enabled");
+ isRenderedAs(enabledIconPopupBtnId, "img");
+
+ writeStatus("Check disabled popup button are rendered with a proper icon");
+ testIcon(disabledIconPopupBtnId, "icon_disabled");
+ isRenderedAs(disabledIconPopupBtnId, "img");
+
+ writeStatus("Check popup button is rendered as a labeled button element");
+ isRenderedAs(labeledPopupBtnId, "button");
+ AssertTextEquals(labeledPopupBtnId, "Button");
+ }
+
private void setPopup(boolean isPopup) {
runScript("$('" + isPopupId + "').checked=" + isPopup);
}
@@ -897,17 +922,36 @@
clickById(popupButtonId);
}
+ /**
+ * Test an icon.
+ *
+ * @param location location of image representing icon to be tested
+ * @param iconName substring that icon uri has to contain
+ */
+ private void testIcon(String location, String iconSubstring) {
+ String iconSrc = selenium.getAttribute(location + "@src");
+ if (null == iconSrc || !iconSrc.matches(".*" + iconSubstring + ".*")) {
+ Assert.fail("It looks as if the icon is not proper. Uri of icon is being tested must contain [" + iconSubstring + "]");
+ }
+ }
+
+ private void isRenderedAs(String id, String tagName) {
+ if (selenium.getXpathCount("//" + tagName + "[@id='" + id + "']").intValue() != 1) {
+ Assert.fail("Dom element with id[" + id + "] is not rendered as [" + tagName + "]");
+ }
+ }
+
public String getTestUrl() {
return "pages/calendar/calendarTest.xhtml";
}
-
+
@Override
public String getAutoTestUrl() {
- return "pages/calendar/calendarAutoTest.xhtml";
+ return "pages/calendar/calendarAutoTest.xhtml";
}
-
+
@Override
public void changeValue() {
- changeDate();
+ changeDate();
}
}
16 years, 1 month
JBoss Rich Faces SVN: r11704 - in trunk/test-applications/facelets/src/main/webapp: SimpleTogglePanel and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-10 11:09:05 -0500 (Wed, 10 Dec 2008)
New Revision: 11704
Modified:
trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml
trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml
trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.xhtml
Log:
minor changes
Modified: trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml 2008-12-10 16:08:47 UTC (rev 11703)
+++ trunk/test-applications/facelets/src/main/webapp/Editor/Editor.xhtml 2008-12-10 16:09:05 UTC (rev 11704)
@@ -10,7 +10,7 @@
value="#{editor.value}" width="#{editor.width}"
height="#{editor.height}" theme="#{editor.theme}"
onchange="#{event.onchange}" oninit="#{event.oninit}"
- onsave="#{event.onsave}" onsetup="#{event.onsetup}"
+ onsetup="#{event.onsetup}"
autoResize="#{editor.autoResize}" converter="#{editor.convert}"
converterMessage="converterMessage" immediate="#{editor.immediate}"
rendered="#{editor.rendered}" required="#{editor.required}"
Modified: trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml 2008-12-10 16:08:47 UTC (rev 11703)
+++ trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml 2008-12-10 16:09:05 UTC (rev 11704)
@@ -1,34 +1,46 @@
-<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="simpleTogglePanelSubviewID">
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="simpleTogglePanelSubviewID">
- <rich:simpleTogglePanel id="stpIncludeID" switchType="client">
- <f:facet name="closeMarker">
- <h:outputText value="Close it"/>
- </f:facet>
+ <rich:simpleTogglePanel id="stpIncludeID" switchType="client">
+ <f:facet name="closeMarker">
+ <h:outputText value="Close it" />
+ </f:facet>
- <f:facet name="openMarker">
- <h:outputText value="Open it"/>
- </f:facet>
- <h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
- <f:selectItems value="#{richBean.listContainer}"/>
- </h:selectOneMenu>
-
- </rich:simpleTogglePanel>
- <rich:simpleTogglePanel id="sTP" bodyClass="body" headerClass="head" label="simpleTogglePanel with some text" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- width="#{simpleTogglePanel.width}" height="#{simpleTogglePanel.height}" switchType="#{simpleTogglePanel.switchType}"
- style="#{style.style}" styleClass="#{style.styleClass}"
- oncollapse="#{event.oncollapse}" onbeforedomupdate="#{event.onbeforedomupdate}" onexpand="#{event.onexpand}"
- opened="#{event.opened}" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}"
- onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
- onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
- onmouseup="#{event.onmouseup}" binding="#{simpleTogglePanel.htmlSTP}">
- <f:facet name="closeMarker">
- <h:outputText value="Close It"/>
- </f:facet>
- <f:facet name="openMarker">
- <h:outputText value="Open It"/>
- </f:facet>
- <f:verbatim>
+ <f:facet name="openMarker">
+ <h:outputText value="Open it" />
+ </f:facet>
+ <h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
+ <f:selectItems value="#{richBean.listContainer}" />
+ </h:selectOneMenu>
+
+ </rich:simpleTogglePanel>
+ <rich:simpleTogglePanel id="sTP" bodyClass="body" headerClass="head"
+ label="simpleTogglePanel with some text"
+ action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ width="#{simpleTogglePanel.width}"
+ height="#{simpleTogglePanel.height}"
+ switchType="#{simpleTogglePanel.switchType}" style="#{style.style}"
+ styleClass="#{style.styleClass}" oncollapse="#{event.oncollapse}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ onexpand="#{event.onexpand}" opened="#{event.opened}"
+ onclick="#{event.onclick}" oncomplete="#{event.oncomplete}"
+ ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}" binding="#{simpleTogglePanel.htmlSTP}">
+ <f:facet name="closeMarker">
+ <h:outputText value="Close It" />
+ </f:facet>
+ <f:facet name="openMarker">
+ <h:outputText value="Open It" />
+ </f:facet>
+ <f:verbatim>
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
@@ -36,27 +48,48 @@
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
</f:verbatim>
- <h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
- </rich:simpleTogglePanel>
+ <h:outputLink value="http://www.jboss.com/">
+ <f:verbatim>Link</f:verbatim>
+ </h:outputLink>
+ </rich:simpleTogglePanel>
- <rich:simpleTogglePanel id="sTP1" headerClass="head" label="simpleTogglePanel wiht image" width="#{simpleTogglePanel.width}" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- height="#{simpleTogglePanel.height}" rendered="#{simpleTogglePanel.rendered}" switchType="#{simpleTogglePanel.switchType}"
- opened="false" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
- <h:graphicImage value="/pics/podb109_61.jpg" width="500" height="300"></h:graphicImage>
- </rich:simpleTogglePanel>
+ <rich:simpleTogglePanel id="sTP1" headerClass="head"
+ label="simpleTogglePanel wiht image"
+ width="#{simpleTogglePanel.width}" action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ height="#{simpleTogglePanel.height}"
+ rendered="#{simpleTogglePanel.rendered}"
+ switchType="#{simpleTogglePanel.switchType}" opened="false"
+ onclick="#{event.onclick}" oncomplete="#{event.oncomplete}"
+ ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}">
+ <h:graphicImage value="/pics/podb109_61.jpg" width="500" height="300"></h:graphicImage>
+ </rich:simpleTogglePanel>
- <rich:simpleTogglePanel id="sTP2" label="Focus simpleTogglePanle" width="#{simpleTogglePanel.width}" ignoreDupResponses="true" action="#{simpleTogglePanel.act}" actionListener="#{simpleTogglePanel.actListener}"
- focus="#{simpleTogglePanel.focus}" onclick="#{event.onclick}" oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
- <f:facet name="closeMarker">
- <h:graphicImage value="/pics/ajax_stoped.gif"></h:graphicImage>
- </f:facet>
- <f:facet name="openMarker">
- <h:graphicImage value="/pics/ajax_process.gif"></h:graphicImage>
- </f:facet>
- <rich:simpleTogglePanel id="INsTP">
- <h:panelGrid columns="2">
- <h:graphicImage value="/pics/podb109_61.jpg" width="250px" height="200px"></h:graphicImage>
- <f:verbatim>
+ <rich:simpleTogglePanel id="sTP2" label="Focus simpleTogglePanle"
+ width="#{simpleTogglePanel.width}" ignoreDupResponses="true"
+ action="#{simpleTogglePanel.act}"
+ actionListener="#{simpleTogglePanel.actListener}"
+ focus="#{simpleTogglePanel.focus}" onclick="#{event.onclick}"
+ oncomplete="#{event.oncomplete}" ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}">
+ <f:facet name="closeMarker">
+ <h:graphicImage value="/pics/ajax_stoped.gif"></h:graphicImage>
+ </f:facet>
+ <f:facet name="openMarker">
+ <h:graphicImage value="/pics/ajax_process.gif"></h:graphicImage>
+ </f:facet>
+ <rich:simpleTogglePanel id="INsTP">
+ <h:panelGrid columns="2">
+ <h:graphicImage value="/pics/podb109_61.jpg" width="250px"
+ height="200px"></h:graphicImage>
+ <f:verbatim>
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
@@ -64,13 +97,14 @@
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
Some text... Some text... Some text... Some text... Some text... Some text... Some text... Some text...
</f:verbatim>
- </h:panelGrid>
- </rich:simpleTogglePanel>
- </rich:simpleTogglePanel>
+ </h:panelGrid>
+ </rich:simpleTogglePanel>
+ </rich:simpleTogglePanel>
<h:panelGrid id="simpleTogglePanelActionID" columns="1">
- <a4j:commandButton value="Show action" reRender="simpleTogglePanelActionID" style=" width : 95px;"></a4j:commandButton>
+ <a4j:commandButton value="Show action"
+ reRender="simpleTogglePanelActionID" style=" width : 95px;"></a4j:commandButton>
<h:outputText value="#{simpleTogglePanel.action}" />
<h:outputText value="#{simpleTogglePanel.actionListener}" />
- </h:panelGrid>
- <rich:spacer height="20px"></rich:spacer>
+ </h:panelGrid>
+ <rich:spacer height="20px"></rich:spacer>
</f:subview>
Modified: trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.xhtml 2008-12-10 16:08:47 UTC (rev 11703)
+++ trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanelProperty.xhtml 2008-12-10 16:09:05 UTC (rev 11704)
@@ -1,33 +1,39 @@
-<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="stpPropertySubviewID">
-<h:commandButton action="#{simpleTogglePanel.add}" value="add test" />
- <h:panelGrid columns="2" border="1">
- <h:outputText value="Width:">
- </h:outputText>
- <h:inputText value="#{simpleTogglePanel.width}">
- <a4j:support event="onchange" reRender="sTP,sTP1"></a4j:support>
- </h:inputText>
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="stpPropertySubviewID">
+ <h:commandButton action="#{simpleTogglePanel.add}" value="add test" />
+ <h:panelGrid columns="2" border="1">
+ <h:outputText value="Width:">
+ </h:outputText>
+ <h:inputText value="#{simpleTogglePanel.width}">
+ <a4j:support event="onchange" reRender="sTP,sTP1"></a4j:support>
+ </h:inputText>
- <h:outputText value="Height:">
- </h:outputText>
- <h:inputText value="#{simpleTogglePanel.height}">
- <a4j:support event="onchange" reRender="sTP,sTP1"></a4j:support>
- </h:inputText>
+ <h:outputText value="Height:">
+ </h:outputText>
+ <h:inputText value="#{simpleTogglePanel.height}">
+ <a4j:support event="onchange" reRender="sTP,sTP1"></a4j:support>
+ </h:inputText>
- <h:outputText value="Switch Type:"></h:outputText>
- <h:selectOneRadio value="#{simpleTogglePanel.switchType}">
- <f:selectItem itemLabel="client" itemValue="client" />
- <f:selectItem itemLabel="server" itemValue="server" />
- <f:selectItem itemLabel="ajax" itemValue="ajax" />
- <a4j:support event="onclick" reRender="sTP,sTP1,sTP2"></a4j:support>
- </h:selectOneRadio>
+ <h:outputText value="Switch Type:"></h:outputText>
+ <h:selectOneRadio value="#{simpleTogglePanel.switchType}">
+ <f:selectItem itemLabel="client" itemValue="client" />
+ <f:selectItem itemLabel="server" itemValue="server" />
+ <f:selectItem itemLabel="ajax" itemValue="ajax" />
+ <a4j:support event="onclick" reRender="sTP,sTP1,sTP2"></a4j:support>
+ </h:selectOneRadio>
- <h:outputText value="Rendered:"></h:outputText>
- <h:selectBooleanCheckbox value="#{simpleTogglePanel.rendered}" onclick="submit()">
- </h:selectBooleanCheckbox>
- </h:panelGrid>
- <br />
+ <h:outputText value="Rendered:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{simpleTogglePanel.rendered}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+ </h:panelGrid>
<br />
+ <br />
+ <!--
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
@@ -37,4 +43,5 @@
<h:outputText value="#{rich:findComponent('sTP').value}" />
</rich:column>
</h:panelGrid>
+ -->
</f:subview>
\ No newline at end of file
16 years, 1 month