You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christopher Corde <cc...@yahoo.com> on 2004/01/19 17:40:08 UTC

Using Block with a Foreach?

Hey,

  I am trying to render a Foreach component each time
a selection is made within a PropertySelection
component. My PropertySelection recognizes that a form
is submitted, however the values in the Foreach remain
unchanged. Im assuming I need to use a Block for
something like this, but I have no idea what is the
correct way to use it. Any help would be appreciated.

html file:

 <form jwcid="@Form"
listener="ognl:listeners.formSubmit"> 
  <table cellpadding=4>    
   <tr>
    <td colspan=2> Errors: <span
jwcid="selectError"/></td>
   </tr>  
   <tr><td>&nbsp;</td></tr>
	<tr jwcid="@Foreach" source="ognl:error.errorFields"
value="ognl:errorField" element="tr">
	    <td><span jwcid="@Insert"
value="ognl:errorField.fieldName">Name</span></td>
		<td><span jwcid="@Insert"
value="ognl:errorField.fieldValue">Value</span></td>
	</tr>
  </table>
 </form>

  the value of the "error" property is set correctly
each time the PropertySelection is changed, however
the foreach does not refresh.

Thanks,
Chris



__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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


Re: Using Block with a Foreach?

Posted by James Treleaven <ja...@enoreo.on.ca>.
I suggest you post the java code for the page, as well.

James


Christopher Corde wrote:
> Hey,
> 
>   I am trying to render a Foreach component each time
> a selection is made within a PropertySelection
> component. My PropertySelection recognizes that a form
> is submitted, however the values in the Foreach remain
> unchanged. Im assuming I need to use a Block for
> something like this, but I have no idea what is the
> correct way to use it. Any help would be appreciated.
> 
> html file:
> 
>  <form jwcid="@Form"
> listener="ognl:listeners.formSubmit"> 
>   <table cellpadding=4>    
>    <tr>
>     <td colspan=2> Errors: <span
> jwcid="selectError"/></td>
>    </tr>  
>    <tr><td>&nbsp;</td></tr>
> 	<tr jwcid="@Foreach" source="ognl:error.errorFields"
> value="ognl:errorField" element="tr">
> 	    <td><span jwcid="@Insert"
> value="ognl:errorField.fieldName">Name</span></td>
> 		<td><span jwcid="@Insert"
> value="ognl:errorField.fieldValue">Value</span></td>
> 	</tr>
>   </table>
>  </form>
> 
>   the value of the "error" property is set correctly
> each time the PropertySelection is changed, however
> the foreach does not refresh.
> 
> Thanks,
> Chris
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


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