You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Fabiano Choueiri <fa...@camara.gov.br> on 2005/10/01 00:33:30 UTC

What can I do ? I am a beginner !!!

 
        Hello, please I need some help here.
        It seems to be very simple but I can't find any explanation.
        This is the problem :
                When I put the @Checkbox after the three @ImageSubmits
Tapestry is ignoring if I check or uncheck it the first time I use it.
                If I put the @Checkbox before the the three
@ImageSubmits the things go right.
 
        What is happening ?
    
        Thanks for all help.        
 
 
 
HTML template 

<form jwcid="@Form">

    <input jwcid="codigo"  size="2" maxlength="2" />

    <span jwcid="@ImageSubmit" image="ognl:assets.imgSalvar"
listener="ognl:listeners.salvar" />
    <span jwcid="@ImageSubmit" image="ognl:assets.imgExcluir"
listener="ognl:listeners.excluir" />
    <span jwcid="@ImageSubmit" image="ognl:assets.imgCancelar"
listener="ognl:listeners.cancelar" />

    <span jwcid="@Checkbox" selected="ognl:myCheckbox"/>

</form>

 

Page especification

<page-specification class="MyClass">

    <context-asset name="imgSalvar"
path="/biblioteca/imagens/icones/salvar.bmp" />
    <context-asset name="imgCancelar"
path="/biblioteca/imagens/icones/cancelar.bmp" />
    <context-asset name="imgExcluir"
path="/biblioteca/imagens/icones/excluir.bmp" />
        
    <property-specification name="codigo" type="java.util.String"
persistent="yes" />
    <property-specification name="myChekbox" type="boolean"
persistent="yes" />
    <property-specification name="exibeContinuaNaPagina" type="boolean"
persistent="yes" initial-value="false"/>

</page-specification>



Re: What can I do ? I am a beginner !!!

Posted by Mind Bridge <mi...@yahoo.com>.
If you are using T4 beta 8, please replace the 'listener' parameter of 
the ImageSubmits with 'action'.
For example:

<span jwcid="@ImageSubmit" image="ognl:assets.imgSalvar"
action="ognl:listeners.salvar" />

'listener' is executed immediately when the Submit is reached. Thus the checkbox component will not be invoked if it is located after the Submit.

'action' on the other hand is executed only after all of the components in the form are rewinded (a.k.a. a delayed listener). Thus the checkbox component will be invoked and will work no matter where it is located.




Fabiano Choueiri wrote:

> 
>        Hello, please I need some help here.
>        It seems to be very simple but I can't find any explanation.
>        This is the problem :
>                When I put the @Checkbox after the three @ImageSubmits
>Tapestry is ignoring if I check or uncheck it the first time I use it.
>                If I put the @Checkbox before the the three
>@ImageSubmits the things go right.
> 
>        What is happening ?
>    
>        Thanks for all help.        
> 
> 
> 
>HTML template 
>
><form jwcid="@Form">
>
>    <input jwcid="codigo"  size="2" maxlength="2" />
>
>    <span jwcid="@ImageSubmit" image="ognl:assets.imgSalvar"
>listener="ognl:listeners.salvar" />
>    <span jwcid="@ImageSubmit" image="ognl:assets.imgExcluir"
>listener="ognl:listeners.excluir" />
>    <span jwcid="@ImageSubmit" image="ognl:assets.imgCancelar"
>listener="ognl:listeners.cancelar" />
>
>    <span jwcid="@Checkbox" selected="ognl:myCheckbox"/>
>
></form>
>
> 
>
>Page especification
>
><page-specification class="MyClass">
>
>    <context-asset name="imgSalvar"
>path="/biblioteca/imagens/icones/salvar.bmp" />
>    <context-asset name="imgCancelar"
>path="/biblioteca/imagens/icones/cancelar.bmp" />
>    <context-asset name="imgExcluir"
>path="/biblioteca/imagens/icones/excluir.bmp" />
>        
>    <property-specification name="codigo" type="java.util.String"
>persistent="yes" />
>    <property-specification name="myChekbox" type="boolean"
>persistent="yes" />
>    <property-specification name="exibeContinuaNaPagina" type="boolean"
>persistent="yes" initial-value="false"/>
>
></page-specification>
>
>
>
>  
>

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