cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarry Liu <javast...@gmail.com>
Subject How can I put this java variable to xml attribute?
Date Fri, 08 Apr 2005 18:18:12 GMT
Hi, everyone,

I use xsp get the values of two strings? How can I use these variables
in the xml form. My code is as following. Thanks for your kind help.

Jarry


...
<xsp:logic>
     int i;
     int num = 1;   

     String col = <xsp-request:get-parameter name="dcol"/>;
     String filesname = <xsp-request:get-parameter name ="input"/>;
     
     <!-- the filename contains several files, and looks like
[sample1.xml, sample2.xml] -->
     String fname = filesname.substring(1,filesname.length()-1);
            
     StringTokenizer tk = new StringTokenizer( fname, ",");
     String file=""; 
    
     while( tk.hasMoreTokens())
     {
       file = tk.nextToken();

       <!-- Here I can get right result -->
              <col-name> <xsp:expr>col</xsp:expr> </col-name>;
            <file-name> <xsp:expr> file</xsp:expr></file-name>;
       
       <!-- How can I pass the the variable to following form in
collection and oid respectly? -->
       <p><form method = "post" action="">
             <textarea cols="50" rows="5" style="font-family:Verdana;
font-weight:bold" READONLY="true">
                       <db:query type="delete" collection="   ??????? 
#{col}" oid= "????????#{file}" />
             </textarea>      
       </form> </p>
     }      
</xsp:logic>
...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message