Title: Glacier
Vadim, Chiths,
 
Thanks a lot for your advice. I apologize for the delayed reply - I was off sick.
 
I tried your suggestions this morning and now, I am able to use both <gvsdb:list-people class="Singer"/> and <gvsdb:list-people><class>Singer</class></gvsdb:list-people>.
 
However, I still have problems setting the value of "class" based on the identically named request parameter. To illustrate:
 
1. When I 'statically' set "class":
       XML:
           <gvsdb:list-people class="Singer"/>
            OR
            <gvsdb:list-people><class>Singer</class></gvsdb:list-people>
 
       Relevant line in file "people_xml.java" generated by Cocoon (_exactly_ as it appears in the file):
           InputSource __is =
              new InputSource(new StringReader(String.valueOf(
                                             ((XMLGenerator.toXML(SingerHelper.getAll())).asXML()))));
 
2. When I dynamically set "class":
       XML:
           <gvsdb:list-people><class><xsp-request.get-parameter name="class"/></class></gvsdb:list-people>
 
       Relevant line in file "people_xml.java" generated by Cocoon (_exactly_ as it appears in the file):
            InputSource __is =
              new InputSource(new StringReader(String.valueOf(
                                             ((XMLGenerator.toXML( (XSPRequestHelper.getParameter(
                                                                       objectModel, "class", null, null, null))
                                                                       Helper.getAll())).asXML()))));
 
 
I think the <xsp-request> tag is causing the linebreak between the XSPRequestHelper.getParameter() and Helper and causing compilation errors, because the compiler expects a closing parenthesis or comma there. Even if there is a way to prevent the linebreak from appearing, I think the compiler would still have a problem. What really needs to happen is that this value should get evaluated _before_ the java file is generated, so the java file simply has something like in case 1 - SingerHelper() instead of the call to XSPRequestHelper.
 
Can this be done?
 
However, I am pretty sure this will not cause problems in passing parameters to methods using the <xsp-request> tag since the commas are going to be there and we are ot expecting it to generate a class name like in this example.
 
Best Regards,

Sreedhar
_______________________________________________________________________
A computer is like an Old Testament god, with a lot of rules and no mercy

 

Reply via email to