You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2005/09/06 16:52:17 UTC
svn commit: r279011 -
/forrest/trunk/main/java/org/apache/forrest/locationmap/lm/ActNode.java
Author: thorsten
Date: Tue Sep 6 07:52:14 2005
New Revision: 279011
URL: http://svn.apache.org/viewcvs?rev=279011&view=rev
Log:
Loactionmap stuff for acting
Modified:
forrest/trunk/main/java/org/apache/forrest/locationmap/lm/ActNode.java
Modified: forrest/trunk/main/java/org/apache/forrest/locationmap/lm/ActNode.java
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/locationmap/lm/ActNode.java?rev=279011&r1=279010&r2=279011&view=diff
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/locationmap/lm/ActNode.java (original)
+++ forrest/trunk/main/java/org/apache/forrest/locationmap/lm/ActNode.java Tue Sep 6 07:52:14 2005
@@ -28,8 +28,11 @@
import org.apache.avalon.framework.service.ServiceSelector;
import org.apache.cocoon.acting.Action;
import org.apache.cocoon.components.treeprocessor.InvokeContext;
+import org.apache.cocoon.components.treeprocessor.variables.VariableResolver;
+import org.apache.cocoon.components.treeprocessor.variables.VariableResolverFactory;
import org.apache.cocoon.environment.Redirector;
import org.apache.cocoon.selection.Selector;
+import org.apache.cocoon.sitemap.PatternException;
import org.apache.cocoon.environment.SourceResolver;
@@ -47,6 +50,9 @@
// the type of action for this node
private String m_type;
+ // the src of action for this node
+ private VariableResolver m_src;
+
// the locations to test against
private AbstractNode[] m_nodes;
@@ -64,6 +70,14 @@
// get the selector
m_type = configuration.getAttribute("type",m_ln.getDefaultAction());
+// try {
+// m_src = VariableResolverFactory.getResolver(
+// configuration.getAttribute("src"), super.m_manager);
+// } catch (PatternException e) {
+// final String message = "Illegal pattern syntax at for location attribute 'src'" +
+// " at " + configuration.getLocation();
+// throw new ConfigurationException(message,e);
+// }
try {
final ServiceSelector selectors = (ServiceSelector) super.m_manager.lookup(Action.ROLE + "Selector");
m_action = (Action) selectors.select(m_type);
@@ -111,7 +125,8 @@
public String locate(Map objectModel, InvokeContext context) throws Exception {
Parameters parameters = resolveParameters(context,objectModel);
Redirector redirector = context.getRedirector();
- String source = "";
+ String source;
+ source="";
Map substitutions = m_action.act(redirector, resolver, objectModel, source, parameters);
if (substitutions != null) {
if (getLogger().isDebugEnabled()) {