Hi,

I'm trying to write an action for cocoon.

the code:
package o2germany.SolutionDelivery.FraudManagement.actions;

import java.util.Map;
import java.util.HashMap;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.acting.AbstractAction;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.environment.Redirector;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.xml.sax.EntityResolver;


public class xslSelect extends AbstractAction {

  public Map act(Redirector redirector, SourceResolver resolver, Map
objectModel,
  String source, Parameters parameters){

    Map results = new HashMap();
    Request request = ObjectModelHelper.getRequest(objectModel);

    String report_id = request.getParameter("report_id");
    String service_id = request.getParameter("service_id");

    // Now choose the suitable XSL for the output
    if(report_id.equals("16"))
      results.put("report_16");
    else if(report_id.equals("17"))
      results.put("report_17GSM");
    else if(report_id.equals("19"))
      results.put("report_19");
    else if(report_id.equals("18"))
      results.put("report_18");
    else
      results.put("error");

// some other crap

    return results;
  }
}

Somehow the compiler does't like the "HashMap" in there.
Somehow the compiler doesn't like the "AbstractAction" (I'm not even sure
if this is right for my action)

I want to simply give back these Strings to my sitemap.
Could anybody tell me what i'm doing wrong?

cheers
Jonny
----------------------------------------------------------------------------------------------------

This electronic message contains information from the mmo2 plc Group which
may be
privileged or confidential. The information is intended to be for the use
of the
individual(s) or entity named above. If you are not the intended recipient
be aware
that any disclosure, copying, distribution or use of the contents of this
information
is prohibited. If you have received this electronic message in error,
please notify
us by telephone or email (to the numbers or address above) immediately.




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to