Re: trouble getting return values from an Action Map

2002-07-12 Thread Leona Slepetis

Thanks to both of you. It is working now.
Leona

- Original Message -
From: "Lai, Harry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 5:39 PM
Subject: RE: trouble getting return values from an Action Map


> Hi Leona,
>
> I think there was some discussion about changing how the redirect-to
works,
> but I believe that in Cocoon 2.0.2, you can't provide parameters via a
> map:parameter sub-element.  That is, when you redirect to summary, your
> playerID parameter is being ignored.
>
> One possible workaround I've seen mentioned on this list is:
>
> 
> 
> ...
>
> If you're planning to pass multiple parameters, though, I think someone
> posted something about a bug with escaping the ampersand
> (http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=101828372801806&w=2)
> Anyway, hope that helps!
>
> Harry
>
>
> -Original Message-
> From: Christian Haul [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 5:09 PM
> To: [EMAIL PROTECTED]
> Subject: Re: trouble getting return values from an Action Map
>
>
> On 09.Jul.2002 -- 03:13 PM, Leona Slepetis wrote:
> > Hi All,
> >
> > I've gone  through the samples and archives and still am having trouble
> > getting return values from an Action.
> >
> >   
> >   
> > 
>
> > 
> > 
>
> Leona,
> I've deleted all but the relevant lines. Since you send a redirect
> response to the browser, processing ends.
>
> The browser requests a new page. For this (second) request, no action
> is run, thus no values are set.
>
>   client cocoon
>  -gs-login->
>  (action)
>  <---redirect-to-summary
>
>  summary--->
>  <---summary
>
> If you need to keep the value, you could
> a) use cocoon: protocol in a generator
> b) put summary in a resource and call it
> c) store value e.g. in session
>
> Chris.
>
> Please follow up summarizing your problem and which suggested solution
> / information worked for you when you consider your problem
> solved. Add "SUMMARY: " to the subject line. This will make FAQ
> generation and searching the list easier. In addition, it makes
> helping you more fun. Thank you.
>
> --
> C h r i s t i a n   H a u l
> [EMAIL PROTECTED]
> fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
>
> -
> 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]>
>
> -
> 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]>
>




-
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]>




Re: CORREDTION: trouble getting return values from an Action Map

2002-07-09 Thread Leona Slepetis

Yes, I do declare
Map sitemapParams = new HashMap();
in the action.

Sorry for the error.
Leona
> Hi All,
>
> I've gone  through the samples and archives and still am having trouble
> getting return values from an Action.
>
> I followed the sample code for a simple action:
>
> public class GSLoginAction extends AbstractAction {
>   public Map act (Redirector redirector,
>   SourceResolver resolver,
>   Map objectModel,
>   String source,
>   Parameters params) {
>
> String strUserID;
> String strPwd;
> String strPlayerID = "";
> Request request = ObjectModelHelper.getRequest(objectModel);
> strUserID = request.getParameter("userID");
> strPwd = request.getParameter("pwd");
>
> // do something with the request parameters here and set strPlayerID
>
> sitemapParams.put("playerID", strPlayerID);
> request.setAttribute("playerID", strPlayerID);
> if (// the right thing happened) {
>   return sitemapParams;
> }else {
>   return(null);
> }
> }
>
> It is defined in the sitemap under , pointing to the correct
> class file.
> The action is called from this pipeline fragment, which is attached to
> the "ACTION" button of a form with two text boxes, "userID" and "pwd".
>
> 
>   
>   
> 
> 
>   
> 
>   
>   
>   
> 
>
> I know that the action is running, and the parameters are passed in,
because
> of some debugging I did in the Java code. I seem to be getting something
> back, becuase if I enter correct values on the form, redirect
> to "summary" does happen. Otherwise it goes to "gs".
>
> 
>   
>   
> 
> 
> 
>   
>   
>   
> 
>
> The problem is that "playedID" is not being passed to "summary". Do I
> simply have a syntax error in working with the parameter, or is it more
> complicated than
> that?
>
> Thanks very much,
> Leona
>
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




trouble getting return values from an Action Map

2002-07-09 Thread Leona Slepetis

Hi All,

I've gone  through the samples and archives and still am having trouble
getting return values from an Action.

I followed the sample code for a simple action:

public class GSLoginAction extends AbstractAction {
  public Map act (Redirector redirector,
  SourceResolver resolver,
  Map objectModel,
  String source,
  Parameters params) {

String strUserID;
String strPwd;
String strPlayerID = "";
Request request = ObjectModelHelper.getRequest(objectModel);
strUserID = request.getParameter("userID");
strPwd = request.getParameter("pwd");

// do something with the request parameters here and set strPlayerID

sitemapParams.put("playerID", strPlayerID);
request.setAttribute("playerID", strPlayerID);
if (// the right thing happened) {
  return sitemapParams;
}else {
  return(null);
}
}

It is defined in the sitemap under , pointing to the correct
class file.
The action is called from this pipeline fragment, which is attached to
the "ACTION" button of a form with two text boxes, "userID" and "pwd".


  
  


  

  
  
  


I know that the action is running, and the parameters are passed in, because
of some debugging I did in the Java code. I seem to be getting something
back, becuase if I enter correct values on the form, redirect
to "summary" does happen. Otherwise it goes to "gs".


  
  



  
  
  


The problem is that "playedID" is not being passed to "summary". Do I
simply have a syntax error in working with the parameter, or is it more
complicated than
that?

Thanks very much,
Leona




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




null pointer passed as base exception

2002-06-27 Thread Leona Slepetis

Hi All,

I have part of  a pipeline that looks like this:


  
  





  
  
  


In gs.xml I have:


  



In gs.xsl I have:

  

  


  

  

And default-html.xsl has:

  

  
title
  
  

  

  

I get to it by calling
http://localhost:8080/GS/matrix?dealID=1001&playerID=&matrixfile=file:///D:/
matrix.xml&projectname=new

When I run it, the following error occurs:
Could not read resource file:/D:/tomcat/webapps/GS/gs.xml

org.apache.cocoon.ProcessingException: Could not read resource
file:/D:/tomcat/webapps/GorillaStation/gs.xml: java.lang.RuntimeException:
java.lang.IllegalArgumentException: Null pointer passed as base

One thing I notice is that playerID is not set to the value '123'. Why is
this?
The other thing is that if I take out  from the pipeline it works
according to the default logic in .

There doesn't appear to be anything wrong with gs.xml; it was working under
C1.
Other pipeline segments using the parameter "pagename" work just fine, such
as:


  
  

  
  
  


Can anyone give me a clue as to what is wrong?

Thanks very much,
Leona


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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