cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Dynamic link generation in XSP...???
Date Sun, 13 Apr 2003 11:54:31 GMT
Hello Gautam,

Marco already gave you the solution for your problem I think, but I want 
to comment your code more generally:

Isn't it much better to separate the data/content generation from the 
styling? This means don't create HTML in the XSP, but an intermediate 
data format, which is later transformed to HTML by an XSLT stylesheet. 
Otherwise you are not able to use many advantages of Cocoon, e.g. 
multiple output formats. What about PDF (=> XSL FO), XUL (Mozilla user 
interface language) or something completely different like a Swing client.

Content generation and styling should completely be separated in my opinion.

Regards,

Joerg

Gautam Ganguly wrote:
> hi there,
>    How do i generate a dynamic link like this in my xsp page:based on a
> column value(=id) returned from a database .Here edit-item.html is the
> sitemap match pattern which will be called when someone clicks on the
> link and the corresponding itemid will get passed to it as a request
> parameter.
> 
>  http://10.1.2.3/cocoon/testapp/admin/edit-item.html?itemid=1234
> 
> <esql:connection>
>             <esql:pool>prodora</esql:pool>
>             <esql:execute-query>
>               <esql:query> 
>                        SELECT id,name from item_list               
>               </esql:query>
>               <p>Items List</p>
> 	<esql:results>
> 	  <table>
>                       	<th>Item Id</th>
> 		<th>Item Name</th>
>                  <esql:row-results>
>                  <tr>
>                             <td><esql:get-string column="id"/></td>
> <!-- this is where i want to use the <link><href="edit-tem.html?itemid=
> -->
>                             <td><esql:get-string column="name"/></td>
>                 </tr>
>                </esql:row-results>
> 
> hope someone would have already got something like this working.The
> samples that came with cocoon have submit buttons next to them..which is
> not what i want..any suggestions or help would be appreciated.
> 
> thanks
> gautam


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


Mime
View raw message