[Opensource] Réf. : [Opensource] Creating output with multiple blocks.

Raul DAVIDOVICH R.DAVIDOVICH at caconcology.com
Tue Oct 22 01:14:27 PDT 2002


Hello,

      Are you using Struts' <logic:iterate> tag or expresso's <iterateTag>?

If you're using nested blocks, expressos's tag will help you a lot.. I'm
using nested blocks to iterate with no problems.

here is a simple working code example (you must define the taglibs in
web.xml):

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" %>
<%@ taglib uri="/expresso" prefix="expresso" %>
<%@ taglib uri="/expresso-html" prefix="html" %>

<font color="red">
      <expresso:ErrorTag/>
</font>

<table width="100%" border="1" cellspacing="1" cellpadding="2">

<tr bgcolor="#330099" >
       <tr bgcolor="#330099" >
     <th>
        <font color="#FFFFFF"><b>Abreviature</b></font>
       </th>
       <th>
        <font color="#FFFFFF"><b>Label</b></font>
       </th>
       <th>
        <font color="#FFFFFF"><b>Activity Domain</b></font>
       </th>
       <th>
        <font color="#FFFFFF"><b>Comments</b></font>
       </th>
       <th colspan="3">
        <font color="#FFFFFF"><b>Command</b></font>
       </th>
</tr>
  </tr>

  <expresso:ElementCollection type="Block">
  <expresso:ElementIterator>

    <expresso:ElementCollection type="Block">
    <expresso:ElementIterator>

      <expresso:ElementCollection type="Output">
      <expresso:ElementIterator>

        <expresso:OutputTag name="Detail">
          <tr bgcolor="#E0E0FF" align="center">
            <td><expresso:AttributeTag name="DisplayAbreviature"/> &nbsp;
</td>
          <td><expresso:AttributeTag name="DisplayLabel"/> &nbsp; </td>
          <td><expresso:AttributeTag name="DisplayActivityDomain"/> &nbsp;
</td>
          <td><expresso:AttributeTag name="DisplayComments"/> &nbsp; </td>
      </expresso:OutputTag>

      </expresso:ElementIterator>
      </expresso:ElementCollection>

      <expresso:ElementCollection type="Transition">
      <expresso:ElementIterator>
          <html:form action="/TaskParController.do?cmd=button" method
="POST" >
            <td>
              <expresso:TransitionTag name="command"  />
            </td>
          </html:form>
      </expresso:ElementIterator>
      </expresso:ElementCollection>
      </tr>

    </expresso:ElementIterator>
    </expresso:ElementCollection>
    </table>

  </expresso:ElementIterator>
  </expresso:ElementCollection>

  <html:form action="/TaskParController.do?cmd=button" method="POST" >
      <expresso:TransitionTag name="CreateTaskPar"  />
  </html:form>


hope this helps...

Best regards


---------------------------------------------------
Raul Davidovich
Responsable Informatique
Cvitkovic & Associés Consultants

(33) 1 45 15 40 68
(33) 1 45 15 40 41 Fax
-------------------------------------------------------
http://www.caconcology.com


|---------+------------------------------->
|         |           "M.Siepel"          |
|         |           <m.siepel at thefactore|
|         |           .com>               |
|         |           Envoyé par :        |
|         |           opensource-admin at jco|
|         |           rporate.com         |
|         |                               |
|         |                               |
|         |           21/10/2002 11:05    |
|         |           Veuillez répondre à |
|         |           opensource          |
|         |                               |
|---------+------------------------------->
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                                                  |
  |       Pour :    <opensource at jcorporate.com>                                                                                                      |
  |       cc :                                                                                                                                       |
  |       Objet :   [Opensource] Creating output with multiple blocks.                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|




Hi there,

when I add one block to a response with multiple outputs I have no problem
using the bean provided by the ControllerRequest to output it with a jsp
using the struts iteration tag. (one iteration on the blocks). What I am
trying to do the last three days, is to add a number of blocks to my
response and each block containing multiple outputs. I tried to iterate
within an iteration but every time I get the message: No such property as
'dierOutput/. at Titel' in element 'block'. What am I doing wrong and has
anybody a good tutorial for using struts tags with expresso output elements
and using the bean with id="controller" that is, the bean provided by the
controller response.

With kind regards,

"newbie" Marcel Siepel







More information about the Opensource mailing list