JBoss Rich Faces SVN: r9160 - trunk/test-applications/jsp/src/main/webapp/ListShuttle.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-23 10:09:37 -0400 (Mon, 23 Jun 2008)
New Revision: 9160
Modified:
trunk/test-applications/jsp/src/main/webapp/ListShuttle/ListShuttleProperty.jsp
Log:
Fix some misprints.
Modified: trunk/test-applications/jsp/src/main/webapp/ListShuttle/ListShuttleProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ListShuttle/ListShuttleProperty.jsp 2008-06-23 13:33:44 UTC (rev 9159)
+++ trunk/test-applications/jsp/src/main/webapp/ListShuttle/ListShuttleProperty.jsp 2008-06-23 14:09:37 UTC (rev 9160)
@@ -113,19 +113,19 @@
<h:column></h:column>
<a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.doHide()" value="Hide"></a4j:commandLink>
<a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.doShow()" value="Show"></a4j:commandLink>
- <a4j:commandLink onclick="alert($('formID:listShuttleSubviewID:listShuttleID').component.isShown)" value="isShown"></a4j:commandLink>
+ <a4j:commandLink onclick="alert($('formID:listShuttleSubviewID:listShuttleID').component.isShown()" value="isShown"></a4j:commandLink>
<a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.Enable()" value="Enable"></a4j:commandLink>
<a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.Disable()" value="Disable"></a4j:commandLink>
<a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.isEnabled()" value="isEnabled"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveUp" value="moveUp"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveDown" value="moveDown"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveTop" value="moveTop"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveBottom" value="moveBottom"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.copy" value="copy"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.remove" value="remove"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.copyAll" value="copyAll"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.removeAll" value="removeAll"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.getSelection" value="getSelection"></a4j:commandLink>
- <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.getItems" value="getItems"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveUp()" value="moveUp"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveDown()" value="moveDown"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveTop()" value="moveTop"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveBottom()" value="moveBottom"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.copy()" value="copy"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.remove()" value="remove"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.copyAll()" value="copyAll"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.removeAll()" value="removeAll"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.getSelection()" value="getSelection"></a4j:commandLink>
+ <a4j:commandLink onclick="$('formID:listShuttleSubviewID:listShuttleID').component.getItems()" value="getItems"></a4j:commandLink>
</h:panelGrid>
</f:subview>
\ No newline at end of file
17 years, 6 months
JBoss Rich Faces SVN: r9159 - in trunk/test-applications/jsp/src/main: java/util/event and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-23 09:33:44 -0400 (Mon, 23 Jun 2008)
New Revision: 9159
Modified:
trunk/test-applications/jsp/src/main/java/sb/Data.java
trunk/test-applications/jsp/src/main/java/sb/Sb.java
trunk/test-applications/jsp/src/main/java/util/event/Event.java
trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBox.jsp
trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBoxProperty.jsp
trunk/test-applications/jsp/src/main/webapp/pages/Action/EventInfo.jsp
trunk/test-applications/jsp/src/main/webapp/styles/styles.css
Log:
Modify and Add some attributes for suggestionBox
Modified: trunk/test-applications/jsp/src/main/java/sb/Data.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/sb/Data.java 2008-06-23 12:17:40 UTC (rev 9158)
+++ trunk/test-applications/jsp/src/main/java/sb/Data.java 2008-06-23 13:33:44 UTC (rev 9159)
@@ -4,6 +4,7 @@
private String city;
private String contry;
private boolean flag;
+ private String text;
public Data(String city, String contry, boolean flag) {
this.city = city;
@@ -36,10 +37,14 @@
}
public String getText() {
- return city + " (" + contry + ")";
+ return city + " - " + contry;
}
public String toString() {
return city + " (" + contry + ")";
}
+
+ public void setText(String text) {
+ this.text = text;
+ }
}
Modified: trunk/test-applications/jsp/src/main/java/sb/Sb.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/sb/Sb.java 2008-06-23 12:17:40 UTC (rev 9158)
+++ trunk/test-applications/jsp/src/main/java/sb/Sb.java 2008-06-23 13:33:44 UTC (rev 9159)
@@ -5,6 +5,9 @@
import java.util.Iterator;
import java.util.List;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
import org.richfaces.component.html.HtmlSuggestionBox;
import org.richfaces.renderkit.html.SuggestionBoxRenderer;
@@ -35,6 +38,14 @@
private String value;
private String dir;
private int requestDelay;
+ private HtmlSuggestionBox mySuggestionBox = null;
+ private String bindLabel;
+ private boolean bypassUpdates;
+ private String frame;
+ private boolean ignoreDupResponses;
+ private boolean immediate;
+ private String nothingLabel;
+ private boolean usingSuggestObjects;
/*
* private static final String[] cit = { "Abba", "Abbeville", "Acworth",
@@ -57,12 +68,14 @@
public Sb() {
+ ignoreDupResponses = true;
+ immediate = true;
dir = "LTR";
ajaxSingle = false;
rendered = true;
selfRendered = false;
value = "a, ";
- requestDelay = 100;
+ requestDelay = 500;
tokens = "[ ,";
border = "1";
width = "200";
@@ -70,7 +83,6 @@
shadowOpacity = "1";
shadowDepth = Integer.toString(SuggestionBoxRenderer.SHADOW_DEPTH);
zindex = 3;
- focus = true;
rows = "0";
first = 0;
cellspacing = "2";
@@ -78,9 +90,19 @@
minchars = "1";
frequency = 0;
rules = "none";
+ bindLabel = "Not checked";
+ bypassUpdates = true;
+ frame = "void";
+ nothingLabel = "Nothinf label works!";
+ usingSuggestObjects = true;
setCities(getAllData());
}
+ public void checkBinding(ActionEvent actionEvent) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = mySuggestionBox.getClientId(context);
+ }
+
public List autocomplete(Object event) {
String pref = event.toString();
ArrayList result = new ArrayList();
@@ -404,4 +426,68 @@
public void setDir(String dir) {
this.dir = dir;
}
+
+ public HtmlSuggestionBox getMySuggestionBox() {
+ return mySuggestionBox;
+ }
+
+ public void setMySuggestionBox(HtmlSuggestionBox mySuggestionBox) {
+ this.mySuggestionBox = mySuggestionBox;
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public boolean isBypassUpdates() {
+ return bypassUpdates;
+ }
+
+ public void setBypassUpdates(boolean bypassUpdates) {
+ this.bypassUpdates = bypassUpdates;
+ }
+
+ public String getFrame() {
+ return frame;
+ }
+
+ public void setFrame(String frame) {
+ this.frame = frame;
+ }
+
+ public boolean isIgnoreDupResponses() {
+ return ignoreDupResponses;
+ }
+
+ public void setIgnoreDupResponses(boolean ignoreDupResponses) {
+ this.ignoreDupResponses = ignoreDupResponses;
+ }
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ public String getNothingLabel() {
+ return nothingLabel;
+ }
+
+ public void setNothingLabel(String nothingLabel) {
+ this.nothingLabel = nothingLabel;
+ }
+
+ public boolean isUsingSuggestObjects() {
+ return usingSuggestObjects;
+ }
+
+ public void setUsingSuggestObjects(boolean usingSuggestObjects) {
+ this.usingSuggestObjects = usingSuggestObjects;
+ }
}
Modified: trunk/test-applications/jsp/src/main/java/util/event/Event.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/util/event/Event.java 2008-06-23 12:17:40 UTC (rev 9158)
+++ trunk/test-applications/jsp/src/main/java/util/event/Event.java 2008-06-23 13:33:44 UTC (rev 9159)
@@ -112,6 +112,7 @@
private String onbeforehide;
private String onbeforeshow;
private String opened;
+ private String onobjectchange;
public String getOpened() {
return opened;
@@ -123,6 +124,7 @@
// showEvent('onkeypressInputID', 'onkeypress work!')
public Event() {
+ onobjectchange = "showEvent('onobjectchangeInputID', 'onobjectchange work!')";
onLoadMap = "showEvent('onLoadMapInputID', 'onLoadMap work!')";
opened = "showEvent('openedInputID', 'opened work!')";
onRowClick = "showEvent('onRowClickInputID', 'onRowClick work!')";
@@ -1262,4 +1264,12 @@
this.onbeforeshow = onbeforeshow;
}
+ public String getOnobjectchange() {
+ return onobjectchange;
+ }
+
+ public void setOnobjectchange(String onobjectchange) {
+ this.onobjectchange = onobjectchange;
+ }
+
}
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBox.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBox.jsp 2008-06-23 12:17:40 UTC (rev 9158)
+++ trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBox.jsp 2008-06-23 13:33:44 UTC (rev 9159)
@@ -8,18 +8,63 @@
<f:verbatim>Suggestion Box will suggest you Town's names if it's started with the "a" or "A" letter
<br />
</f:verbatim>
- <h:inputText value="#{sb.property}" id="text" />
- <rich:suggestionbox id="suggestionBoxId" frame="below" param="param:#{result.text}" eventsQueue="myEventsQueue" ajaxSingle="#{sb.ajaxSingle}" dir="#{sb.dir}"
- rendered="#{sb.rendered}" requestDelay="#{sb.requestDelay}" selfRendered="#{sb.selfRendered}" value="#{sb.value}" for="text"
- var="result" fetchValue="#{result.text}" suggestionAction="#{sb.autocomplete}" width="#{sb.width}" height="#{sb.height}"
- border="#{sb.border}" zindex="#{sb.zindex}" rules="#{sb.rules}" cellpadding="#{sb.cellpadding}"
- cellspacing="#{sb.cellspacing}" first="#{sb.first}" minChars="#{sb.minchars}" tokens="#{sb.tokens}" bgcolor="#{sb.bgColor}"
- focus="#{sb.forcus}" title="#{result.text}" summary="summary" shadowOpacity="#{sb.shadowOpacity}"
- shadowDepth="#{sb.shadowDepth}" selectValueClass="mousemove" frequency="#{sb.frequency}" nothingLabel="nothingLabel work! "
- entryClass="#{style.entryClass}" popupClass="#{style.popupClass}" popupStyle="#{style.popupStyle}" style="#{style.style}" styleClass="#{style.styleClass}" selectedClass="#{style.selectedClass}" rowClasses="#{style.rowClasses}"
- oncomplete="#{event.oncomplete}" onselect="#{event.onselect}" onbeforedomupdate="#{event.onbeforedomupdate}" onsubmit="#{event.onsubmit}">
+ <h:inputText value="#{sb.property}" id="text">
+ <f:validateLength minimum="0" maximum="30"/>
+ </h:inputText>
+ <rich:suggestionbox id="suggestionBoxId"
+ ajaxSingle="#{sb.ajaxSingle}"
+ bgcolor="#{sb.bgColor}"
+ binding="#{sb.mySuggestionBox}"
+ bypassUpdates="#{sb.bypassUpdates}"
+ cellpadding="#{sb.cellpadding}"
+ cellspacing="#{sb.cellspacing}"
+ dir="#{sb.dir}"
+ entryClass="#{style.entryClass}"
+ eventsQueue="myEventsQueue"
+ fetchValue="#{result.text}"
+ first="#{sb.first}"
+ for="text"
+ frame="#{sb.frame}"
+ frequency="#{sb.frequency}"
+ height="#{sb.height}"
+ ignoreDupResponses="#{sb.ignoreDupResponses}"
+ immediate="#{sb.immediate}"
+ limitToList="false"
+ minChars="#{sb.minchars}"
+ nothingLabel="#{sb.nothingLabel}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ oncomplete="#{event.oncomplete}"
+ onobjectchange="#{event.onobjectchange}"
+ onselect="#{event.onselect}"
+ onsubmit="#{event.onsubmit}"
- <h:column>
+ usingSuggestObjects="true"
+ reRender="label"
+ param="param:#{result.text}"
+ rendered="#{sb.rendered}"
+ requestDelay="#{sb.requestDelay}"
+ selfRendered="#{sb.selfRendered}"
+ value="#{sb.value}"
+ var="result"
+ suggestionAction="#{sb.autocomplete}"
+ width="#{sb.width}"
+ border="#{sb.border}"
+ zindex="#{sb.zindex}"
+ rules="#{sb.rules}"
+ tokens="#{sb.tokens}"
+ title="#{result.text}"
+ summary="summary"
+ shadowOpacity="#{sb.shadowOpacity}"
+ shadowDepth="#{sb.shadowDepth}"
+ selectValueClass="mousemove"
+ popupClass="#{style.popupClass}"
+ popupStyle="#{style.popupStyle}"
+ style="#{style.style}"
+ styleClass="#{style.styleClass}"
+ selectedClass="#{style.selectedClass}"
+ rowClasses="#{style.rowClasses}" >
+
+ <h:column>
<h:outputText value="#{result.city}" />
</h:column>
<h:column>
@@ -32,5 +77,5 @@
<h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
</h:column>
</rich:suggestionbox>
- <div style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index</div>
+ <div id="label" style="position: relative; font-size: 50px; z-index: 2; color: navy">z-index</div>
</f:subview>
Modified: trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBoxProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBoxProperty.jsp 2008-06-23 12:17:40 UTC (rev 9158)
+++ trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBoxProperty.jsp 2008-06-23 13:33:44 UTC (rev 9159)
@@ -5,7 +5,102 @@
<f:subview id="suggestionboxPropertySubviewID">
<h:panelGrid columns="2" cellpadding="5px">
+ <h:outputText value="ajaxSingle"></h:outputText>
+ <h:selectBooleanCheckbox value="#{sb.ajaxSingle}" onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="bgcolor"></h:outputText>
+ <h:selectOneMenu value="#{sb.bgColor}">
+ <f:selectItem itemLabel="none" itemValue="none" />
+ <f:selectItem itemLabel="aqua" itemValue="aqua" />
+ <f:selectItem itemLabel="blue" itemValue="blue" />
+ <f:selectItem itemLabel="fuchsia" itemValue="fuchsia" />
+ <f:selectItem itemLabel="gray" itemValue="gray" />
+ <f:selectItem itemLabel="lime" itemValue="lime" />
+ <f:selectItem itemLabel="maroon" itemValue="maroon" />
+ <f:selectItem itemLabel="purple" itemValue="purple" />
+ <f:selectItem itemLabel="red" itemValue="red" />
+ <f:selectItem itemLabel="silver" itemValue="silver" />
+ <f:selectItem itemLabel="teal" itemValue="teal" />
+ <f:selectItem itemLabel="yellow" itemValue="yellow" />
+ <f:selectItem itemLabel="white" itemValue="white" />
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:selectOneMenu>
+
+ <h:commandButton id="bindingButtonID" actionListener="#{sb.checkBinding}" value="binding" />
+ <h:outputText value="#{sb.bindLabel}" />
+
+ <h:outputText value="border"/>
+ <h:inputText value="#{sb.border}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="bypassUpdates"></h:outputText>
+ <h:selectBooleanCheckbox value="#{sb.bypassUpdates}" onchange="submit();"/>
+
+ <h:outputText value="cellpadding"/>
+ <h:inputText value="#{sb.cellpadding}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:inputText>
+ <h:outputText value="cellspacing"/>
+ <h:inputText value="#{sb.cellspacing}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="dir"></h:outputText>
+ <h:selectOneMenu value="#{sb.dir}">
+ <f:selectItem itemLabel="RTL" itemValue="RTL" />
+ <f:selectItem itemLabel="LTR" itemValue="LTR" />
+ </h:selectOneMenu>
+
+ <h:outputText value="first" />
+ <h:inputText value="#{sb.first}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="frame"></h:outputText>
+ <h:selectOneMenu value="#{sb.frame}">
+ <f:selectItem itemLabel="void" itemValue="void" />
+ <f:selectItem itemLabel="above" itemValue="above" />
+ <f:selectItem itemLabel="below" itemValue="below" />
+ <f:selectItem itemLabel="hsides" itemValue="hsides" />
+ <f:selectItem itemLabel="lhs" itemValue="lhs" />
+ <f:selectItem itemLabel="rhs" itemValue="rhs" />
+ <f:selectItem itemLabel="vsides" itemValue="vsides" />
+ <f:selectItem itemLabel="box" itemValue="box" />
+ <f:selectItem itemLabel="border " itemValue="border " />
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:selectOneMenu>
+
+ <h:outputText value="frequency"/>
+ <h:inputText value="#{sb.frequency}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="height"/>
+ <h:inputText value="#{sb.height}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="ignoreDupResponses"></h:outputText>
+ <h:selectBooleanCheckbox value="#{sb.ignoreDupResponses}" onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="immediate"></h:outputText>
+ <h:selectBooleanCheckbox value="#{sb.immediate}" onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="minChars"/>
+ <h:inputText value="#{sb.minchars}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="nothingLabel"/>
+ <h:inputText value="#{sb.nothingLabel}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="usingSuggestObjects"></h:outputText>
+ <h:selectBooleanCheckbox value="#{sb.usingSuggestObjects}" onchange="submit();"></h:selectBooleanCheckbox>
+
<h:outputText value="z-index"></h:outputText>
<h:selectOneRadio value="#{sb.zindex}">
<f:selectItem itemLabel="1" itemValue="1" />
@@ -23,40 +118,10 @@
<a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
</h:inputText>
- <h:outputText value="Frequency"/>
- <h:inputText value="#{sb.frequency}">
- <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
- </h:inputText>
-
- <h:outputText value="Border"/>
- <h:inputText value="#{sb.border}">
- <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
- </h:inputText>
-
<h:outputText value="Width"/>
<h:inputText value="#{sb.width}">
<a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
</h:inputText>
-
- <h:outputText value="Height"/>
- <h:inputText value="#{sb.height}">
- <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
- </h:inputText>
-
- <h:outputText value="Cellpadding"/>
- <h:inputText value="#{sb.cellpadding}">
- <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
- </h:inputText>
-
- <h:outputText value="Cellspacing"/>
- <h:inputText value="#{sb.cellspacing}">
- <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
- </h:inputText>
-
- <h:outputText value="First" />
- <h:inputText value="#{sb.first}">
- <a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
- </h:inputText>
<h:outputText value="tokens:"></h:outputText>
<h:inputText value="#{sb.tokens}"></h:inputText>
@@ -65,32 +130,7 @@
<h:inputText value="#{sb.minchars}">
<a4j:support event="onchange" reRender="suggestionBoxId"></a4j:support>
</h:inputText>
-
- <h:outputText value="dir"></h:outputText>
- <h:selectOneMenu value="#{sb.dir}">
- <f:selectItem itemLabel="RTL" itemValue="RTL" />
- <f:selectItem itemLabel="LTR" itemValue="LTR" />
- </h:selectOneMenu>
-
- <h:outputText value="Background Colour"></h:outputText>
- <h:selectOneMenu value="#{sb.bgColor}">
- <f:selectItem itemLabel="none" itemValue="none" />
- <f:selectItem itemLabel="aqua" itemValue="aqua" />
- <f:selectItem itemLabel="blue" itemValue="blue" />
- <f:selectItem itemLabel="fuchsia" itemValue="fuchsia" />
- <f:selectItem itemLabel="gray" itemValue="gray" />
- <f:selectItem itemLabel="lime" itemValue="lime" />
- <f:selectItem itemLabel="maroon" itemValue="maroon" />
- <f:selectItem itemLabel="purple" itemValue="purple" />
- <f:selectItem itemLabel="red" itemValue="red" />
- <f:selectItem itemLabel="silver" itemValue="silver" />
- <f:selectItem itemLabel="teal" itemValue="teal" />
- <f:selectItem itemLabel="yellow" itemValue="yellow" />
- <f:selectItem itemLabel="white" itemValue="white" />
- <a4j:support event="onclick" reRender="suggestionBoxId"></a4j:support>
- </h:selectOneMenu>
-
<h:outputText value="Shadow Opacity"></h:outputText>
<h:selectOneRadio value="#{sb.shadowOpacity}">
<f:selectItem itemLabel="1" itemValue="1" />
@@ -113,9 +153,6 @@
<f:selectItem itemLabel="7" itemValue="6" />
<a4j:support event="onclick" reRender="suggestionBoxId"></a4j:support>
</h:selectOneRadio>
-
- <h:outputText value="ajaxSingle"></h:outputText>
- <h:selectBooleanCheckbox value="#{sb.ajaxSingle}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="selfRendered"></h:outputText>
<h:selectBooleanCheckbox value="#{sb.selfRendered}" onchange="submit();"></h:selectBooleanCheckbox>
Modified: trunk/test-applications/jsp/src/main/webapp/pages/Action/EventInfo.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Action/EventInfo.jsp 2008-06-23 12:17:40 UTC (rev 9158)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Action/EventInfo.jsp 2008-06-23 13:33:44 UTC (rev 9159)
@@ -108,4 +108,6 @@
<f:verbatim><div style="position: relative"><input id="onbeforehideInputID" type="hidden" value="don't work!" size="42" /></div></f:verbatim>
<f:verbatim><div style="position: relative"><input id="onbeforeshowInputID" type="hidden" value="don't work!" size="42" /></div></f:verbatim>
<f:verbatim><div style="position: relative"><input id="openedInputID" type="hidden" value="don't work!" size="42" /></div></f:verbatim>
+ <f:verbatim><div style="position: relative"><input id="onobjectchangeInputID" type="hidden" value="don't work!" size="42" /></div></f:verbatim>
+
</f:subview>
Modified: trunk/test-applications/jsp/src/main/webapp/styles/styles.css
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/styles/styles.css 2008-06-23 12:17:40 UTC (rev 9158)
+++ trunk/test-applications/jsp/src/main/webapp/styles/styles.css 2008-06-23 13:33:44 UTC (rev 9159)
@@ -2,6 +2,13 @@
.dr-stglpanel-marker {
float: right;
}
+
+/* Suggestion Box */
+.entryClass {
+ color: red;
+ background: yellow;
+}
+
/* Message and messages */
.rich-message-label {
padding: 0px 10px;
17 years, 6 months
JBoss Rich Faces SVN: r9158 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-06-23 08:17:40 -0400 (Mon, 23 Jun 2008)
New Revision: 9158
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
Log:
RF-3753 - described enableManualInput attribute for calendar and combobox
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-06-23 12:16:51 UTC (rev 9157)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-06-23 12:17:40 UTC (rev 9158)
@@ -260,6 +260,19 @@
</para>
</listitem>
</itemizedlist>
+ <para>
+ The
+ <emphasis>
+ <property>
+ "enableManualInput"
+ </property>
+ </emphasis>
+ attribute enables/disables input field, so when
+ <code>
+ enableManualInput = "false"
+ </code>,
+ user can only pick the date manually and has no possibility to type in the date (default value is "false").
+ </para>
<para>The <emphasis role="bold">
<property><rich:calendar></property>
</emphasis> component allows to use <emphasis>
Modified: trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2008-06-23 12:16:51 UTC (rev 9157)
+++ trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2008-06-23 12:17:40 UTC (rev 9158)
@@ -209,7 +209,20 @@
</imageobject>
</mediaobject>
</figure>
-
+ <para>
+ The
+ <emphasis>
+ <property>
+ "enableManualInput"
+ </property>
+ </emphasis>
+ attribute enables/disables input field, so when
+ <code>
+ enableManualInput = "false"
+ </code>,
+ user can only pick the value manually and has no possibility to type in the value
+ (default value is "false").
+ </para>
<!--para>
The <emphasis role="bold"><property><rich:comboBox></property></emphasis> component provides the possibility to use
specific event attribute <emphasis><property> "onlistcall"</property></emphasis> which is fired before the list opening.
17 years, 6 months
JBoss Rich Faces SVN: r9157 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-06-23 08:16:51 -0400 (Mon, 23 Jun 2008)
New Revision: 9157
Modified:
trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
trunk/docs/userguide/en/src/main/docbook/included/mediaOutput.xml
trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
Log:
RF-672 - corrected names of attributes, tags and components for htmlCommandLink, outputPanel, treeNode, mediaOutput
Modified: trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2008-06-23 12:15:15 UTC (rev 9156)
+++ trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2008-06-23 12:16:51 UTC (rev 9157)
@@ -71,7 +71,7 @@
<para>AJAX support is built in and it's not necessary to add nested <emphasis role="bold"><property><a4j:support></property></emphasis> to the component.</para>
</note>
<para>
- The usage of the keyword <property>'this'</property> in JavaScript code in the <emphasis><property>"oncomplete"</property></emphasis> attribute
+ The usage of the keyword <code>'this'</code> in JavaScript code in the <emphasis><property>"oncomplete"</property></emphasis> attribute
depends on the location of <emphasis role="bold"><property><a4j:commandButton></property></emphasis>. If the <property>commandButton</property> is situated outside the re-rendered region
you can use keyword <property>'this'</property> as in the following example:
</para>
@@ -86,7 +86,7 @@
<para>
Otherwise if the <property>commandButton</property> contained in re-rendered region
the <emphasis><property>"oncomplete"</property></emphasis> attribute has a problem obtaining a reference of the <property>commandButton</property> object
- when using the keyword <property>'this'</property>. In this case you can use the <emphasis><property>"oncomplete"</property></emphasis> attribute as in the following example:
+ when using the keyword <code>'this'</code>. In this case you can use the <emphasis><property>"oncomplete"</property></emphasis> attribute as in the following example:
</para>
<programlisting role="XML"><![CDATA[...
<h:form id="form">
Modified: trunk/docs/userguide/en/src/main/docbook/included/mediaOutput.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/mediaOutput.xml 2008-06-23 12:15:15 UTC (rev 9156)
+++ trunk/docs/userguide/en/src/main/docbook/included/mediaOutput.xml 2008-06-23 12:16:51 UTC (rev 9157)
@@ -97,7 +97,7 @@
Value specifies a bean class keeping data for transmitting into a method that transmits it into a stream.
</para></listitem>
</itemizedlist>
- <note><title>Note:</title><para>A bean class transmitted into value should implement Serializable interface.
+ <note><title>Note:</title><para>A bean class transmitted into value should <code>implement Serializable</code> interface.
</para>
</note>
<para>Hence, when using the component it's possible to output your data of any type on a page with Ajax requests.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2008-06-23 12:15:15 UTC (rev 9156)
+++ trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2008-06-23 12:16:51 UTC (rev 9157)
@@ -128,8 +128,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>Hence,<code><h:outputText /></code> tag outputs the <code>"context-param"</code> string and
- then the <code><h:inputText/></code> outputs the <code>data.name</code> element of this node.
+ <para>Hence,<emphasis role="bold"><property><h:outputText /></property></emphasis> tag outputs the <code>"context-param"</code> string and
+ then the <emphasis role="bold"><property><h:inputText /></property></emphasis> outputs the <code>data.name</code> element of this node.
</para>
<para>Different nodes for rendering could be defined depending on some conditions on the tree
level. Each condition represents some rendering template. To get more information on various
17 years, 6 months
JBoss Rich Faces SVN: r9156 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-06-23 08:15:15 -0400 (Mon, 23 Jun 2008)
New Revision: 9156
Modified:
trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml
trunk/docs/userguide/en/src/main/docbook/included/loadScript.xml
trunk/docs/userguide/en/src/main/docbook/included/loadStyle.xml
trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml
trunk/docs/userguide/en/src/main/docbook/included/page.xml
Log:
RF-3161 - partly done for ajaxListener, commandButton, loadScript, loadStyle, mediaOutput, page
Modified: trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2008-06-23 11:45:51 UTC (rev 9155)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2008-06-23 12:15:15 UTC (rev 9156)
@@ -80,8 +80,8 @@
a good place for update the list of re-rendered components, for example.
Ajax Listener is not invoked for non-Ajax request and when RichFaces works in "Ajax Request generates
Non-Ajax Response" mode. Therefore, ajax Listener invocation is a good indicator that Ajax response is going to be processed.
-Attribute <emphasis><property>"type"</property></emphasis> described in the following <link linkend="ajaxListener"> chapter</link>. It defines the fully qualified Java class name for listener.This class implements <code>org.ajax4jsf.framework.ajax.ajaxListener</code>
- <ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">interface</ulink>. You can access to the source of the event (Ajax component) using event.getSource() call.
+Attribute <emphasis><property>"type"</property></emphasis> described in the following <link linkend="ajaxListener"> chapter</link>. It defines the fully qualified Java class name for listener. This class implements <code>org.ajax4jsf.framework.ajax.ajaxListener</code>
+ <ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">interface</ulink>. You can access to the source of the event (Ajax component) using <code>event.getSource()</code> call.
</para>
<para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml 2008-06-23 11:45:51 UTC (rev 9155)
+++ trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml 2008-06-23 12:15:15 UTC (rev 9156)
@@ -78,7 +78,7 @@
<property><a4j:htmlCommandLink></property>
</emphasis>works as standard <emphasis role="bold">
<property><h:commandLink></property>
- </emphasis>, but here hidden fields required for correct functionality are rendered before the first downloading of a page, though it doesn't happen if its attribute isn't set to <property>"false"</property>.</para>
+ </emphasis>, but here hidden fields required for correct functionality are rendered before the first downloading of a page, though it doesn't happen if its attribute isn't set to "false".</para>
</section>
<section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/loadScript.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/loadScript.xml 2008-06-23 11:45:51 UTC (rev 9155)
+++ trunk/docs/userguide/en/src/main/docbook/included/loadScript.xml 2008-06-23 12:15:15 UTC (rev 9156)
@@ -67,7 +67,7 @@
</para>
<para>
It means that the Context is inserts automatically to the link. And calls
- like <property>resource://</property> is properly handled.
+ like <code>resource://</code> is properly handled.
</para>
<para>
Except this - you may be free to put your script links right from the child
Modified: trunk/docs/userguide/en/src/main/docbook/included/loadStyle.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/loadStyle.xml 2008-06-23 11:45:51 UTC (rev 9155)
+++ trunk/docs/userguide/en/src/main/docbook/included/loadStyle.xml 2008-06-23 12:15:15 UTC (rev 9156)
@@ -62,12 +62,12 @@
<para>
As it was mentioned <link linkend="loadStyle">above</link> this component returns its value as the value of
the <emphasis><property>"src"</property></emphasis> attribute passing it to the
- <code>getResourceUR()</code> method of the ViewHandler for this application, and passing
+ <code>getResourceURL()</code> method of the ViewHandler for this application, and passing
the result via the <code>encodeResourceURL()</code> method of the ExternalContext.
</para>
<para>
It means that the Context is inserted automatically to the link. And calls
- like <property>resource://</property> is properly handled.
+ like <code>resource://</code> is properly handled.
</para>
<para>
Except this - you may be free to put your stylesheet links right from the child
Modified: trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml 2008-06-23 11:45:51 UTC (rev 9155)
+++ trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml 2008-06-23 12:15:15 UTC (rev 9156)
@@ -146,13 +146,13 @@
</para>
<itemizedlist>
<listitem>
- <para>inline (default)</para>
+ <para>"inline" (default)</para>
</listitem>
<listitem>
- <para>block</para>
+ <para>"block"</para>
</listitem>
<listitem>
- <para>none</para>
+ <para>"none"</para>
</listitem>
</itemizedlist>
<para>
@@ -252,9 +252,9 @@
<para>
RichFaces allows setting Ajax responses rendering directly
basing on component tree nodes without referring to the JSP
- (XHTML) page code. It could be defined by selfRendered
+ (XHTML) page code. It could be defined by <emphasis><property>"selfRendered"</property></emphasis>
attribute setting to
- <property>"true"</property>
+ "true"
on
<emphasis role="bold">
Modified: trunk/docs/userguide/en/src/main/docbook/included/page.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/page.xml 2008-06-23 11:45:51 UTC (rev 9155)
+++ trunk/docs/userguide/en/src/main/docbook/included/page.xml 2008-06-23 12:15:15 UTC (rev 9156)
@@ -73,10 +73,10 @@
</emphasis> on a page round the Ajax updatable area. In the last versions of both frameworks the problem is successfully fixed and no <emphasis role="bold"><property><a4j:page></property></emphasis> usage is required.</para>
<para>The component is rendered as a full HTML page template as it is shown in the <link linkend="exampl">example</link>. The
<property>head</property>
- section is defined with the help of the corresponding <emphasis><property>"head"</property></emphasis> facet.
+ section is defined with the help of the corresponding <code>head</code> facet.
- You do not need to use <emphasis><property>"body"</property></emphasis> facet in order to define first <property>body</property> section.
- The second and more <property>body</property> sections is defined with the help of the corresponding <emphasis><property>"body"</property></emphasis> facet.
+ You do not need to use <code>body</code> facet in order to define first <property>body</property> section.
+ The second and more <property>body</property> sections is defined with the help of the corresponding <code>body</code> facet.
</para>
<para>
17 years, 6 months
JBoss Rich Faces SVN: r9155 - trunk/ui/tree/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-06-23 07:45:51 -0400 (Mon, 23 Jun 2008)
New Revision: 9155
Modified:
trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
Log:
Fix tests which failed due to event queuing now processed on nodes, not on tree.
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2008-06-20 22:29:21 UTC (rev 9154)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2008-06-23 11:45:51 UTC (rev 9155)
@@ -37,14 +37,9 @@
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.PhaseId;
-import javax.servlet.http.HttpServletResponse;
-import org.ajax4jsf.resource.InternetResource;
-import org.ajax4jsf.resource.InternetResourceBuilder;
-import org.ajax4jsf.resource.ResourceBuilderImpl;
import org.ajax4jsf.resource.image.ImageInfo;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.ajax4jsf.tests.HtmlTestUtils;
import org.apache.commons.lang.StringUtils;
import org.richfaces.component.state.events.ExpandAllCommandEvent;
import org.richfaces.component.xml.XmlTreeDataBuilder;
@@ -59,7 +54,6 @@
import org.richfaces.model.ListRowKey;
import org.xml.sax.InputSource;
-import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlLink;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
@@ -473,14 +467,14 @@
NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
- DragEvent dragEvent = new DragEvent(tree);
- DropEvent dropEvent = new DropEvent(tree);
+ DragEvent dragEvent = new DragEvent(treeNode);
+ DropEvent dropEvent = new DropEvent(treeNode);
tree.queueEvent(nodeExpandedEvent);
tree.queueEvent(nodeSelectedEvent);
tree.queueEvent(expandAllCommandEvent);
- tree.queueEvent(dragEvent);
- tree.queueEvent(dropEvent);
+ treeNode.queueEvent(dragEvent);
+ treeNode.queueEvent(dropEvent);
assertEquals(PhaseId.INVOKE_APPLICATION, nodeExpandedEvent.getPhaseId());
assertEquals(PhaseId.UPDATE_MODEL_VALUES, nodeSelectedEvent.getPhaseId());
@@ -498,14 +492,14 @@
NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
- DragEvent dragEvent = new DragEvent(tree);
- DropEvent dropEvent = new DropEvent(tree);
+ DragEvent dragEvent = new DragEvent(treeNode);
+ DropEvent dropEvent = new DropEvent(treeNode);
tree.queueEvent(nodeExpandedEvent);
tree.queueEvent(nodeSelectedEvent);
tree.queueEvent(expandAllCommandEvent);
- tree.queueEvent(dragEvent);
- tree.queueEvent(dropEvent);
+ treeNode.queueEvent(dragEvent);
+ treeNode.queueEvent(dropEvent);
assertEquals(PhaseId.APPLY_REQUEST_VALUES, nodeExpandedEvent.getPhaseId());
assertEquals(PhaseId.APPLY_REQUEST_VALUES, nodeSelectedEvent.getPhaseId());
@@ -825,6 +819,102 @@
assertEquals("dropEnd2", treeNode.getOndropend());
}
+
+ /**
+ * Test drag & drop events processing order.
+ * Drag & drop events ALWAYS should go after all other events
+ * moreover drag should go always before it's pair drop event
+ */
+ public final void testDnDListenersOrder() {
+ NodeExpandedListener expandingListener = new NodeExpandedListener() {
+
+ public void processExpansion(NodeExpandedEvent nodeExpandedEvent)
+ throws AbortProcessingException {
+ System.out.println("node expanded");
+ }
+
+ };
+ NodeSelectedListener selectionListener = new NodeSelectedListener() {
+
+ public void processSelection(NodeSelectedEvent nodeSelectedEvent)
+ throws AbortProcessingException {
+ System.out.println("node selected");
+ }
+
+ };
+ DropListener dropListener = new DropListener() {
+
+ public void processDrop(DropEvent event) {
+ System.out.println("node dropped");
+ }
+
+ };
+ DragListener dragListener = new DragListener() {
+
+ public void processDrag(DragEvent event) {
+ System.out.println("node dragged");
+ }
+
+ };
+
+ // ------------- Install listeners -----------------
+ // add expansion listener
+ tree.addChangeExpandListener(expandingListener);
+ treeNode.addChangeExpandListener(expandingListener);
+ assertTrue(tree.getChangeExpandListeners().length == 1);
+ assertTrue(treeNode.getChangeExpandListeners().length == 1);
+
+ // add selection listener
+ tree.addNodeSelectListener(selectionListener);
+ treeNode.addNodeSelectListener(selectionListener);
+ assertTrue(tree.getNodeSelectListeners().length == 1);
+ assertTrue(treeNode.getNodeSelectListeners().length == 1);
+
+ tree.addDropListener(dropListener);
+ treeNode.addDropListener(dropListener);
+ assertTrue(tree.getDropListeners().length == 1);
+ assertTrue(treeNode.getDropListeners().length == 1);
+
+ tree.addDragListener(dragListener);
+ treeNode.addDragListener(dragListener);
+ assertTrue(tree.getDropListeners().length == 1);
+ assertTrue(treeNode.getDropListeners().length == 1);
+
+ // ------------ Invoke listeners --------------------
+ NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
+ NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
+ ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
+ DragEvent dragEvent = new DragEvent(tree);
+ DropEvent dropEvent = new DropEvent(tree);
+
+ tree.queueEvent(nodeExpandedEvent);
+ tree.queueEvent(dropEvent);
+ tree.queueEvent(nodeSelectedEvent);
+ tree.queueEvent(dragEvent);
+ tree.queueEvent(expandAllCommandEvent);
+
+ facesContext.getViewRoot().processApplication(facesContext);
+
+ /*
+ assertEquals(PhaseId.INVOKE_APPLICATION, nodeExpandedEvent.getPhaseId());
+ assertEquals(PhaseId.UPDATE_MODEL_VALUES, nodeSelectedEvent.getPhaseId());
+ assertEquals(PhaseId.INVOKE_APPLICATION, expandAllCommandEvent.getPhaseId());
+ assertEquals(PhaseId.INVOKE_APPLICATION, dragEvent.getPhaseId());
+ assertEquals(PhaseId.INVOKE_APPLICATION, dropEvent.getPhaseId());
+ */
+
+ // ------------ Cleanup --------------------
+ // cleanup listeners
+ tree.removeChangeExpandListener(expandingListener);
+ treeNode.removeChangeExpandListener(expandingListener);
+ tree.removeNodeSelectListener(selectionListener);
+ treeNode.removeNodeSelectListener(selectionListener);
+ tree.removeDropListener(dropListener);
+ treeNode.removeDropListener(dropListener);
+ tree.removeDragListener(dragListener);
+ treeNode.removeDragListener(dragListener);
+ }
+
}
17 years, 6 months
JBoss Rich Faces SVN: r9154 - trunk/ui/calendar/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-20 18:29:21 -0400 (Fri, 20 Jun 2008)
New Revision: 9154
Modified:
trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java
Log:
CalendarComponentTest.java updated
Modified: trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java
===================================================================
--- trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java 2008-06-20 19:32:21 UTC (rev 9153)
+++ trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java 2008-06-20 22:29:21 UTC (rev 9154)
@@ -80,7 +80,8 @@
// XXX test CurrentDate = null
calendar.setPopup(true);
Calendar calendarObject = Calendar.getInstance();
- calendarObject.set(2001, Calendar.SEPTEMBER, 11);
+ calendarObject.clear();
+ calendarObject.set(2001, Calendar.SEPTEMBER, 11, 10, 0, 0);
calendar.setId("calendar");
calendar.setSubmittedValue(calendarObject.getTime());
form.getChildren().add(calendar);
@@ -116,9 +117,11 @@
.createComponent(UICalendar.COMPONENT_TYPE);
calendar.setLocale(Locale.FRENCH);
Calendar calendarObject = Calendar.getInstance();
+ calendarObject.clear();
calendarObject.set(2007, Calendar.JUNE, 10);
Calendar preloadRangeBegin = Calendar.getInstance();
+ preloadRangeBegin.clear();
preloadRangeBegin.setTime(calendar
.getDefaultPreloadBegin(calendarObject.getTime()));
assertEquals(2007, preloadRangeBegin.get(Calendar.YEAR));
@@ -126,6 +129,7 @@
assertEquals(1, preloadRangeBegin.get(Calendar.DATE));
Calendar preloadRangeEnd = Calendar.getInstance();
+ preloadRangeEnd.clear();
preloadRangeEnd.setTime(calendar.getDefaultPreloadEnd(calendarObject
.getTime()));
assertEquals(2007, preloadRangeEnd.get(Calendar.YEAR));
@@ -160,6 +164,7 @@
.createComponent(UICalendar.COMPONENT_TYPE);
calendar.setLocale(Locale.FRENCH);
Calendar calendarObject = Calendar.getInstance();
+ calendarObject.clear();
calendarObject.set(2007, Calendar.JUNE, 10);
calendar.setCurrentDate(calendarObject.getTime());
@@ -224,6 +229,7 @@
public void testCalendarDecode() throws Exception {
Calendar calendarObject = Calendar.getInstance();
+ calendarObject.clear();
calendarObject.set(2001, Calendar.SEPTEMBER, 11);
calendar.decode(facesContext);
//assertEquals(calendarObject.getTime(), calendar.getSubmittedValue());
@@ -284,6 +290,7 @@
public void testCalendarTime() throws Exception{
Calendar calendarObject = Calendar.getInstance();
+ calendarObject.clear();
calendarObject.set(2001, Calendar.SEPTEMBER, 11, 13, 36);
assertEquals(calendarObject.getTime().toString(), calendar2.getSubmittedValue().toString());
17 years, 6 months
JBoss Rich Faces SVN: r9153 - in trunk/sandbox/ui/hotKey: src/main/config/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-20 15:32:21 -0400 (Fri, 20 Jun 2008)
New Revision: 9153
Added:
trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentScriptsTest.java
trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentTest.java
Removed:
trunk/sandbox/ui/hotKey/src/main/java/META-INF/
trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/JSFComponentTest.java
Modified:
trunk/sandbox/ui/hotKey/pom.xml
trunk/sandbox/ui/hotKey/src/main/config/component/hotKey.xml
trunk/sandbox/ui/hotKey/src/main/templates/org/richfaces/htmlHotKey.jspx
Log:
rich:hotKey unit tests committed
Modified: trunk/sandbox/ui/hotKey/pom.xml
===================================================================
--- trunk/sandbox/ui/hotKey/pom.xml 2008-06-20 19:31:34 UTC (rev 9152)
+++ trunk/sandbox/ui/hotKey/pom.xml 2008-06-20 19:32:21 UTC (rev 9153)
@@ -22,6 +22,13 @@
<goal>generate</goal>
</goals>
</execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>generate-tests</goal>
+ </goals>
+ </execution>
</executions>
<configuration>
<library>
Modified: trunk/sandbox/ui/hotKey/src/main/config/component/hotKey.xml
===================================================================
--- trunk/sandbox/ui/hotKey/src/main/config/component/hotKey.xml 2008-06-20 19:31:34 UTC (rev 9152)
+++ trunk/sandbox/ui/hotKey/src/main/config/component/hotKey.xml 2008-06-20 19:32:21 UTC (rev 9153)
@@ -7,6 +7,9 @@
<family>org.richfaces.HotKey</family>
<classname>org.richfaces.component.html.HtmlHotKey</classname>
<superclass>org.richfaces.component.UIHotKey</superclass>
+
+ <test />
+
<description>
<![CDATA[
]]>
@@ -21,6 +24,7 @@
<superclass>
org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
+ <test />
</tag>
<!--
<taghandler>
Modified: trunk/sandbox/ui/hotKey/src/main/templates/org/richfaces/htmlHotKey.jspx
===================================================================
--- trunk/sandbox/ui/hotKey/src/main/templates/org/richfaces/htmlHotKey.jspx 2008-06-20 19:31:34 UTC (rev 9152)
+++ trunk/sandbox/ui/hotKey/src/main/templates/org/richfaces/htmlHotKey.jspx 2008-06-20 19:32:21 UTC (rev 9153)
@@ -82,12 +82,10 @@
]]>
</jsp:scriptlet>
- <span id="#{clientId}" style="display:none"
- x:passThruWithExclusions="id"
- >
+ <span id="#{clientId}" style="display:none">
<script>
- new Richfaces.hotKey("#{clientId}","#{key}","#{selector}", #{options}, function(event) { #{attributes['handler']} });
+ new Richfaces.hotKey('#{clientId}','#{key}','#{selector}', #{options}, function(event) { #{attributes['handler']} });
</script>
</span>
</f:root>
\ No newline at end of file
Added: trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentScriptsTest.java
===================================================================
--- trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentScriptsTest.java (rev 0)
+++ trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentScriptsTest.java 2008-06-20 19:32:21 UTC (rev 9153)
@@ -0,0 +1,57 @@
+/**
+ *
+ */
+package org.richfaces.component;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+/**
+ * @author Nick Belaevski
+ * mailto:nbelaevski@exadel.com
+ * created 20.06.2008
+ *
+ */
+public class HotKeyComponentScriptsTest extends AbstractAjax4JsfTestCase {
+
+ public HotKeyComponentScriptsTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ facesContext.getViewRoot().getChildren().add(
+ application.createComponent(UIHotKey.COMPONENT_TYPE));
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ private static final String[] SCRIPTS = new String[] {
+ "org/richfaces/renderkit/html/scripts/jquery/jquery.js",
+ "org/richfaces/renderkit/html/scripts/jquery.hotkeys.js",
+ "org/richfaces/renderkit/html/scripts/hotKey.js"
+ };
+
+ public void testRegisteredScripts() throws Exception {
+ setupWebClient();
+ for (String scriptName : SCRIPTS) {
+ getResourceIfPresent(scriptName);
+ }
+ }
+
+
+ public void testScripts() throws Exception {
+ Set<String> scripts = new LinkedHashSet<String>();
+ for (String scriptName : SCRIPTS) {
+ scripts.add(scriptName);
+ }
+
+ assertEquals(scripts.size(), getCountValidScripts(renderView(), scripts, false).intValue());
+ }
+}
Added: trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentTest.java
===================================================================
--- trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentTest.java (rev 0)
+++ trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentTest.java 2008-06-20 19:32:21 UTC (rev 9153)
@@ -0,0 +1,203 @@
+/**
+ *
+ */
+package org.richfaces.component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIOutput;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.apache.commons.lang.StringEscapeUtils;
+
+import com.gargoylesoftware.htmlunit.html.DomText;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.xpath.HtmlUnitXPath;
+
+/**
+ * @author Nick Belaevski
+ * mailto:nbelaevski@exadel.com
+ * created 20.06.2008
+ *
+ */
+public class HotKeyComponentTest extends AbstractAjax4JsfTestCase {
+
+ public HotKeyComponentTest(String name) {
+ super(name);
+ }
+
+ private UIHotKey hotKey;
+
+ private HtmlUnitXPath hotKeyPath;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ UIComponent form = application.createComponent(UIForm.COMPONENT_TYPE);
+ form.setId("myForm");
+ facesContext.getViewRoot().getChildren().add(form);
+
+ this.hotKey = (UIHotKey) application.createComponent(UIHotKey.COMPONENT_TYPE);
+ this.hotKey.setId("hKey");
+ form.getChildren().add(this.hotKey);
+
+ this.hotKeyPath = new HtmlUnitXPath("//*[@id = 'myForm:hKey']");
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ this.hotKey = null;
+ this.hotKeyPath = null;
+ }
+
+ private boolean isEmpty(String s) {
+ return s == null || s.length() == 0;
+ }
+
+ private String getScriptBody(HtmlPage view) throws Exception {
+ StringBuilder builder = new StringBuilder();
+
+ HtmlElement rootElement = (HtmlElement) this.hotKeyPath.selectSingleNode(view);
+ List<DomText> scriptNodes = rootElement.getByXPath("//script/text()");
+ for (DomText text : scriptNodes) {
+ builder.append(text.getData());
+ }
+
+ return StringEscapeUtils.unescapeXml(builder.toString()).trim();
+ }
+
+ public void testElements() throws Exception {
+ this.hotKey.getChildren().add(application.createComponent(UIOutput.COMPONENT_TYPE));
+ HtmlPage view = renderView();
+ HtmlElement rootElement = (HtmlElement) this.hotKeyPath.selectSingleNode(view);
+ assertEquals("span", rootElement.getTagName());
+ assertEquals(this.hotKey.getClientId(facesContext), rootElement.getAttribute("id"));
+ assertEquals("display:none",
+ rootElement.getAttribute("style").replaceAll("\\s", ""));
+
+ List scriptNodes = rootElement.getByXPath("//script");
+ assertFalse(scriptNodes.isEmpty());
+ }
+
+ public void testHasScript() throws Exception {
+ assertFalse(isEmpty(getScriptBody(renderView())));
+ }
+
+ private static final Pattern START_CODE = Pattern.compile("^\\s*new\\s*Richfaces\\.hotKey\\s*\\(\\s*");
+ private static final Pattern END_CODE = Pattern.compile("\\s*\\)\\s*;");
+
+ private String processScriptBody() throws Exception {
+ String scriptBody = getScriptBody(renderView());
+
+ assertTrue(START_CODE.matcher(scriptBody).find());
+ assertTrue(END_CODE.matcher(scriptBody).find());
+
+ return END_CODE.matcher(START_CODE.matcher(scriptBody).replaceAll("")).replaceAll("").
+ replaceAll("\\s+", "");
+ }
+
+ public void testDefault() throws Exception {
+ String scriptBody = processScriptBody();
+ assertEquals("'myForm:hKey','','',{timing:'immediate'},function(event){}", scriptBody);
+ }
+
+ public void testKey1() throws Exception {
+ this.hotKey.getAttributes().put("key", "alt+l");
+
+ String scriptBody = processScriptBody();
+ assertEquals("'myForm:hKey','alt+l','',{timing:'immediate'},function(event){}", scriptBody);
+ }
+
+ public void testKey2() throws Exception {
+ this.hotKey.getAttributes().put("key", "\"");
+
+ String scriptBody = processScriptBody();
+ assertEquals("'myForm:hKey','\\\"','',{timing:'immediate'},function(event){}", scriptBody);
+ }
+
+ public void testKey3() throws Exception {
+ this.hotKey.getAttributes().put("key", "'");
+
+ String scriptBody = processScriptBody();
+ assertEquals("'myForm:hKey','\\'','',{timing:'immediate'},function(event){}", scriptBody);
+ }
+
+ public void testFindComponent() throws Exception {
+ this.hotKey.getAttributes().put("selector", "#i1,#i2,#i3,*[type='button']");
+
+ UIComponent input = application.createComponent(UIInput.COMPONENT_TYPE);
+ input.setId("i1");
+
+ facesContext.getViewRoot().getChildren().add(input);
+
+ input = application.createComponent(UIInput.COMPONENT_TYPE);
+ input.setId("i2");
+
+ this.hotKey.getParent().getChildren().add(input);
+
+ String scriptBody = processScriptBody();
+ assertEquals("'myForm:hKey','','#i1,#myForm\\\\:i2,#i3,*[type=\\'button\\'\\x5D',{timing:'immediate'},function(event){}", scriptBody);
+ }
+
+ public void testOptions1() throws Exception {
+ Map<String, Object> attributes = this.hotKey.getAttributes();
+ attributes.put("timing", "onregistercall");
+ attributes.put("type", "keypress");
+ attributes.put("propagate", Boolean.TRUE);
+ attributes.put("disableInInput", Boolean.FALSE);
+ attributes.put("checkParent", Boolean.TRUE);
+
+ String scriptBody = processScriptBody();
+ assertEquals("'myForm:hKey','','',{timing:'onregistercall',type:'keypress',propagate:true,disableInInput:false,checkParent:true},function(event){}", scriptBody);
+ }
+
+ public void testOptions2() throws Exception {
+ Map<String, Object> attributes = this.hotKey.getAttributes();
+ attributes.put("timing", "onload");
+ attributes.put("type", "keyup");
+ attributes.put("propagate", Boolean.FALSE);
+ attributes.put("disableInInput", Boolean.TRUE);
+ attributes.put("checkParent", Boolean.FALSE);
+
+ String scriptBody = processScriptBody();
+ assertEquals("'myForm:hKey','','',{timing:'onload',type:'keyup',propagate:false,disableInInput:true,checkParent:false},function(event){}", scriptBody);
+ }
+
+ public void testHandler() throws Exception {
+ this.hotKey.getAttributes().put("handler", "alert('it\\'s_clicked!')");
+
+ String scriptBody = processScriptBody();
+ assertEquals("'myForm:hKey','','',{timing:'immediate'},function(event){alert('it\\'s_clicked!')}", scriptBody);
+ }
+
+ public void testTimingOptions() throws Exception {
+ Map<String, Object> attributes = this.hotKey.getAttributes();
+
+ attributes.put("timing", "onload");
+ renderView();
+
+ attributes.put("timing", "immediate");
+ renderView();
+
+ attributes.put("timing", "onregistercall");
+ renderView();
+
+ try {
+ attributes.put("timing", "onxaction");
+ renderView();
+
+ fail();
+ } catch (IllegalArgumentException e) {
+ }
+ }
+
+}
Deleted: trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/JSFComponentTest.java
===================================================================
--- trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/JSFComponentTest.java 2008-06-20 19:31:34 UTC (rev 9152)
+++ trunk/sandbox/ui/hotKey/src/test/java/org/richfaces/component/JSFComponentTest.java 2008-06-20 19:32:21 UTC (rev 9153)
@@ -1,53 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.component;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import javax.faces.component.UIComponent;
-
-/**
- * Unit test for simple Component.
- */
-public class JSFComponentTest
- extends TestCase
-{
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public JSFComponentTest( String testName )
- {
- super( testName );
- }
-
-
- /**
- * Rigourous Test :-)
- */
- public void testComponent()
- {
- assertTrue( true );
- }
-}
17 years, 6 months
JBoss Rich Faces SVN: r9152 - trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-20 15:31:34 -0400 (Fri, 20 Jun 2008)
New Revision: 9152
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
Log:
RendererUtils.escapeJavaScript() method updated
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2008-06-20 19:31:02 UTC (rev 9151)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2008-06-20 19:31:34 UTC (rev 9152)
@@ -949,16 +949,34 @@
public String escapeJavaScript(Object o) {
if (o != null) {
+ StringBuilder result = new StringBuilder();
JSEncoder encoder = new JSEncoder();
- StringBuilder result = new StringBuilder();
- String string = o.toString();
- int length = string.length();
+
+ char chars[] = o.toString().toCharArray();
+ int start = 0;
+ int end = chars.length;
+ for (int x = start; x < end; x++) {
+ char c = chars[x];
+
+ if (encoder.compile(c)) {
+ continue;
+ }
+
+ if (start != x) {
+ result.append(chars, start, x - start );
+ }
+
+ result.append(encoder.encode(c));
+ start = x + 1;
+
+ continue;
+ }
- for (int i = 0; i < length; i++) {
- result.append(encoder.encode(string.charAt(i)));
- }
-
- return result.toString();
+ if (start != end) {
+ result.append(chars, start, end - start);
+ }
+
+ return result.toString();
} else {
return null;
}
17 years, 6 months
JBoss Rich Faces SVN: r9151 - trunk/framework/test/src/main/java/org/ajax4jsf/tests.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-20 15:31:02 -0400 (Fri, 20 Jun 2008)
New Revision: 9151
Modified:
trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
Log:
Resources creation has been removed from abstract test class
Modified: trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
===================================================================
--- trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java 2008-06-20 17:42:58 UTC (rev 9150)
+++ trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java 2008-06-20 19:31:02 UTC (rev 9151)
@@ -30,7 +30,6 @@
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.net.URL;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Iterator;
@@ -55,14 +54,12 @@
import org.ajax4jsf.context.AjaxContextImpl;
import org.ajax4jsf.renderkit.AjaxViewRootRenderer;
import org.ajax4jsf.renderkit.ChameleonRenderKitImpl;
-import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.resource.InternetResourceBuilder;
import org.ajax4jsf.resource.ResourceBuilderImpl;
import org.ajax4jsf.resource.image.ImageInfo;
import org.ajax4jsf.tests.org.apache.shale.test.config.ConfigParser;
import org.ajax4jsf.webapp.WebXml;
-import org.apache.commons.lang.StringUtils;
import org.apache.shale.test.base.AbstractJsfTestCase;
import org.apache.shale.test.mock.MockApplication;
import org.apache.shale.test.mock.MockPrintWriter;
@@ -80,7 +77,6 @@
import com.gargoylesoftware.htmlunit.WebResponseData;
import com.gargoylesoftware.htmlunit.WebResponseImpl;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlScript;
/**
* Base class for testing components and renderers in a4j framework
@@ -257,7 +253,6 @@
*/
protected InputStream getResourceIfPresent(String path) throws IOException {
InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
- builder.createResource(null, path);
InternetResource resource = builder.getResource(path);
if (resource != null) {
String uri = HTTP_PREFIX + resource.getUri(facesContext, null);
17 years, 6 months