You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2006/01/28 00:35:16 UTC
svn commit: r373031 -
/struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/XhtmlHelper.java
Author: craigmcc
Date: Fri Jan 27 15:35:14 2006
New Revision: 373031
URL: http://svn.apache.org/viewcvs?rev=373031&view=rev
Log:
Promote the mapResourceId() method from protected to public scope, since it
is generally useful. No functional change -- the big diff is because the
method was moved in the source file.
Modified:
struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/XhtmlHelper.java
Modified: struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/XhtmlHelper.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/XhtmlHelper.java?rev=373031&r1=373030&r2=373031&view=diff
==============================================================================
--- struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/XhtmlHelper.java (original)
+++ struts/shale/trunk/core-library/src/java/org/apache/shale/remoting/XhtmlHelper.java Fri Jan 27 15:35:14 2006
@@ -157,39 +157,8 @@
link(context, resourceId);
}
- // ------------------------------------------------------- Protected Methods
- /**
- * <p>Mark the specified resource identifier as having already been
- * linked in the current request.</p>
- *
- * @param context <code>FacesContext</code> for the current request
- * @param resourceId Resource identifier to mark as having been linked
- */
- protected void link(FacesContext context, String resourceId) {
-
- context.getExternalContext().getRequestMap().
- put(PREFIX + resourceId, Boolean.TRUE);
-
- }
-
-
- /**
- * <p>Return <code>true</code> if the specified resource identifier has
- * already been linked in the current request, and should therefore not
- * be linked again.</p>
- *
- * @param context <code>FacesContext</code> for the current request
- * @param resourceId Resource identifier to check for prior linking
- */
- protected boolean linked(FacesContext context, String resourceId) {
-
- return context.getExternalContext().getRequestMap().
- containsKey(PREFIX + resourceId);
-
- }
-
/**
* <p>Map the specified resource identifier to a request URL, taking into
@@ -205,8 +174,8 @@
* @exception IllegalStateException if a configuration error prevents
* the mapping of this resource identifier to a corresponding URI
*/
- protected String mapResourceId(FacesContext context, Mechanism mechanism,
- String resourceId) {
+ public String mapResourceId(FacesContext context, Mechanism mechanism,
+ String resourceId) {
// Validate our incoming parameters
if (resourceId == null) {
@@ -255,6 +224,40 @@
// Ask this Mapping to map the resource identifier appropriately
return mapping.mapResourceId(context, resourceId);
+
+ }
+
+
+ // ------------------------------------------------------- Protected Methods
+
+
+ /**
+ * <p>Mark the specified resource identifier as having already been
+ * linked in the current request.</p>
+ *
+ * @param context <code>FacesContext</code> for the current request
+ * @param resourceId Resource identifier to mark as having been linked
+ */
+ protected void link(FacesContext context, String resourceId) {
+
+ context.getExternalContext().getRequestMap().
+ put(PREFIX + resourceId, Boolean.TRUE);
+
+ }
+
+
+ /**
+ * <p>Return <code>true</code> if the specified resource identifier has
+ * already been linked in the current request, and should therefore not
+ * be linked again.</p>
+ *
+ * @param context <code>FacesContext</code> for the current request
+ * @param resourceId Resource identifier to check for prior linking
+ */
+ protected boolean linked(FacesContext context, String resourceId) {
+
+ return context.getExternalContext().getRequestMap().
+ containsKey(PREFIX + resourceId);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org