You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ivan Hernandez <iv...@gmail.com> on 2005/03/12 01:02:20 UTC

Bindings not set

Hi, I am defining a very simple component, ResultItem. This ResultItem
is called several times from a Foreach component in a ResultPage. 

The problem is that the rendered page displays each ResultItem but it
does not render any of the Insert components in the ResultItem. The
definition of the ResultItem component is shown next


ResultItem.html
----------------------------------------------------------------
<table width="100%" class="sform" cellpadding="3" cellspacing="3">
  <tbody>
    <tr class="mhead">
      <td colspan="2"><span jwcid="insertDependencia">Dependencia</span></td>
    </tr>
    <tr>
      <td><h2><span jwcid="insertNombreCompleto">Nombre
Completo</span></h2></td>
      <td align="right">&nbsp;<span class="menuitem"
jwcid="detalleLink">detalles...</span></td>
    </tr>
    <tr>
      <td colspan="2"><span jwcid="insertCategoria">Categoria</span></td>
    </tr>
  </tbody>
</table>
----------------------------------------------------------------


ResultItem.jwc
----------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE component-specification
      PUBLIC "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
      "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<component-specification 
	class="org.apache.tapestry.BaseComponent" 
	allow-informal-parameters="no">

  <parameter name="academico" required="yes"
type="mx.unam.fciencias.xfc.acd.pub.Academico" />

  <component id="insertDependencia" type="Insert">
     <inherited-binding name="value" parameter-name="academico.dependencia" />
  </component>

  <component id="insertNombreCompleto" type="Insert">
    <inherited-binding name="value" parameter-name="academico.nombreCompleto" />
  </component>

  <component id="insertCategoria" type="Insert">
    <inherited-binding name="value" parameter-name="academico.categoria" />
  </component>

  <component id="detalleLink" type="DirectLink">
    <binding name="listener"
expression="page.listeners.muestraDetalleAcademico" />
    <inherited-binding name="value" parameter-name="academico.personalId" />
  </component>  
</component-specification>
----------------------------------------------------------------

This is the spec excerpt where each ResultItem is called 

ResultPage.page
----------------------------------------------------------------
  <component id="e" type="Foreach">
    <binding name="source" expression="academicoqr.result" />
    <binding name="value" expression="acad" />
  </component>  

  <component id="resultadoItem" type="AcademicoResultadoItem"> 
    <binding name="academico" expression="acad" />
  </component>
----------------------------------------------------------------

ResultPage.html
----------------------------------------------------------------
      <tr jwcid="e" element="tr" >
	<td align="center">
	  <span jwcid="resultadoItem">La descripcion del academico</span>
	</td>
      </tr>
----------------------------------------------------------------

The inspector component shows me the following information

For the resultadoItem in ResultPage 
----------------------------------------------------------------
                 Formal Parameters
Name 	        Required   Java type					Binding
academico 	true 	   mx.unam.fciencias.xfc.acd.pub.Academico
	ExpressionBinding[BusquedaAcademicoResultado acad]
----------------------------------------------------------------

and for every Insert component in the ResultItem component the output
is just like the next one  


For insertCategoria in the ResultadoItem component
----------------------------------------------------------------
Formal Parameters
Name		Required	Java type		Binding
class		false		java.lang.String 	
format		false		java.text.Format 	
raw		false		boolean 	
value		false		java.lang.Object 	
----------------------------------------------------------------

The binding is not set! and therefore no info is displayed by the
Insert component, and the Inspector shows just the same for the others
Insert components in the ResultadoItem!

I do not know where the error is, any suggestions will be
appreciated. 


Thanks in advance, 
ivan

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org