You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dm...@apache.org on 2002/12/31 05:17:27 UTC
cvs commit: jakarta-struts/contrib/struts-el/web/exercise-taglib html-link.jsp
dmkarr 2002/12/30 20:17:27
Modified: contrib/struts-el/doc/userGuide struts-html-el.xml
contrib/struts-el/src/share/org/apache/strutsel/taglib/html
ELLinkTag.java ELLinkTagBeanInfo.java
contrib/struts-el/web/exercise-taglib html-link.jsp
Log:
Changes to add "action" attribute to "html-el:link" tag, after similar changes
to base tag library.
Revision Changes Path
1.13 +52 -27 jakarta-struts/contrib/struts-el/doc/userGuide/struts-html-el.xml
Index: struts-html-el.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/struts-el/doc/userGuide/struts-html-el.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- struts-html-el.xml 13 Dec 2002 03:52:20 -0000 1.12
+++ struts-html-el.xml 31 Dec 2002 04:17:26 -0000 1.13
@@ -3039,6 +3039,10 @@
name of a global <code>ActionForward</code> to be looked
up, and use the application-relative or context-relative
URI found there.</li>
+ <li><em>action</em> - Use the value of this attribute as the
+ name of a <code>Action</code> to be looked
+ up, and use the application-relative or context-relative
+ URI found there.</li>
<li><em>href</em> - Use the value of this attribute unchanged.
</li>
<li><em>page</em> - Use the value of this attribute as a
@@ -3120,6 +3124,23 @@
</info>
</attribute>
+ <attribute>
+ <name>action</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <info>
+ <p>Logical name of a <code>Action</code> that
+ contains the actual content-relative URI of the destination
+ of this transfer. This hyperlink may be dynamically
+ modified by the inclusion of query parameters, as described
+ in the tag description. You <strong>must</strong> specify
+ exactly one of the <code>action</code> attribute, the
+ <code>forward</code> attribute, the
+ <code>href</code> attribute, the <code>linkName</code>
+ attribute, or the <code>page</code> attribute.</p>
+ </info>
+ </attribute>
+
<attribute>
<name>anchor</name>
<required>false</required>
@@ -3138,12 +3159,13 @@
<info>
<p>Logical name of a global <code>ActionForward</code> that
contains the actual content-relative URI of the destination
- of this transfer. This hyperlink may be dynamically
- modified by the inclusion of query parameters, as described
- in the tag description. You <strong>must</strong> specify
- exactly one of the <code>forward</code> attribute, the
- <code>href</code> attribute, the <code>linkName</code>
- attribute, or the <code>page</code> attribute.</p>
+ of this transfer. This hyperlink may be dynamically modified
+ by the inclusion of query parameters, as described in the tag
+ description. You <strong>must</strong> specify exactly one
+ of the <code>action</code> attribute, the
+ <code>forward</code> attribute, the <code>href</code>
+ attribute, the <code>linkName</code> attribute, or the
+ <code>page</code> attribute.</p>
</info>
</attribute>
@@ -3152,13 +3174,14 @@
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<info>
- <p>The URL to which this hyperlink will transfer control
- if activated. This hyperlink may be dynamically modified
- by the inclusion of query parameters, as described in the
- tag description. You <strong>must</strong> specify
- exactly one of the <code>forward</code> attribute, the
- <code>href</code> attribute, the <code>linkName</code>
- attribute, or the <code>page</code> attribute.</p>
+ <p>The URL to which this hyperlink will transfer control if
+ activated. This hyperlink may be dynamically modified by the
+ inclusion of query parameters, as described in the tag
+ description. You <strong>must</strong> specify exactly one
+ of the <code>action</code> attribute, the
+ <code>forward</code> attribute, the <code>href</code>
+ attribute, the <code>linkName</code> attribute, or the
+ <code>page</code> attribute.</p>
</info>
</attribute>
@@ -3167,11 +3190,11 @@
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<info>
- Valid only inside of logic:iterate tag.
- If yes then indexed parameter with name from indexId attribute
- will be added to the query string. Indexed parameter looks like
- "index[32]". Number in brackets will be generated
- for every iteration and taken from ancestor logic:iterate tag.
+ Valid only inside of logic:iterate tag. If <code>true</code>
+ then indexed parameter with name from indexId attribute will be
+ added to the query string. Indexed parameter looks like
+ "index[32]". Number in brackets will be generated for every
+ iteration and taken from ancestor logic:iterate tag.
</info>
</attribute>
@@ -3335,14 +3358,15 @@
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<info>
- <p>The applicaiton-relative path (beginning with a "/"
- character) to which this hyperlink will transfer control
- if activated. This hyperlink may be dynamically modified
- by the inclusion of query parameters, as described in the
- tag description. You <strong>must</strong> specify exactly
- one of the <code>forward</code> attribute, the
- <code>href</code> attribute, the <code>linkName</code>
- attribute, or the <code>page</code> attribute.</p>
+ <p>The application-relative path (beginning with a "/"
+ character) to which this hyperlink will transfer control if
+ activated. This hyperlink may be dynamically modified by the
+ inclusion of query parameters, as described in the tag
+ description. You <strong>must</strong> specify exactly one
+ of the <code>action</code> attribute, the
+ <code>forward</code> attribute, the <code>href</code>
+ attribute, the <code>linkName</code> attribute, or the
+ <code>page</code> attribute.</p>
</info>
</attribute>
@@ -3437,7 +3461,8 @@
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<info>
- <p>CSS stylesheet class to be applied to this element.</p>
+ <p>CSS stylesheet class to be applied to this element
+ (renders a "class" attribute).</p>
</info>
</attribute>
1.6 +11 -4 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELLinkTag.java
Index: ELLinkTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELLinkTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ELLinkTag.java 14 Oct 2002 03:18:38 -0000 1.5
+++ ELLinkTag.java 31 Dec 2002 04:17:26 -0000 1.6
@@ -172,6 +172,13 @@
}
try {
+ setAction((String) evalAttr("action", getAction(),
+ String.class));
+ } catch (NullAttributeException ex) {
+ setAction(null);
+ }
+
+ try {
setAnchor((String) evalAttr("anchor", getAnchor(), String.class));
} catch (NullAttributeException ex) {
setAnchor(null);
1.2 +40 -38 jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELLinkTagBeanInfo.java
Index: ELLinkTagBeanInfo.java
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELLinkTagBeanInfo.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ELLinkTagBeanInfo.java 14 Oct 2002 03:11:08 -0000 1.1
+++ ELLinkTagBeanInfo.java 31 Dec 2002 04:17:26 -0000 1.2
@@ -84,89 +84,91 @@
{
public PropertyDescriptor[] getPropertyDescriptors()
{
- PropertyDescriptor[] result = new PropertyDescriptor[35];
+ PropertyDescriptor[] result = new PropertyDescriptor[36];
try {
result[0] = new PropertyDescriptor("accesskey", ELLinkTag.class,
null, "setAccesskey");
- result[1] = new PropertyDescriptor("anchor", ELLinkTag.class,
+ result[1] = new PropertyDescriptor("action", ELLinkTag.class,
+ null, "setAction");
+ result[2] = new PropertyDescriptor("anchor", ELLinkTag.class,
null, "setAnchor");
- result[2] = new PropertyDescriptor("forward", ELLinkTag.class,
+ result[3] = new PropertyDescriptor("forward", ELLinkTag.class,
null, "setForward");
- result[3] = new PropertyDescriptor("href", ELLinkTag.class,
+ result[4] = new PropertyDescriptor("href", ELLinkTag.class,
null, "setHref");
// This attribute has a non-standard mapping.
- result[4] = new PropertyDescriptor("indexed", ELLinkTag.class,
+ result[5] = new PropertyDescriptor("indexed", ELLinkTag.class,
null, "setIndexedExpr");
- result[5] = new PropertyDescriptor("indexId", ELLinkTag.class,
+ result[6] = new PropertyDescriptor("indexId", ELLinkTag.class,
null, "setIndexId");
- result[6] = new PropertyDescriptor("linkName", ELLinkTag.class,
+ result[7] = new PropertyDescriptor("linkName", ELLinkTag.class,
null, "setLinkName");
- result[7] = new PropertyDescriptor("name", ELLinkTag.class,
+ result[8] = new PropertyDescriptor("name", ELLinkTag.class,
null, "setName");
- result[8] = new PropertyDescriptor("onblur", ELLinkTag.class,
+ result[9] = new PropertyDescriptor("onblur", ELLinkTag.class,
null, "setOnblur");
- result[9] = new PropertyDescriptor("onclick", ELLinkTag.class,
+ result[10] = new PropertyDescriptor("onclick", ELLinkTag.class,
null, "setOnclick");
- result[10] = new PropertyDescriptor("ondblclick",
+ result[11] = new PropertyDescriptor("ondblclick",
ELLinkTag.class,
null, "setOndblclick");
- result[11] = new PropertyDescriptor("onfocus", ELLinkTag.class,
+ result[12] = new PropertyDescriptor("onfocus", ELLinkTag.class,
null, "setOnfocus");
- result[12] = new PropertyDescriptor("onkeydown",
+ result[13] = new PropertyDescriptor("onkeydown",
ELLinkTag.class,
null, "setOnkeydown");
- result[13] = new PropertyDescriptor("onkeypress",
+ result[14] = new PropertyDescriptor("onkeypress",
ELLinkTag.class,
null, "setOnkeypress");
- result[14] = new PropertyDescriptor("onkeyup", ELLinkTag.class,
+ result[15] = new PropertyDescriptor("onkeyup", ELLinkTag.class,
null, "setOnkeyup");
- result[15] = new PropertyDescriptor("onmousedown",
+ result[16] = new PropertyDescriptor("onmousedown",
ELLinkTag.class,
null, "setOnmousedown");
- result[16] = new PropertyDescriptor("onmousemove",
+ result[17] = new PropertyDescriptor("onmousemove",
ELLinkTag.class,
null, "setOnmousemove");
- result[17] = new PropertyDescriptor("onmouseout",
+ result[18] = new PropertyDescriptor("onmouseout",
ELLinkTag.class,
null, "setOnmouseout");
- result[18] = new PropertyDescriptor("onmouseover",
+ result[19] = new PropertyDescriptor("onmouseover",
ELLinkTag.class,
null, "setOnmouseover");
- result[19] = new PropertyDescriptor("onmouseup",
+ result[20] = new PropertyDescriptor("onmouseup",
ELLinkTag.class,
null, "setOnmouseup");
- result[20] = new PropertyDescriptor("page", ELLinkTag.class,
+ result[21] = new PropertyDescriptor("page", ELLinkTag.class,
null, "setPage");
- result[21] = new PropertyDescriptor("paramId", ELLinkTag.class,
+ result[22] = new PropertyDescriptor("paramId", ELLinkTag.class,
null, "setParamId");
- result[22] = new PropertyDescriptor("paramName", ELLinkTag.class,
+ result[23] = new PropertyDescriptor("paramName", ELLinkTag.class,
null, "setParamName");
- result[23] = new PropertyDescriptor("paramProperty",
+ result[24] = new PropertyDescriptor("paramProperty",
ELLinkTag.class,
null, "setParamProperty");
- result[24] = new PropertyDescriptor("paramScope", ELLinkTag.class,
+ result[25] = new PropertyDescriptor("paramScope", ELLinkTag.class,
null, "setParamScope");
- result[25] = new PropertyDescriptor("property", ELLinkTag.class,
+ result[26] = new PropertyDescriptor("property", ELLinkTag.class,
null, "setProperty");
- result[26] = new PropertyDescriptor("scope", ELLinkTag.class,
+ result[27] = new PropertyDescriptor("scope", ELLinkTag.class,
null, "setScope");
- result[27] = new PropertyDescriptor("style", ELLinkTag.class,
+ result[28] = new PropertyDescriptor("style", ELLinkTag.class,
null, "setStyle");
- result[28] = new PropertyDescriptor("styleClass",
+ result[29] = new PropertyDescriptor("styleClass",
ELLinkTag.class,
null, "setStyleClass");
- result[29] = new PropertyDescriptor("styleId", ELLinkTag.class,
+ result[30] = new PropertyDescriptor("styleId", ELLinkTag.class,
null, "setStyleId");
- result[30] = new PropertyDescriptor("tabindex", ELLinkTag.class,
+ result[31] = new PropertyDescriptor("tabindex", ELLinkTag.class,
null, "setTabindex");
- result[31] = new PropertyDescriptor("target", ELLinkTag.class,
+ result[32] = new PropertyDescriptor("target", ELLinkTag.class,
null, "setTarget");
- result[32] = new PropertyDescriptor("title", ELLinkTag.class,
+ result[33] = new PropertyDescriptor("title", ELLinkTag.class,
null, "setTitle");
- result[33] = new PropertyDescriptor("titleKey", ELLinkTag.class,
+ result[34] = new PropertyDescriptor("titleKey", ELLinkTag.class,
null, "setTitleKey");
- result[34] = new PropertyDescriptor("transaction", ELLinkTag.class,
+ result[35] = new PropertyDescriptor("transaction", ELLinkTag.class,
null, "setTransactionExpr");
}
catch (IntrospectionException ex) {
1.4 +63 -0 jakarta-struts/contrib/struts-el/web/exercise-taglib/html-link.jsp
Index: html-link.jsp
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/struts-el/web/exercise-taglib/html-link.jsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- html-link.jsp 14 Oct 2002 03:22:59 -0000 1.3
+++ html-link.jsp 31 Dec 2002 04:17:26 -0000 1.4
@@ -162,6 +162,69 @@
</tr>
<tr>
+ <td colspan="4" align="center">
+ <html-el:link action="html-link" accesskey="1" tabindex="5"
+ title="No modifications at all" styleId="def">
+ No modifications at all
+ </html-el:link>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4" align="center">
+ <html-el:link action="html-link?doubleProperty=321.321&longProperty=321321"
+ accesskey="2" tabindex="4"
+ title="Double and long via hard coded changes">
+ Double and long via hard coded changes
+ </html-el:link>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4" align="center">
+ <html-el:link action="html-link" accesskey="3" tabindex="3"
+ paramId="stringProperty" paramName="newValue"
+ title="String via paramId and paramName">
+ String via paramId and paramName
+ </html-el:link>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4" align="center">
+ <html-el:link action="html-link" accesskey="4" tabindex="2"
+ paramId="booleanProperty"
+ paramName="testbean" paramProperty="nested.booleanProperty"
+ title="Boolean via paramId, paramName, and paramValue">
+ Boolean via paramId, paramName, and paramValue
+ </html-el:link>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="4" align="center">
+ <html-el:link action="html-link" accesskey="5" tabindex="1"
+ name="newValues"
+ title="Float, int, and stringArray via name (Map)"
+ onblur="showevent(event)"
+ onclick="showevent(event)"
+ ondblclick="showevent(event)"
+ onfocus="showevent(event)"
+ onkeydown="showevent(event)"
+ onkeypress="showevent(event)"
+ onkeyup="showevent(event)"
+ onmousedown="showevent(event)"
+ onmousemove="showevent(event)"
+ onmouseout="showevent(event)"
+ onmouseover="showevent(event)"
+ onmouseup="showevent(event)"
+ >
+ Float, int, and stringArray via name (Map)
+ </html-el:link>
+ </td>
+ </tr>
+
+ <tr>
<th colspan="4" align="center">Reset and Cancel Buttons</th>
</tr>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>