You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by #Cyrille37# <cy...@gmail.com> on 2007/07/25 10:51:03 UTC

[T4] about component id

Hello
I'm writing my first "complex" component : GroupableCheckbox (not same 
behaviors as CheckboxGroup).

The question is about the component id. To define the id of the 
component I think to use the text before the @ in the jwcid but it does 
work, I had to add an id attribute :

does not write my defined id :
    <input jwcid="ckL1@MyComps/GroupableCheckbox" value="L1" />
render is :
    <input type="checkbox" name="checkbox" checked="checked" 
id="checkbox" />

does works :
    <input id="ckL1" jwcid="@MyComps/GroupableCheckbox" value="L2" />
render is :
    <input type="checkbox" name="ckL1" checked="checked" id="ckL1" />


What the reason ? The theory ?
Thanks for your explanation.
cyrille

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


Re: [T4] about component id

Posted by #Cyrille37# <cy...@gmail.com>.
Jesse Kuhnert a écrit :
> Look at the "How client ids are generated" section here:
>
> http://tapestry.apache.org/tapestry4.1/ajax/basics.html
>
> It's all covered in excruciating detail.   The gist of it is that you do
> this:
>
> public void renderSomething(){
>   super.renderIdAttribute(writer, cycle);
> }
>
> and everything else gets handled for you.
Thanks a lot
cyrille.



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


Re: [T4] about component id

Posted by Jesse Kuhnert <jk...@gmail.com>.
Look at the "How client ids are generated" section here:

http://tapestry.apache.org/tapestry4.1/ajax/basics.html

It's all covered in excruciating detail.   The gist of it is that you do
this:

public void renderSomething(){
   super.renderIdAttribute(writer, cycle);
}

and everything else gets handled for you.

On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>
> Igor Drobiazko a écrit :
> > Well, your component looks somehow strange to me. I don't see what it
> > should
> > do.
> > However id="checkbox" is written when your contained checkbox is
> > rendered.
> > That's expected behavior. Your own component does nothing except
> > registering
> > to the group. So why do you expect id="ckL1"?
> Because it will do something soon ... :-)
> Perhaps it is not a good practice to force the clientId for a component.
>
> Thanks for your time !
> cyrille
> >
> > On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
> >>
> >> Igor Drobiazko a écrit :
> >> > It is inpossible to help you without having a look into your
> >> > GroupableCheckbox.java and GroupableCheckbox.html
> >> > Please post it.
> >> Ha! That's another story, a more complex problem ;-)
> >> After relearned Ids concept, I can talk to you about the component
> >> GroupableCheckbox which I try to construct.
> >>
> >> The rendered version of the concept/need is looking like (where "x" are
> >> checkboxes) :
> >> x List1
> >>    x List1Choice1
> >>    x List1Choice2
> >>   x List2
> >>    x List2Choice1
> >>    x List2Choice2
> >> With those constraints :
> >> 1/ you can select list's choices only in the selected list. eg: is
> List1
> >> is selected you can choice List1Choice1 or List1Choice2 but not
> >> List2Choice1 or List2Choice2
> >> 2/ The validation must be done on the client-side *without* any
> >> communication with the server, but the validation has to exist on the
> >> server to check validity at form's submit.
> >> 3/ I do not want to have encapsulation of component html tags like the
> >> CheckboxGroup component do. This constraint is to let free html
> >> designer.
> >>
> >> I've not yet many sources to show because I've to learning and find
> many
> >> stuff to complete this 3 constraints. At first I've to verify that the
> >> third constraint is possible ...
> >> For da moment I've got :
> >>
> >> ========================
> >> TestGroupableCheckbox.html :
> >>
> >> <form jwcid="theForm@Form" clientValidationEnabled="true" >
> >>
> >>     L1     <input id="ckL1" jwcid="ckL1@MyComps/GroupableCheckbox"
> >> value="L1" /> <br/>
> >>
> >>     L1C1    <input id="ckL1C1" jwcid="ckL1C1@MyComps/GroupableCheckbox"
> >> value="0" group="component:ckL1" />
> >>     L1C2    <input id="ckL1C2" jwcid="ckL1C2@MyComps/GroupableCheckbox"
> >> value="ognl:null" group="component:ckL1" />
> >>     L1C3    <input id="ckL1C3" jwcid="ckL1C3@MyComps/GroupableCheckbox"
> >> group="component:ckL1" />
> >> </form>
> >>
> >> ========================
> >> GroupableCheckbox.html :
> >>
> >> <span jwcid="$content$">
> >>     <span jwcid="checkbox"/>
> >> </span>
> >>
> >> ========================
> >> GroupableCheckbox.jwc :
> >>
> >> <!DOCTYPE component-specification
> >>       PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0
> >> //EN"
> >>       "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd">
> >>
> >> <component-specification
> >>     class="web.components.mycomps.GroupableCheckbox"
> >>     allow-body="no"
> >>     allow-informal-parameters="yes" >
> >>
> >>     <description>
> >>         A checkbox whose state may be controlled/validated by an other
> >> checkbox which acting as a checkbox group controler.
> >>     </description>
> >>
> >>     <parameter name="id" required="no"/>
> >>     <parameter name="value" required="no" default-value="null"/>
> >>     <parameter name="disabled" required="no"/>
> >>
> >>     <parameter name="group" required="yes">
> >>         <description>
> >>             Specifies the GroupableCheckbox this component belongs to.
> >>         </description>
> >>     </parameter>
> >>
> >>     <component id="checkbox" type="Checkbox"
> >> inherit-informal-parameters="yes">
> >>         <inherited-binding name="id" parameter-name="id"/>
> >>         <inherited-binding name="name" parameter-name="id"/>
> >>         <inherited-binding name="value" parameter-name="value"/>
> >>         <inherited-binding name="disabled" parameter-name="disabled"/>
> >>     </component>
> >>
> >>     <property name="subCheckboxesId" initial-value="new
> >> java.util.ArrayList()"/>
> >>
> >> </component-specification>
> >>
> >> ========================
> >> And the UGLY java file. I'm just at the time of tracing all calls to
> >> learn more on cycle...
> >> GroupableCheckbox.java :
> >>
> >> public abstract class GroupableCheckbox extends BaseComponent
> >> {
> >> public abstract Object getGroup();
> >> public abstract Collection getSubCheckboxesId() ;
> >> public void registerSubCheckbox( GroupableCheckbox groupableCheckbox)
> >> {
> >>   getSubCheckboxesId().add( groupableCheckbox );
> >> }
> >> protected void renderComponent( IMarkupWriter writer, IRequestCycle
> >> cycle
> >> )
> >> {
> >>         log.info( "*** renderComponent()" );
> >>         log.info( "getBoundId: "+this.getBoundId() );
> >>         log.info( "id: "+this.getId()+", clientId:
> >> "+this.getClientId()+", specifiedId: "+this.getSpecifiedId() );
> >>         log.info( "getIdPath: "+this.getIdPath() + ", getExtendedId:
> >> "+this.getExtendedId() );
> >>         Object group = this.getGroup();
> >>         log.info( "group: "+group );
> >>         if( group != null )
> >>         {
> >>             ((GroupableCheckbox)group).registerSubCheckbox( this );
> >>         }
> >>         super.renderComponent( writer, cycle );
> >>     }
> >>     ...
> >>     ... Overrided methods with log.info("methodName")
> >>     ...
> >> }
> >>
> >>
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: [T4] about component id

Posted by #Cyrille37# <cy...@gmail.com>.
Igor Drobiazko a écrit :
> Well, your component looks somehow strange to me. I don't see what it 
> should
> do.
> However id="checkbox" is written when your contained checkbox is 
> rendered.
> That's expected behavior. Your own component does nothing except 
> registering
> to the group. So why do you expect id="ckL1"?
Because it will do something soon ... :-)
Perhaps it is not a good practice to force the clientId for a component.

Thanks for your time !
cyrille
>
> On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>>
>> Igor Drobiazko a écrit :
>> > It is inpossible to help you without having a look into your
>> > GroupableCheckbox.java and GroupableCheckbox.html
>> > Please post it.
>> Ha! That's another story, a more complex problem ;-)
>> After relearned Ids concept, I can talk to you about the component
>> GroupableCheckbox which I try to construct.
>>
>> The rendered version of the concept/need is looking like (where "x" are
>> checkboxes) :
>> x List1
>>    x List1Choice1
>>    x List1Choice2
>>   x List2
>>    x List2Choice1
>>    x List2Choice2
>> With those constraints :
>> 1/ you can select list's choices only in the selected list. eg: is List1
>> is selected you can choice List1Choice1 or List1Choice2 but not
>> List2Choice1 or List2Choice2
>> 2/ The validation must be done on the client-side *without* any
>> communication with the server, but the validation has to exist on the
>> server to check validity at form's submit.
>> 3/ I do not want to have encapsulation of component html tags like the
>> CheckboxGroup component do. This constraint is to let free html 
>> designer.
>>
>> I've not yet many sources to show because I've to learning and find many
>> stuff to complete this 3 constraints. At first I've to verify that the
>> third constraint is possible ...
>> For da moment I've got :
>>
>> ========================
>> TestGroupableCheckbox.html :
>>
>> <form jwcid="theForm@Form" clientValidationEnabled="true" >
>>
>>     L1     <input id="ckL1" jwcid="ckL1@MyComps/GroupableCheckbox"
>> value="L1" /> <br/>
>>
>>     L1C1    <input id="ckL1C1" jwcid="ckL1C1@MyComps/GroupableCheckbox"
>> value="0" group="component:ckL1" />
>>     L1C2    <input id="ckL1C2" jwcid="ckL1C2@MyComps/GroupableCheckbox"
>> value="ognl:null" group="component:ckL1" />
>>     L1C3    <input id="ckL1C3" jwcid="ckL1C3@MyComps/GroupableCheckbox"
>> group="component:ckL1" />
>> </form>
>>
>> ========================
>> GroupableCheckbox.html :
>>
>> <span jwcid="$content$">
>>     <span jwcid="checkbox"/>
>> </span>
>>
>> ========================
>> GroupableCheckbox.jwc :
>>
>> <!DOCTYPE component-specification
>>       PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0
>> //EN"
>>       "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd">
>>
>> <component-specification
>>     class="web.components.mycomps.GroupableCheckbox"
>>     allow-body="no"
>>     allow-informal-parameters="yes" >
>>
>>     <description>
>>         A checkbox whose state may be controlled/validated by an other
>> checkbox which acting as a checkbox group controler.
>>     </description>
>>
>>     <parameter name="id" required="no"/>
>>     <parameter name="value" required="no" default-value="null"/>
>>     <parameter name="disabled" required="no"/>
>>
>>     <parameter name="group" required="yes">
>>         <description>
>>             Specifies the GroupableCheckbox this component belongs to.
>>         </description>
>>     </parameter>
>>
>>     <component id="checkbox" type="Checkbox"
>> inherit-informal-parameters="yes">
>>         <inherited-binding name="id" parameter-name="id"/>
>>         <inherited-binding name="name" parameter-name="id"/>
>>         <inherited-binding name="value" parameter-name="value"/>
>>         <inherited-binding name="disabled" parameter-name="disabled"/>
>>     </component>
>>
>>     <property name="subCheckboxesId" initial-value="new
>> java.util.ArrayList()"/>
>>
>> </component-specification>
>>
>> ========================
>> And the UGLY java file. I'm just at the time of tracing all calls to
>> learn more on cycle...
>> GroupableCheckbox.java :
>>
>> public abstract class GroupableCheckbox extends BaseComponent
>> {
>> public abstract Object getGroup();
>> public abstract Collection getSubCheckboxesId() ;
>> public void registerSubCheckbox( GroupableCheckbox groupableCheckbox)
>> {
>>   getSubCheckboxesId().add( groupableCheckbox );
>> }
>> protected void renderComponent( IMarkupWriter writer, IRequestCycle 
>> cycle
>> )
>> {
>>         log.info( "*** renderComponent()" );
>>         log.info( "getBoundId: "+this.getBoundId() );
>>         log.info( "id: "+this.getId()+", clientId:
>> "+this.getClientId()+", specifiedId: "+this.getSpecifiedId() );
>>         log.info( "getIdPath: "+this.getIdPath() + ", getExtendedId:
>> "+this.getExtendedId() );
>>         Object group = this.getGroup();
>>         log.info( "group: "+group );
>>         if( group != null )
>>         {
>>             ((GroupableCheckbox)group).registerSubCheckbox( this );
>>         }
>>         super.renderComponent( writer, cycle );
>>     }
>>     ...
>>     ... Overrided methods with log.info("methodName")
>>     ...
>> }
>>
>>
>



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


Re: [T4] about component id

Posted by Igor Drobiazko <ig...@gmail.com>.
Well, your component looks somehow strange to me. I don't see what it should
do.
However id="checkbox" is written when your contained checkbox is rendered.
That's expected behavior. Your own component does nothing except registering
to the group. So why do you expect id="ckL1"?

On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>
> Igor Drobiazko a écrit :
> > It is inpossible to help you without having a look into your
> > GroupableCheckbox.java and GroupableCheckbox.html
> > Please post it.
> Ha! That's another story, a more complex problem ;-)
> After relearned Ids concept, I can talk to you about the component
> GroupableCheckbox which I try to construct.
>
> The rendered version of the concept/need is looking like (where "x" are
> checkboxes) :
> x List1
>    x List1Choice1
>    x List1Choice2
>   x List2
>    x List2Choice1
>    x List2Choice2
> With those constraints :
> 1/ you can select list's choices only in the selected list. eg: is List1
> is selected you can choice List1Choice1 or List1Choice2 but not
> List2Choice1 or List2Choice2
> 2/ The validation must be done on the client-side *without* any
> communication with the server, but the validation has to exist on the
> server to check validity at form's submit.
> 3/ I do not want to have encapsulation of component html tags like the
> CheckboxGroup component do. This constraint is to let free html designer.
>
> I've not yet many sources to show because I've to learning and find many
> stuff to complete this 3 constraints. At first I've to verify that the
> third constraint is possible ...
> For da moment I've got :
>
> ========================
> TestGroupableCheckbox.html :
>
> <form jwcid="theForm@Form" clientValidationEnabled="true" >
>
>     L1     <input id="ckL1" jwcid="ckL1@MyComps/GroupableCheckbox"
> value="L1" /> <br/>
>
>     L1C1    <input id="ckL1C1" jwcid="ckL1C1@MyComps/GroupableCheckbox"
> value="0" group="component:ckL1" />
>     L1C2    <input id="ckL1C2" jwcid="ckL1C2@MyComps/GroupableCheckbox"
> value="ognl:null" group="component:ckL1" />
>     L1C3    <input id="ckL1C3" jwcid="ckL1C3@MyComps/GroupableCheckbox"
> group="component:ckL1" />
> </form>
>
> ========================
> GroupableCheckbox.html :
>
> <span jwcid="$content$">
>     <span jwcid="checkbox"/>
> </span>
>
> ========================
> GroupableCheckbox.jwc :
>
> <!DOCTYPE component-specification
>       PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0
> //EN"
>       "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd">
>
> <component-specification
>     class="web.components.mycomps.GroupableCheckbox"
>     allow-body="no"
>     allow-informal-parameters="yes" >
>
>     <description>
>         A checkbox whose state may be controlled/validated by an other
> checkbox which acting as a checkbox group controler.
>     </description>
>
>     <parameter name="id" required="no"/>
>     <parameter name="value" required="no" default-value="null"/>
>     <parameter name="disabled" required="no"/>
>
>     <parameter name="group" required="yes">
>         <description>
>             Specifies the GroupableCheckbox this component belongs to.
>         </description>
>     </parameter>
>
>     <component id="checkbox" type="Checkbox"
> inherit-informal-parameters="yes">
>         <inherited-binding name="id" parameter-name="id"/>
>         <inherited-binding name="name" parameter-name="id"/>
>         <inherited-binding name="value" parameter-name="value"/>
>         <inherited-binding name="disabled" parameter-name="disabled"/>
>     </component>
>
>     <property name="subCheckboxesId" initial-value="new
> java.util.ArrayList()"/>
>
> </component-specification>
>
> ========================
> And the UGLY java file. I'm just at the time of tracing all calls to
> learn more on cycle...
> GroupableCheckbox.java :
>
> public abstract class GroupableCheckbox extends BaseComponent
> {
> public abstract Object getGroup();
> public abstract Collection getSubCheckboxesId() ;
> public void registerSubCheckbox( GroupableCheckbox groupableCheckbox)
> {
>   getSubCheckboxesId().add( groupableCheckbox );
> }
> protected void renderComponent( IMarkupWriter writer, IRequestCycle cycle
> )
> {
>         log.info( "*** renderComponent()" );
>         log.info( "getBoundId: "+this.getBoundId() );
>         log.info( "id: "+this.getId()+", clientId:
> "+this.getClientId()+", specifiedId: "+this.getSpecifiedId() );
>         log.info( "getIdPath: "+this.getIdPath() + ", getExtendedId:
> "+this.getExtendedId() );
>         Object group = this.getGroup();
>         log.info( "group: "+group );
>         if( group != null )
>         {
>             ((GroupableCheckbox)group).registerSubCheckbox( this );
>         }
>         super.renderComponent( writer, cycle );
>     }
>     ...
>     ... Overrided methods with log.info("methodName")
>     ...
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T4] about component id

Posted by #Cyrille37# <cy...@gmail.com>.
Igor Drobiazko a écrit :
> It is inpossible to help you without having a look into your
> GroupableCheckbox.java and GroupableCheckbox.html
> Please post it.
Ha! That's another story, a more complex problem ;-)
After relearned Ids concept, I can talk to you about the component 
GroupableCheckbox which I try to construct.

The rendered version of the concept/need is looking like (where "x" are 
checkboxes) :
 x List1
   x List1Choice1
   x List1Choice2
  x List2
   x List2Choice1
   x List2Choice2
With those constraints :
1/ you can select list's choices only in the selected list. eg: is List1 
is selected you can choice List1Choice1 or List1Choice2 but not 
List2Choice1 or List2Choice2
2/ The validation must be done on the client-side *without* any 
communication with the server, but the validation has to exist on the 
server to check validity at form's submit.
3/ I do not want to have encapsulation of component html tags like the 
CheckboxGroup component do. This constraint is to let free html designer.

I've not yet many sources to show because I've to learning and find many 
stuff to complete this 3 constraints. At first I've to verify that the 
third constraint is possible ...
For da moment I've got :

========================
TestGroupableCheckbox.html :

<form jwcid="theForm@Form" clientValidationEnabled="true" >

    L1     <input id="ckL1" jwcid="ckL1@MyComps/GroupableCheckbox" 
value="L1" /> <br/>
   
    L1C1    <input id="ckL1C1" jwcid="ckL1C1@MyComps/GroupableCheckbox" 
value="0" group="component:ckL1" />
    L1C2    <input id="ckL1C2" jwcid="ckL1C2@MyComps/GroupableCheckbox" 
value="ognl:null" group="component:ckL1" />
    L1C3    <input id="ckL1C3" jwcid="ckL1C3@MyComps/GroupableCheckbox" 
group="component:ckL1" />
</form>

========================
GroupableCheckbox.html :

<span jwcid="$content$">
    <span jwcid="checkbox"/>
</span>

========================
GroupableCheckbox.jwc :

<!DOCTYPE component-specification
      PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
      "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd">

<component-specification
    class="web.components.mycomps.GroupableCheckbox"
    allow-body="no"
    allow-informal-parameters="yes" >

    <description>
        A checkbox whose state may be controlled/validated by an other 
checkbox which acting as a checkbox group controler.
    </description>

    <parameter name="id" required="no"/>
    <parameter name="value" required="no" default-value="null"/>
    <parameter name="disabled" required="no"/>

    <parameter name="group" required="yes">
        <description>
            Specifies the GroupableCheckbox this component belongs to.
        </description>
    </parameter>

    <component id="checkbox" type="Checkbox" 
inherit-informal-parameters="yes">
        <inherited-binding name="id" parameter-name="id"/>
        <inherited-binding name="name" parameter-name="id"/>
        <inherited-binding name="value" parameter-name="value"/>
        <inherited-binding name="disabled" parameter-name="disabled"/>
    </component>

    <property name="subCheckboxesId" initial-value="new 
java.util.ArrayList()"/>

</component-specification>

========================
And the UGLY java file. I'm just at the time of tracing all calls to 
learn more on cycle...
GroupableCheckbox.java :

public abstract class GroupableCheckbox extends BaseComponent
{
 public abstract Object getGroup();
 public abstract Collection getSubCheckboxesId() ;
 public void registerSubCheckbox( GroupableCheckbox groupableCheckbox)
 {
  getSubCheckboxesId().add( groupableCheckbox );
 }
 protected void renderComponent( IMarkupWriter writer, IRequestCycle cycle )
 {
        log.info( "*** renderComponent()" );
        log.info( "getBoundId: "+this.getBoundId() );
        log.info( "id: "+this.getId()+", clientId: 
"+this.getClientId()+", specifiedId: "+this.getSpecifiedId() );
        log.info( "getIdPath: "+this.getIdPath() + ", getExtendedId: 
"+this.getExtendedId() );
        Object group = this.getGroup();
        log.info( "group: "+group );
        if( group != null )
        {
            ((GroupableCheckbox)group).registerSubCheckbox( this );
        }
        super.renderComponent( writer, cycle );
    }
    ...
    ... Overrided methods with log.info("methodName")
    ...
}



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


Re: [T4] about component id

Posted by Igor Drobiazko <ig...@gmail.com>.
It is inpossible to help you without having a look into your
GroupableCheckbox.java and GroupableCheckbox.html
Please post it.

On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>
> Igor Drobiazko a écrit :
> > Cyrille,
> >
> > please provide your sources. Otherwise we have to use our glass sphere
> :)
> But I do not need to debug my source, I just need more memory ;-) I do
> not remember some tapestry syntax.
> I think I'm handsaking component's ids in my brain.
>
> Is that syntax definition right ?
>     <checkbox id="clientId" jwcid="compId@CompType" />
>
> Before kiuma's answer I tought :
>     <checkbox jwcid="Id@CompType" />
> where Id should be used as clientId. but it's wrong, ins't it ?
>
> thanks
> cyrille
> >
> > On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
> >>
> >> Andrea Chiumenti a écrit :
> >> > ciao,
> >> > the fact is that tapestry uses the form     form['componentname'] ,
> so
> >> > for
> >> > Tapestry name is sufficient to specify ur id u should use
> >> > id="clientId:yourComponentId".
> >> But why the shortest way jwcid="myCompId@ComponentType" does not create
> >> a html element with a id="myCompId" ?
> >>
> >> Perhaps there are not same ids : clientId <> tapestryId ? Is that
> >> right ?
> >>
> >> cyrille
> >>
> >> >
> >> > Hope this helps.
> >> >
> >> > kiuma
> >> >
> >> > On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
> >> >>
> >> >> Hello
> >> >> I'm writing my first "complex" component : GroupableCheckbox (not
> >> same
> >> >> behaviors as CheckboxGroup).
> >> >>
> >> >> The question is about the component id. To define the id of the
> >> >> component I think to use the text before the @ in the jwcid but it
> >> does
> >> >> work, I had to add an id attribute :
> >> >>
> >> >> does not write my defined id :
> >> >>     <input jwcid="ckL1@MyComps/GroupableCheckbox" value="L1" />
> >> >> render is :
> >> >>     <input type="checkbox" name="checkbox" checked="checked"
> >> >> id="checkbox" />
> >> >>
> >> >> does works :
> >> >>     <input id="ckL1" jwcid="@MyComps/GroupableCheckbox" value="L2"
> />
> >> >> render is :
> >> >>     <input type="checkbox" name="ckL1" checked="checked" id="ckL1"
> />
> >> >>
> >> >>
> >> >> What the reason ? The theory ?
> >> >> Thanks for your explanation.
> >> >> cyrille
> >> >>
> >>
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T4] about component id

Posted by #Cyrille37# <cy...@gmail.com>.
Igor Drobiazko a écrit :
> Cyrille,
>
> please provide your sources. Otherwise we have to use our glass sphere :)
But I do not need to debug my source, I just need more memory ;-) I do 
not remember some tapestry syntax.
I think I'm handsaking component's ids in my brain.

Is that syntax definition right ?
    <checkbox id="clientId" jwcid="compId@CompType" />

Before kiuma's answer I tought :
    <checkbox jwcid="Id@CompType" />
where Id should be used as clientId. but it's wrong, ins't it ?

thanks
cyrille
>
> On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>>
>> Andrea Chiumenti a écrit :
>> > ciao,
>> > the fact is that tapestry uses the form     form['componentname'] , so
>> > for
>> > Tapestry name is sufficient to specify ur id u should use
>> > id="clientId:yourComponentId".
>> But why the shortest way jwcid="myCompId@ComponentType" does not create
>> a html element with a id="myCompId" ?
>>
>> Perhaps there are not same ids : clientId <> tapestryId ? Is that 
>> right ?
>>
>> cyrille
>>
>> >
>> > Hope this helps.
>> >
>> > kiuma
>> >
>> > On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>> >>
>> >> Hello
>> >> I'm writing my first "complex" component : GroupableCheckbox (not 
>> same
>> >> behaviors as CheckboxGroup).
>> >>
>> >> The question is about the component id. To define the id of the
>> >> component I think to use the text before the @ in the jwcid but it 
>> does
>> >> work, I had to add an id attribute :
>> >>
>> >> does not write my defined id :
>> >>     <input jwcid="ckL1@MyComps/GroupableCheckbox" value="L1" />
>> >> render is :
>> >>     <input type="checkbox" name="checkbox" checked="checked"
>> >> id="checkbox" />
>> >>
>> >> does works :
>> >>     <input id="ckL1" jwcid="@MyComps/GroupableCheckbox" value="L2" />
>> >> render is :
>> >>     <input type="checkbox" name="ckL1" checked="checked" id="ckL1" />
>> >>
>> >>
>> >> What the reason ? The theory ?
>> >> Thanks for your explanation.
>> >> cyrille
>> >>
>>
>



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


Re: [T4] about component id

Posted by Igor Drobiazko <ig...@gmail.com>.
Cyrille,

please provide your sources. Otherwise we have to use our glass sphere :)

On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>
> Andrea Chiumenti a écrit :
> > ciao,
> > the fact is that tapestry uses the form     form['componentname'] , so
> > for
> > Tapestry name is sufficient to specify ur id u should use
> > id="clientId:yourComponentId".
> But why the shortest way jwcid="myCompId@ComponentType" does not create
> a html element with a id="myCompId" ?
>
> Perhaps there are not same ids : clientId <> tapestryId ? Is that right ?
>
> cyrille
>
> >
> > Hope this helps.
> >
> > kiuma
> >
> > On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
> >>
> >> Hello
> >> I'm writing my first "complex" component : GroupableCheckbox (not same
> >> behaviors as CheckboxGroup).
> >>
> >> The question is about the component id. To define the id of the
> >> component I think to use the text before the @ in the jwcid but it does
> >> work, I had to add an id attribute :
> >>
> >> does not write my defined id :
> >>     <input jwcid="ckL1@MyComps/GroupableCheckbox" value="L1" />
> >> render is :
> >>     <input type="checkbox" name="checkbox" checked="checked"
> >> id="checkbox" />
> >>
> >> does works :
> >>     <input id="ckL1" jwcid="@MyComps/GroupableCheckbox" value="L2" />
> >> render is :
> >>     <input type="checkbox" name="ckL1" checked="checked" id="ckL1" />
> >>
> >>
> >> What the reason ? The theory ?
> >> Thanks for your explanation.
> >> cyrille
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T4] about component id

Posted by Andrea Chiumenti <ki...@gmail.com>.
Well this question should be addressed to Jesse

On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>
> Andrea Chiumenti a écrit :
> > ciao,
> > the fact is that tapestry uses the form     form['componentname'] , so
> > for
> > Tapestry name is sufficient to specify ur id u should use
> > id="clientId:yourComponentId".
> But why the shortest way jwcid="myCompId@ComponentType" does not create
> a html element with a id="myCompId" ?
>
> Perhaps there are not same ids : clientId <> tapestryId ? Is that right ?
>
> cyrille
>
> >
> > Hope this helps.
> >
> > kiuma
> >
> > On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
> >>
> >> Hello
> >> I'm writing my first "complex" component : GroupableCheckbox (not same
> >> behaviors as CheckboxGroup).
> >>
> >> The question is about the component id. To define the id of the
> >> component I think to use the text before the @ in the jwcid but it does
> >> work, I had to add an id attribute :
> >>
> >> does not write my defined id :
> >>     <input jwcid="ckL1@MyComps/GroupableCheckbox" value="L1" />
> >> render is :
> >>     <input type="checkbox" name="checkbox" checked="checked"
> >> id="checkbox" />
> >>
> >> does works :
> >>     <input id="ckL1" jwcid="@MyComps/GroupableCheckbox" value="L2" />
> >> render is :
> >>     <input type="checkbox" name="ckL1" checked="checked" id="ckL1" />
> >>
> >>
> >> What the reason ? The theory ?
> >> Thanks for your explanation.
> >> cyrille
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T4] about component id

Posted by #Cyrille37# <cy...@gmail.com>.
Andrea Chiumenti a écrit :
> ciao,
> the fact is that tapestry uses the form     form['componentname'] , so 
> for
> Tapestry name is sufficient to specify ur id u should use
> id="clientId:yourComponentId".
But why the shortest way jwcid="myCompId@ComponentType" does not create 
a html element with a id="myCompId" ?

Perhaps there are not same ids : clientId <> tapestryId ? Is that right ?

cyrille

>
> Hope this helps.
>
> kiuma
>
> On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>>
>> Hello
>> I'm writing my first "complex" component : GroupableCheckbox (not same
>> behaviors as CheckboxGroup).
>>
>> The question is about the component id. To define the id of the
>> component I think to use the text before the @ in the jwcid but it does
>> work, I had to add an id attribute :
>>
>> does not write my defined id :
>>     <input jwcid="ckL1@MyComps/GroupableCheckbox" value="L1" />
>> render is :
>>     <input type="checkbox" name="checkbox" checked="checked"
>> id="checkbox" />
>>
>> does works :
>>     <input id="ckL1" jwcid="@MyComps/GroupableCheckbox" value="L2" />
>> render is :
>>     <input type="checkbox" name="ckL1" checked="checked" id="ckL1" />
>>
>>
>> What the reason ? The theory ?
>> Thanks for your explanation.
>> cyrille
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>



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


Re: [T4] about component id

Posted by Andrea Chiumenti <ki...@gmail.com>.
ciao,
the fact is that tapestry uses the form     form['componentname'] , so for
Tapestry name is sufficient to specify ur id u should use
id="clientId:yourComponentId".

Hope this helps.

kiuma

On 7/25/07, #Cyrille37# <cy...@gmail.com> wrote:
>
> Hello
> I'm writing my first "complex" component : GroupableCheckbox (not same
> behaviors as CheckboxGroup).
>
> The question is about the component id. To define the id of the
> component I think to use the text before the @ in the jwcid but it does
> work, I had to add an id attribute :
>
> does not write my defined id :
>     <input jwcid="ckL1@MyComps/GroupableCheckbox" value="L1" />
> render is :
>     <input type="checkbox" name="checkbox" checked="checked"
> id="checkbox" />
>
> does works :
>     <input id="ckL1" jwcid="@MyComps/GroupableCheckbox" value="L2" />
> render is :
>     <input type="checkbox" name="ckL1" checked="checked" id="ckL1" />
>
>
> What the reason ? The theory ?
> Thanks for your explanation.
> cyrille
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>