JBoss Rich Faces SVN: r9210 - trunk/ui/modal-panel/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-25 06:04:14 -0400 (Wed, 25 Jun 2008)
New Revision: 9210
Modified:
trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java
Log:
Modal panel test commented
Modified: trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java
===================================================================
--- trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java 2008-06-25 09:10:49 UTC (rev 9209)
+++ trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java 2008-06-25 10:04:14 UTC (rev 9210)
@@ -22,25 +22,17 @@
package org.richfaces.component;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIOutput;
import javax.faces.component.html.HtmlForm;
import javax.faces.component.html.HtmlOutputText;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.apache.commons.lang.StringUtils;
-import org.richfaces.renderkit.ModalPanelRendererBase;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlScript;
/**
* Unit test for simple Component.
@@ -114,7 +106,7 @@
HtmlPage renderedView = renderView();
assertNotNull(renderedView);
-
+/*
HtmlElement htmlModalPanel = renderedView.getHtmlElementById(modalPanel.getClientId(facesContext));
assertNotNull(htmlModalPanel);
assertEquals("div", htmlModalPanel.getNodeName());
@@ -141,7 +133,7 @@
assertNotNull(resizer);
assertTrue(resizer.getAttributeValue("class").contains("dr-mpnl-resizer rich-mpnl-resizer"));
}
-
+*/
}
/**
17 years, 3 months
JBoss Rich Faces SVN: r9209 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/actionParam and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-06-25 05:10:49 -0400 (Wed, 25 Jun 2008)
New Revision: 9209
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JActionParam.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/actionParam/actionParam.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java
Log:
action parameter test refactoring
Modified: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JActionParam.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JActionParam.java 2008-06-25 09:09:54 UTC (rev 9208)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JActionParam.java 2008-06-25 09:10:49 UTC (rev 9209)
@@ -13,23 +13,40 @@
private static final String PARAMETER_VALUE = "Action Parameter";
+ public static class ERRORS {
+ public static final String NO_PARAM = "1";
+
+ public static final String INVALID_VALUE = "2";
+
+ public static final String NOT_ASSIGNED = "3";
+ }
+
private String parameterName;
private String parameterValue;
+ private String errorMessage = null;
+
public void listener(ActionEvent event) {
FacesContext context = FacesContextImpl.getCurrentInstance();
Map<String, String> p = context.getExternalContext().getRequestParameterMap();
- if (p.get(PARAMETER_NAME) != null && p.get(PARAMETER_NAME).equals(PARAMETER_VALUE)) {
+ if (p.get(PARAMETER_NAME) == null) {
+ errorMessage = ERRORS.NO_PARAM;
+ } else if (!PARAMETER_VALUE.equals(p.get(PARAMETER_NAME))) {
+ errorMessage = ERRORS.INVALID_VALUE;
+ } else if (parameterValue == null) {
+ errorMessage = ERRORS.NOT_ASSIGNED;
+ } else {
parameterName = PARAMETER_NAME;
}
+
}
/**
* @return the parameter
*/
public String getParameter() {
- return (parameterName != null || parameterValue!=null) ? (parameterName + "='" + parameterValue + "'") : "";
+ return (errorMessage == null && (parameterName != null || parameterValue!=null)) ? (parameterName + "='" + parameterValue + "'") : "";
}
/**
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/actionParam/actionParam.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/actionParam/actionParam.xhtml 2008-06-25 09:09:54 UTC (rev 9208)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/actionParam/actionParam.xhtml 2008-06-25 09:10:49 UTC (rev 9209)
@@ -11,20 +11,25 @@
</ui:define>
<ui:define name="component">
+ <script type="text/javascript">
+ function _getValue() {
+ return "Action Parameter";
+ }
+ </script>
<table style="width: 600px"><tr>
<td><b>Parameter:</b></td>
<td><h:outputText style="color: green" value="#{actionParam.parameter}" id="_parameter"></h:outputText></td>
</tr></table>
<h:form id="_form1">
- <a4j:commandLink value="Ajax Submit" id="ajaxSubmit" reRender="_parameter" actionListener="#{actionParam.listener}">
- <a4j:actionparam assignTo="#{actionParam.parameterValue}" name="param" value="Action Parameter"></a4j:actionparam>
+ <a4j:commandLink value="Ajax Submit" id="ajaxSubmit" reRender="_parameter">
+ <a4j:actionparam assignTo="#{actionParam.parameterValue}" actionListener="#{actionParam.listener}" name="param" value="_getValue()" noEscape="true"></a4j:actionparam>
</a4j:commandLink>
</h:form>
<h:form id="_form2">
- <h:commandLink value="Html Submit" id="htmlSubmit" actionListener="#{actionParam.listener}">
- <a4j:actionparam assignTo="#{actionParam.parameterValue}" name="param" value="Action Parameter"></a4j:actionparam>
+ <h:commandLink value="Html Submit" id="htmlSubmit">
+ <a4j:actionparam assignTo="#{actionParam.parameterValue}" actionListener="#{actionParam.listener}" name="param" value="Action Parameter"></a4j:actionparam>
</h:commandLink>
</h:form>
</ui:define>
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-25 09:09:54 UTC (rev 9208)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-25 09:10:49 UTC (rev 9209)
@@ -192,13 +192,26 @@
*
* @param message
*/
- public void writeStatus(String message) {
+ public void writeStatus(String message, boolean isError) {
message = message.replace("'", "\\'");
StringBuffer buffer = new StringBuffer("writeStatus('");
buffer.append(message);
- buffer.append("')");
+ if (!isError) {
+ buffer.append("')");
+ }else {
+ buffer.append("',true)");
+ }
runScript(buffer.toString());
}
+
+ /**
+ * Writes status message on client side
+ *
+ * @param message
+ */
+ public void writeStatus(String message) {
+ writeStatus(message, false);
+ }
/**
* ReRenders the component
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java 2008-06-25 09:09:54 UTC (rev 9208)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxActionParameterTest.java 2008-06-25 09:10:49 UTC (rev 9209)
@@ -1,5 +1,6 @@
package org.richfaces.testng;
+import org.ajax4jsf.bean.A4JActionParam;
import org.ajax4jsf.template.Template;
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
@@ -46,37 +47,49 @@
_testAjaxCommandLinkComponent(Template.DATA_TABLE);
}
+ /**
+ * Tests ajax action parameter component
+ * @param template
+ */
private void _testAjaxCommandLinkComponent(Template template) {
renderPage(template);
String parentId = getParentId();
+ String parameter = null;
String paramID = parentId + "_parameter";
String ajaxButttonID = parentId + "_form1:ajaxSubmit";
String htmlButttonID = parentId + "_form2:htmlSubmit";
+ // test ajax submit
clickById(ajaxButttonID);
waitForAjaxCompletion();
+ parameter = getTextById(paramID);
+ checkParameter(parameter);
- String parameter = getTextById(paramID);
- if (parameter == null) {
- writeStatus("<a4j:actionParameter> failed. Parameter has been not sent with ajax request.");
- Assert.fail("<a4j:actionParameter> failed. Parameter has been not sent with ajax request.");
- } else if (parameter != null && parameter.equals("param='null'")) {
- writeStatus("<a4j:actionParameter> failed. Parameter value has been not assigned to bean");
- Assert.fail("<a4j:actionParameter> failed. Parameter value has been not assigned to bean");
- } else {
- writeStatus("<a4j:actionParameter> passed successfully");
- }
+ // test html submit
clickCommandAndWait(htmlButttonID);
-
parameter = getTextById(paramID);
- if (parameter == null) {
- writeStatus("<a4j:actionParameter> failed. Parameter has been not sent with ajax request.");
+ checkParameter(parameter);
+ }
+
+ /**
+ * Checks action parameter
+ * @param parameter - Action Parameter value
+ */
+ private void checkParameter (String parameter) {
+ if ("".equals(parameter)) {
+ writeStatus("<a4j:actionParameter> failed. ActionListener skipped.", true);
+ Assert.fail("<a4j:actionParameter> failed. ActionListener skipped.");
+ } else if (parameter.equals(A4JActionParam.ERRORS.NO_PARAM)) {
+ writeStatus("<a4j:actionParameter> failed. Parameter has been not sent with ajax request.", true);
Assert.fail("<a4j:actionParameter> failed. Parameter has been not sent with ajax request.");
- } else if (parameter != null && parameter.equals("param='null'")) {
- writeStatus("<a4j:actionParameter> failed. Parameter value has been not assigned to bean");
+ } else if (parameter.equals(A4JActionParam.ERRORS.NOT_ASSIGNED)) {
+ writeStatus("<a4j:actionParameter> failed. Parameter value has been not assigned to bean", true);
Assert.fail("<a4j:actionParameter> failed. Parameter value has been not assigned to bean");
+ } else if (parameter.equals(A4JActionParam.ERRORS.INVALID_VALUE)) {
+ writeStatus("<a4j:actionParameter> failed. Parameter value is incorrect", true);
+ Assert.fail("<a4j:actionParameter> failed. Parameter value is incorrect");
} else {
writeStatus("<a4j:actionParameter> passed successfully");
}
17 years, 3 months
JBoss Rich Faces SVN: r9208 - trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-06-25 05:09:54 -0400 (Wed, 25 Jun 2008)
New Revision: 9208
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
min col width bug
Modified: trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-06-25 08:45:05 UTC (rev 9207)
+++ trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-06-25 09:09:54 UTC (rev 9208)
@@ -98,6 +98,8 @@
private static final String ON_GROUP_TOGGLE_FUNCTION = "onGroupToggleFunction";
private static final String GROUP_TOGGLE_ACTION_NAME = "groupToggleAction";
+
+ private static final String MIN_COLUMN_WIDTH = "100";
/**
* Encode all table structure - colgroups definitions, caption, header,
@@ -122,7 +124,6 @@
UIColumn col = cols.next();
if (col.isRendered()) {
writer.startElement("col", table);
-=
String colWidth = table.getColumnSize(col);
if (Integer.valueOf(colWidth) < Integer
.valueOf(MIN_COLUMN_WIDTH)) {
@@ -840,7 +841,7 @@
/* Not needed if we do not save open/close state */
scriptOptions.addOption(ON_GROUP_TOGGLE_FUNCTION,
getOnGroupToggleFunctionDef(context, table));
- scriptOptions.addOption("minColumnWidth", 100);
+ scriptOptions.addOption("minColumnWidth", MIN_COLUMN_WIDTH);
composite.mergeScriptOptions(scriptOptions, context, table);
function.addParameter(scriptOptions);
return function.toScript();
17 years, 3 months
JBoss Rich Faces SVN: r9207 - in trunk/test-applications/jsp/src/main: java/hotKey and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-06-25 04:45:05 -0400 (Wed, 25 Jun 2008)
New Revision: 9207
Added:
trunk/test-applications/jsp/src/main/java/hotKey/
trunk/test-applications/jsp/src/main/java/hotKey/HotKey.java
trunk/test-applications/jsp/src/main/webapp/HotKey/
trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-HotKey.xml
Modified:
trunk/test-applications/jsp/src/main/java/rich/RichBean.java
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
Log:
add hotKey
Added: trunk/test-applications/jsp/src/main/java/hotKey/HotKey.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/hotKey/HotKey.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/hotKey/HotKey.java 2008-06-25 08:45:05 UTC (rev 9207)
@@ -0,0 +1,143 @@
+/**
+ *
+ */
+package hotKey;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.component.html.HtmlHotKey;
+
+/**
+ * @author AYanul
+ *
+ */
+public class HotKey {
+ private HtmlHotKey binding = null;
+ private String bindingInfo = "";
+ private String handler = "alert('#{hotKey.key} is pressed; event type: ' + event.type); return false;";
+ private String key = "alt+a";
+ private String selector = "none";
+ private String timing = "immediate";
+ private String type = "onkeydown";
+ private boolean rendered = true;
+ private boolean disableInInput = false;
+ private boolean checkParent = false;
+
+ /**
+ * @return the binding
+ */
+ public HtmlHotKey getBinding() {
+ return binding;
+ }
+ /**
+ * @param binding the binding to set
+ */
+ public void setBinding(HtmlHotKey binding) {
+ this.binding = binding;
+ }
+ /**
+ * @return the handler
+ */
+ public String getHandler() {
+ return handler;
+ }
+ /**
+ * @param handler the handler to set
+ */
+ public void setHandler(String handler) {
+ this.handler = handler;
+ }
+ /**
+ * @return the key
+ */
+ public String getKey() {
+ return key;
+ }
+ /**
+ * @param key the key to set
+ */
+ public void setKey(String key) {
+ this.key = key;
+ }
+ /**
+ * @return the selector
+ */
+ public String getSelector() {
+ return selector;
+ }
+ /**
+ * @param selector the selector to set
+ */
+ public void setSelector(String selector) {
+ this.selector = selector;
+ }
+ /**
+ * @return the timing
+ */
+ public String getTiming() {
+ return timing;
+ }
+ /**
+ * @param timing the timing to set
+ */
+ public void setTiming(String timing) {
+ this.timing = timing;
+ }
+ /**
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+ /**
+ * @param type the type to set
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+ /**
+ * @return the rendered
+ */
+ public boolean isRendered() {
+ return rendered;
+ }
+ /**
+ * @param rendered the rendered to set
+ */
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+ /**
+ * @return the disableInInput
+ */
+ public boolean isDisableInInput() {
+ return disableInInput;
+ }
+ /**
+ * @param disableInInput the disableInInput to set
+ */
+ public void setDisableInInput(boolean disableInInput) {
+ this.disableInInput = disableInInput;
+ }
+ /**
+ * @return the checkParent
+ */
+ public boolean isCheckParent() {
+ return checkParent;
+ }
+ /**
+ * @param checkParent the checkParent to set
+ */
+ public void setCheckParent(boolean checkParent) {
+ this.checkParent = checkParent;
+ }
+ /**
+ * @return the bindingInfo
+ */
+ public String getBindingInfo() {
+ String b = binding.getClientId(FacesContext.getCurrentInstance());
+ if(b != null && b.length() != 0)
+ return "work";
+ return "don't work";
+ }
+}
Modified: trunk/test-applications/jsp/src/main/java/rich/RichBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/rich/RichBean.java 2008-06-25 07:39:46 UTC (rev 9206)
+++ trunk/test-applications/jsp/src/main/java/rich/RichBean.java 2008-06-25 08:45:05 UTC (rev 9207)
@@ -1,12 +1,24 @@
package rich;
+import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import org.richfaces.component.html.HtmlCalendar;
+import org.xml.sax.SAXException;
+
+import util.RichComponent.RichComponent;
+import util.RichComponent.RichHandler;
+
//import org.richfaces.VersionBean;
public class RichBean {
@@ -16,9 +28,24 @@
private String srcContainer;
private MapComponent map;
private List<SelectItem> list;
+// private RichComponent richComponent = RichComponent.getInstance();
+ public RichBean() {
+// try {
+// SAXParserFactory factory = SAXParserFactory.newInstance();
+// factory.setNamespaceAware(true);
+// SAXParser saxParser = factory.newSAXParser();
+// // InputStream in = new URL(url).openStream();
+// RichHandler handler = new RichHandler();
+// saxParser.parse(getClass().getResourceAsStream("richfaces.tld"), handler);
+// } catch (SAXException e) {
+// e.printStackTrace();
+// } catch (IOException e) {
+// e.printStackTrace();
+// } catch (ParserConfigurationException e) {
+// e.printStackTrace();
+// }
- public RichBean() {
list = new ArrayList<SelectItem>();
src = "Blank";
srcContainer = "Blank";
@@ -69,6 +96,7 @@
map.add("InplaceSelect", add("/InplaceSelect/InplaceSelect", new boolean [] {false, true, false}));
map.add("InplaceInput", add("/InplaceInput/InplaceInput", new boolean [] {false, true, false}));
map.add("Skinning", add("/Skinning/Skinning", new boolean [] {false, false, false}));
+ map.add("HotKey", add("/HotKey/HotKey", new boolean [] {false, false, false}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
list.add(new SelectItem(iterator.next()));
Added: trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp 2008-06-25 08:45:05 UTC (rev 9207)
@@ -0,0 +1,69 @@
+<%@ 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://richfaces.org/rich" prefix="rich"%>
+
+<f:subview id="hotKeySubviewID">
+ <rich:calendar id="hotKeyCalendarID" popup="false"/>
+ <h:commandButton id="commandButtonID" onclick="return false;" value="test select"></h:commandButton>
+ <rich:hotKey id="hotKeyID" binding="#{hotKey.binding}"
+ disableInInput="#{hotKey.disableInInput}" handler="#{hotKey.handler}" key="#{hotKey.key}"
+ rendered="#{hotKey.rendered}" selector="#{hotKey.selector}" timing="#{hotKey.timing}"/>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="type"></h:outputText>
+ <h:selectOneMenu value="#{hotKey.type}">
+ <f:selectItem itemLabel="onkeydown" itemValue="onkeydown"/>
+ <f:selectItem itemLabel="onkeypress" itemValue="onkeypress"/>
+ <f:selectItem itemLabel="onkeyup" itemValue="onkeyup"/>
+ <a4j:support reRender="hotKeyID" event="onchange"></a4j:support>
+ </h:selectOneMenu>
+
+ <h:outputText value="key"></h:outputText>
+ <h:inputText value="#{hotKey.key}">
+ <a4j:support reRender="hotKeyID" event="onchange"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="timing"></h:outputText>
+ <h:selectOneMenu value="#{hotKey.timing}" onchange="submit();">
+ <f:selectItem itemLabel="immediate" itemValue="immediate"/>
+ <f:selectItem itemLabel="onload" itemValue="onload"/>
+ <f:selectItem itemLabel="onregistercall" itemValue="onregistercall"/>
+ </h:selectOneMenu>
+
+ <h:outputText value="selector"></h:outputText>
+ <h:selectOneMenu value="#{hotKey.selector}">
+ <f:selectItem itemLabel="Button" itemValue="#commandButtonID"/>
+ <f:selectItem itemLabel="none" itemValue=" "/>
+ <a4j:support reRender="hotKeyID" event="onchange"></a4j:support>
+ </h:selectOneMenu>
+
+
+ <h:outputText value="handler"></h:outputText>
+ <h:selectOneMenu value="#{hotKey.handler}" onchange="submit();">
+ <f:selectItem itemValue="$('formID:hotKeySubviewID:hotKeyCalendarID').component.nextYear();" itemLabel="nextYear(Calendar)"/>
+ <f:selectItem itemValue="alert(#{hotKey.key}' is pressed; event type: ' + event.type); return false;" itemLabel="alert(...)"/>
+ </h:selectOneMenu>
+
+ <h:outputText value="disableInInput"></h:outputText>
+ <h:selectBooleanCheckbox value="#{hotKey.disableInInput}">
+ <a4j:support reRender="hotKeyID" event="onchange"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="checkParent"></h:outputText>
+ <h:selectBooleanCheckbox value="#{hotKey.checkParent}">
+ <a4j:support reRender="hotKeyID" event="onchange"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="rendered"></h:outputText>
+ <h:selectBooleanCheckbox value="#{hotKey.rendered}">
+ <a4j:support reRender="hotKeyID" event="onchange"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="test binding:"></h:outputText>
+ <h:outputText value="#{hotKey.bindingInfo}"></h:outputText>
+
+ <button onclick="${rich:component('hotKeyID')}.enable(); return false;">turn on</button>
+ <button onclick="${rich:component('hotKeyID')}.disable(); return false;">turn off</button><br />
+ </h:panelGrid>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-HotKey.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-HotKey.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-HotKey.xml 2008-06-25 08:45:05 UTC (rev 9207)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>hotKey</managed-bean-name>
+ <managed-bean-class>hotKey.HotKey</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config.xml 2008-06-25 07:39:46 UTC (rev 9206)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config.xml 2008-06-25 08:45:05 UTC (rev 9207)
@@ -33,7 +33,7 @@
<default-locale>en</default-locale>
</locale-config>
</application>
- <lifecycle>
+ <lifecycle>
<phase-listener id="phaseTracker">util.phaseTracker.PhaseTracker</phase-listener>
</lifecycle>
</faces-config>
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-06-25 07:39:46 UTC (rev 9206)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-06-25 08:45:05 UTC (rev 9207)
@@ -20,7 +20,7 @@
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,!
/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml</param-value>
+ <param-value>/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,!
/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces!
-config-Custom.xml</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
17 years, 3 months
JBoss Rich Faces SVN: r9206 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-06-25 03:39:46 -0400 (Wed, 25 Jun 2008)
New Revision: 9206
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
change parameters names
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-06-25 07:38:17 UTC (rev 9205)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-06-25 07:39:46 UTC (rev 9206)
@@ -639,7 +639,7 @@
if (this.events.onadd) {
var filesArray = [];
filesArray.push(newEntry);
- this.element.fire("rich:onadd", { files : filesArray });
+ this.element.fire("rich:onadd", { entries : filesArray });
}
if (this.runUpload) {
@@ -1121,7 +1121,7 @@
}
if (this.events.onadd) {
- this.element.fire("rich:onadd", { files : filesArray });
+ this.element.fire("rich:onadd", { entries : filesArray });
}
if (this.runUpload) {
17 years, 3 months
JBoss Rich Faces SVN: r9205 - trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-06-25 03:38:17 -0400 (Wed, 25 Jun 2008)
New Revision: 9205
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
fixed a bug with minimal column width
Modified: trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-06-24 23:05:33 UTC (rev 9204)
+++ trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-06-25 07:38:17 UTC (rev 9205)
@@ -122,7 +122,13 @@
UIColumn col = cols.next();
if (col.isRendered()) {
writer.startElement("col", table);
- writer.writeAttribute("width", table.getColumnSize(col), null);
+=
+ String colWidth = table.getColumnSize(col);
+ if (Integer.valueOf(colWidth) < Integer
+ .valueOf(MIN_COLUMN_WIDTH)) {
+ colWidth = MIN_COLUMN_WIDTH;
+ }
+ writer.writeAttribute("width", colWidth, null);
writer.endElement("col");
}
}
@@ -330,9 +336,9 @@
if (null != component.getFacet(facetName)) {
result = true;
} /*
- * else if(component instanceof Column) { Column column =
- * (Column)component; result = column.isSelfSorted(); }
- */
+ * else if(component instanceof Column) { Column column =
+ * (Column)component; result = column.isSelfSorted(); }
+ */
}
}
return result;
@@ -1106,11 +1112,11 @@
table.setGroupingColumn(column);
}
} else if (isSingleSortMode) { // in case of single
- // sort mode
+ // sort mode
if (!isGroupingColumn) { // grouping is not by
- // this column
+ // this column
if (!sortByGroupingColumn) {// sort not by
- // grouping column
+ // grouping column
// disable sort by this column
column.setSortOrder(Ordering.UNSORTED);
}
@@ -1162,9 +1168,9 @@
UIColumn column = columns.next();
// child.setId(child.getId());
if (groupColumnId.equals(column.getClientId(context))) { // group
- // by
- // this
- // column
+ // by
+ // this
+ // column
// set sort order if is not set
if (column.getSortOrder().equals(Ordering.UNSORTED)) {
column.setSortOrder(Ordering.ASCENDING);
@@ -1448,7 +1454,7 @@
if (column instanceof UIColumn) {
UIColumn dataColumn = (UIColumn) column;
String clientId = dataColumn.getClientId(context);// +
- // facetName;
+ // facetName;
writer.writeAttribute("id", clientId, null);
column.getAttributes().put("columnClientId", clientId);
boolean sortable = sortableColumn && dataColumn.isSelfSorted();
17 years, 3 months
JBoss Rich Faces SVN: r9204 - in trunk/ui/modal-panel/src/main: resources/org/richfaces/renderkit/html/css and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-24 19:05:33 -0400 (Tue, 24 Jun 2008)
New Revision: 9204
Modified:
trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2288
Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
===================================================================
--- trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2008-06-24 21:13:42 UTC (rev 9203)
+++ trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2008-06-24 23:05:33 UTC (rev 9204)
@@ -51,10 +51,10 @@
private static final String STATE_OPTION_SUFFIX = "StateOption_";
- protected String[] RESIZERS = new String[] {
- "NWU", "N", "NEU", "NEL", "E",
- "SEU", "SEL", "S", "SWL",
- "SWU", "W", "NWL"
+ protected static final String[] RESIZERS = new String[] {
+ "N", "E", "S", "W", "NWU", "NEU", "NEL",
+ "SEU", "SEL", "SWL",
+ "SWU", "NWL"
};
@SuppressWarnings("unchecked")
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss 2008-06-24 21:13:42 UTC (rev 9203)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss 2008-06-24 23:05:33 UTC (rev 9204)
@@ -16,6 +16,9 @@
height: 100%;
border-style: none;
background-color: #d0d0d0;
+ }
+
+ .dr-mpnl-mask-div-opaque {
filter: alpha(opacity=50);
opacity: 0.5;
}
@@ -26,12 +29,12 @@
.dr-mpnl-panel {
position: fixed;
- margin: 0;
- padding: 0;
+ margin: 0px;
+ padding: 0px;
background-color: inherit;
- width: 1px;
- height: 1px;
z-index: 9;
+ left: 0px;
+ top: 0px;
}
.dr-mpnl-resizer {
@@ -42,7 +45,7 @@
filter: alpha(opacity=50);
opacity: 0.5;*/
}
-
+
.dr-mpnl-header {
height: 20px;
width: 100%;
@@ -103,7 +106,7 @@
height: 100%;
width: 100%;
border : 1px solid;
- z-index: 1;
+ z-index: -1;
top: 4px;
left: 4px;
filter:alpha(opacity=10);
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-06-24 21:13:42 UTC (rev 9203)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-06-24 23:05:33 UTC (rev 9204)
@@ -105,17 +105,18 @@
this.borders = new Array();
if (this.options.resizeable) {
- this.borders.push(new ModalPanel.Border(id + "ResizerNWU", this, "NW-resize", ModalPanel.Sizer.NWU));
this.borders.push(new ModalPanel.Border(id + "ResizerN", this, "N-resize", ModalPanel.Sizer.N));
+ this.borders.push(new ModalPanel.Border(id + "ResizerE", this, "E-resize", ModalPanel.Sizer.E));
+ this.borders.push(new ModalPanel.Border(id + "ResizerS", this, "S-resize", ModalPanel.Sizer.S));
+ this.borders.push(new ModalPanel.Border(id + "ResizerW", this, "W-resize", ModalPanel.Sizer.W));
+
+ this.borders.push(new ModalPanel.Border(id + "ResizerNWU", this, "NW-resize", ModalPanel.Sizer.NWU));
this.borders.push(new ModalPanel.Border(id + "ResizerNEU", this, "NE-resize", ModalPanel.Sizer.NEU));
this.borders.push(new ModalPanel.Border(id + "ResizerNEL", this, "NE-resize", ModalPanel.Sizer.NEL));
- this.borders.push(new ModalPanel.Border(id + "ResizerE", this, "E-resize", ModalPanel.Sizer.E));
this.borders.push(new ModalPanel.Border(id + "ResizerSEU", this, "SE-resize", ModalPanel.Sizer.SEU));
this.borders.push(new ModalPanel.Border(id + "ResizerSEL", this, "SE-resize", ModalPanel.Sizer.SEL));
- this.borders.push(new ModalPanel.Border(id + "ResizerS", this, "S-resize", ModalPanel.Sizer.S));
this.borders.push(new ModalPanel.Border(id + "ResizerSWL", this, "SW-resize", ModalPanel.Sizer.SWL));
this.borders.push(new ModalPanel.Border(id + "ResizerSWU", this, "SW-resize", ModalPanel.Sizer.SWU));
- this.borders.push(new ModalPanel.Border(id + "ResizerW", this, "W-resize", ModalPanel.Sizer.W));
this.borders.push(new ModalPanel.Border(id + "ResizerNWL", this, "NW-resize", ModalPanel.Sizer.NWL));
}
@@ -136,10 +137,8 @@
eCursorDiv.style.position = "absolute";
//that is to apply filter
- eDiv.style.width = "1px";
- eDiv.style.height = "1px";
- eCursorDiv.style.width = "1px";
- eCursorDiv.style.height = "1px";
+ eDiv.style.zoom = "1";
+ eCursorDiv.style.zoom = "1";
var eCdiv = $(this.cdiv);
eCdiv.style.position = "absolute";
@@ -159,11 +158,11 @@
},
width: function() {
- return this.getContentElement().offsetWidth;
+ return this.getContentElement().parentNode.clientWidth;
},
height: function() {
- return this.getContentElement().offsetHeight;
+ return this.getContentElement().parentNode.clientHeight;
},
getContentElement: function() {
@@ -408,7 +407,7 @@
this.iframe = this.id.id + "IFrame";
new Insertion.Top(eCdiv,
"<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.iframe + "\" " +
- "style=\"position: absolute; width: 1px; height: 1px; background-color: white; overflow-y: hidden; z-index: 1;\">" +
+ "style=\"position: absolute; width: 1px; height: 1px; background-color: white; overflow-y: hidden; z-index: -1;\">" +
"</iframe>");
eIframe = $(this.iframe);
@@ -527,7 +526,7 @@
}
}
- this.setLeft(_left);
+ this.setLeft(Math.round(_left));
}
if (options.top) {
@@ -544,7 +543,7 @@
}
}
- this.setTop(_top);
+ this.setTop(Math.round(_top));
}
if (this.options.autosized) {
@@ -577,23 +576,21 @@
},
startDrag: function(border) {
- //for (var k = 0; k < this.borders.length; k++ ) {
- // this.borders[k].hide();
- //}
+ for (var k = 0; k < this.borders.length; k++ ) {
+ this.borders[k].hide();
+ }
Selection.disableSelection(document.body);
},
endDrag: function(border) {
for (var k = 0; k < this.borders.length; k++ ) {
- //this.borders[k].show();
+ this.borders[k].show();
this.borders[k].doPosition();
}
Selection.enableSelection(document.body);
},
hide: function(event, opts) {
-
-
if (this.invokeEvent("beforehide",event,null,element)) {
this.restoreFocus();
@@ -749,9 +746,10 @@
}
}
- Element.setStyle(eCdiv, cssHash);
-
Element.setStyle(eContentElt, cssHashWH);
+
+ Element.setStyle(eCdiv, cssHash);
+
this.correctShadowSizeEx();
Object.extend(this.userOptions, cssHash);
@@ -778,7 +776,7 @@
if (this.header) {
this.header.doPosition();
}
-
+
return vetoes;
},
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2008-06-24 21:13:42 UTC (rev 9203)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2008-06-24 23:05:33 UTC (rev 9204)
@@ -47,7 +47,7 @@
var eCursorDiv = $(this.modalPanel.cursorDiv);
eCursorDiv.style.cursor = $(this.id).style.cursor;
- eCursorDiv.style.zIndex = 8;
+ eCursorDiv.style.zIndex = 10;
this.modalPanel.startDrag(this);
Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-06-24 21:13:42 UTC (rev 9203)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-06-24 23:05:33 UTC (rev 9204)
@@ -39,7 +39,7 @@
class="rich-modalpanel #{component.attributes['styleClass']}"
x:passThruWithExclusions="id,style,class,styleClass"
>
- <div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}Div"
+ <div class="dr-mpnl-mask-div dr-mpnl-mask-div-opaque rich-mpnl-mask-div" id="#{clientId}Div"
style="z-index: 1;"
onclick="#{component.attributes['onmaskclick']}"
ondblclick="#{component.attributes['onmaskdblclick']}"
@@ -53,31 +53,8 @@
<button class="dr-mpnl-pnl-button" id="#{clientId}FirstHref"></button>
</div>
- <div id="#{clientId}CDiv" class="dr-mpnl-panel rich-mpnl_panel" >
-
- <jsp:scriptlet>
- <![CDATA[
- if (component.isResizeable()) {
- for (int i = 0; i < RESIZERS.length; i++) {
- variables.setVariable("resizer", RESIZERS[i]);
-
- boolean isHor = i / 3 % 2 == 0;
- String style = isHor ? "width: 40px; height: 4px;" : "height: 40px; width: 4px;";
-
- //higher z-index for corner elements
- style += "z-index: " + (i % 3 == 1 ? 0 : 1) + 3 + ";";
- variables.setVariable("resizerStyle", style);
- ]]>
- </jsp:scriptlet>
- <div id="#{clientId}Resizer#{resizer}" class="dr-mpnl-resizer rich-mpnl-resizer" style="#{resizerStyle}">
- </div>
- <jsp:scriptlet>
- <![CDATA[
- }
- }
- ]]>
- </jsp:scriptlet>
-
+ <div class="dr-mpnl-panel rich-mpnl_panel" >
+ <div id="#{clientId}CDiv" style="position: absolute; left: 0px; top: 0px; z-index: 9; text-align: left;">
<div id="#{clientId}ShadowDiv" class="dr-mpnl-shadow rich-mpnl-shadow"
style="#{component.shadowStyle}" >
</div>
@@ -114,7 +91,7 @@
]]>
</jsp:scriptlet>
- <div id="#{clientId}ContentDiv" style="#{divStyle} position: absolute; z-index: 2; #{component.attributes['style']}" class="dr-mpnl-pnl rich-mp-content">
+ <div id="#{clientId}ContentDiv" style="#{divStyle} #{component.attributes['style']}" class="dr-mpnl-pnl rich-mp-content">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("controls")!=null && component.getFacet("controls").isRendered()) {]]>
</jsp:scriptlet>
@@ -148,11 +125,36 @@
</td>
</tr>
</table>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ if (component.isResizeable()) {
+ for (int i = 0; i < RESIZERS.length; i++) {
+ variables.setVariable("resizer", RESIZERS[i]);
+
+ boolean isHor = i % 2 == 0;
+ String style = isHor ? "width: 40px; height: 4px;" : "height: 40px; width: 4px;";
+
+ //higher z-index for corner elements
+ //style += "z-index: " + (i % 3 == 1 ? 0 : 1) + 3 + ";";
+ variables.setVariable("resizerStyle", style);
+ ]]>
+ </jsp:scriptlet>
+ <div id="#{clientId}Resizer#{resizer}" class="dr-mpnl-resizer rich-mpnl-resizer" style="#{resizerStyle}">
+ </div>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ }
+ ]]>
+ </jsp:scriptlet>
+
+
</div>
</div>
-
+ </div>
<div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}CursorDiv"
- style="filter: alpha(opacity=1); z-index: -200">
+ style="z-index: -200; background-color: transparent;">
<button class="dr-mpnl-pnl-button" id="#{clientId}LastHref"></button>
</div>
17 years, 3 months
JBoss Rich Faces SVN: r9203 - trunk/docs.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-06-24 17:13:42 -0400 (Tue, 24 Jun 2008)
New Revision: 9203
Modified:
trunk/docs/pom.xml
Log:
CDK documentation was added to a standart build.
http://jira.jboss.com/jira/browse/RF-3757
Modified: trunk/docs/pom.xml
===================================================================
--- trunk/docs/pom.xml 2008-06-24 16:36:56 UTC (rev 9202)
+++ trunk/docs/pom.xml 2008-06-24 21:13:42 UTC (rev 9203)
@@ -62,6 +62,7 @@
<module>maven-docbook-plugin</module>
-->
<module>userguide</module>
+ <module>cdkguide</module>
<module>faq</module>
<module>migrationguide</module>
17 years, 3 months
JBoss Rich Faces SVN: r9202 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-06-24 12:36:56 -0400 (Tue, 24 Jun 2008)
New Revision: 9202
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
http://jira.jboss.com/jira/browse/RF-2305
New JS API functions added
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-06-24 15:51:44 UTC (rev 9201)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-06-24 16:36:56 UTC (rev 9202)
@@ -418,9 +418,84 @@
<entry>clear()</entry>
<entry>Clears list of files</entry>
</row>
+
+ <row>
+ <entry>$('id').component.entries</entry>
+ <entry>Returns a array of all files in the listмассив всех файлов в списке
+
+ $('id').component.entries.length --- количество файлов в списке
+
+ $('id').component.entries[0].fileName --- имя файла
+ </entry>
+ </row>
+
+
</tbody>
</tgroup>
</table>
+
+
+
+
+
+ <table>
+ <title>Client side object properties</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Objects</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>$('id').component.entries</entry>
+ <entry>Returns a array of all files in the listмассив всех файлов в списке
+
+ </entry>
+ </row>
+
+
+
+ <row>
+ <entry>$('id').component.entries.length</entry>
+ <entry>Returns the number of files in the list </entry>
+ </row>
+
+
+ <row>
+ <entry>$('id').component.entries[0].fileName</entry>
+ <entry>Returns the file name, that is retrieved by the array index </entry>
+ </row>
+
+
+
+ <row>
+ <entry>$('id').component.entries[0].state </entry>
+ <entry>Returns the file state. Possible states are
+ <itemizedlist>
+
+ <listitem><para>"initialized" - the file is added</para> </listitem>
+ <listitem><para>"progress" - the file is being uploaded</para> </listitem>
+ <listitem><para>"ready" - uploading is in process. The file will be uploaded on queue order.</para> </listitem>
+ <listitem><para>"canceled" - uploading of the file is canceled </para> </listitem>
+ <listitem><para>"done" - the file is uploaded successfully</para> </listitem>
+ <listitem><para>"transfer_error’ " - a file transfer error occurred </para> </listitem>
+ <listitem><para>"size_error’ " - the file exceeded maximum size</para> </listitem>
+
+
+ </itemizedlist>
+
+
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+
</section>
<!-- End of JavaScript API-->
<section>
17 years, 3 months
JBoss Rich Faces SVN: r9201 - in trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html: swf and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-06-24 11:51:44 -0400 (Tue, 24 Jun 2008)
New Revision: 9201
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/swf/fileUploadComponent.swf
Log:
http://jira.jboss.com/jira/browse/RF-3549
fixed flash mode under IE
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-06-24 15:09:43 UTC (rev 9200)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-06-24 15:51:44 UTC (rev 9201)
@@ -1052,7 +1052,7 @@
var oid = this.id+":flashContainer";
object.style.display = allowFlash=="true" ? "" : "none";
object.id = oid;
- this.element.appendChild(object);
+ this.items.appendChild(object);
this.isFlash = swfobject.hasFlashPlayerVersion("8.0.0");
if (this.isFlash)
{
@@ -1068,6 +1068,9 @@
//this.currentInput.onchange = null;
this.currentInput.onmousedown=(function (){this.createFrame();}).bind(this);
this.currentInput.onclick = this._flashOnOpenFileDialog.bind(this);
+ } else if (allowFlash=="true")
+ {
+ this.disable();
}
}
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/swf/fileUploadComponent.swf
===================================================================
(Binary files differ)
17 years, 3 months