You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by newbie newbie <co...@gmail.com> on 2013/07/11 10:12:53 UTC
How to set HTML checkbox from java page
Hi,
I am using plain HTML checkbox(not Tapestry type). I need to set the
checkbox to checked in my java page. How do I do that?
Here is my tml code fragment
<input type="checkbox" name="leaf" id="leaf" value="leaf"/>
Any help would be appreciated. Thanks.
Re: How to set HTML checkbox from java page
Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
I was expecting this ;)
Sent from my iPhone
On 12-Jul-2013, at 6:21 PM, "Thiago H de Paula Figueiredo" <th...@gmail.com> wrote:
> On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi <ta...@gmail.com> wrote:
>
>> You can try
>>
>> <t:if test='checked'>
>> <input type='checkbox' name='leaf' id='leaf' value='leaf' checked='checked'/>
>>
>> <p:else>
>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>> </p:else>
>> </t:if>
>
> Better yet (I hate using p:else. I think it's quite confusing to have the else part inside the if part),
>
> <t:if test='checked'>
> <input type='checkbox' name='leaf' id='leaf' value='leaf' checked='checked'/>
> </t:if>
> <t:if test='!checked'>
> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
> </t:if>
>
> --
> Thiago H. de Paula Figueiredo
>
> ---------------------------------------------------------------------
> 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: How to set HTML checkbox from java page
Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
I just Voted for https://issues.apache.org/jira/browse/TAP5-2140
On Jul 13, 2013, at 6:54 PM, Barry Books wrote:
> TAPS-2140 created with patch for Choose if someone can apply it.
> Thanks
>
>
> On Fri, Jul 12, 2013 at 4:39 PM, Lenny Primak <lp...@hope.nyc.ny.us>wrote:
>
>> +1. A big plus one.
>>
>>
>>
>> On Jul 12, 2013, at 5:34 PM, Lance Java <la...@googlemail.com> wrote:
>>
>>> My personal preference is for the JSTL style
>>>
>>> <t:choose>
>>> <t:when test="test1">value1</t:when>
>>> <t:when test="test2">value2</t:when>
>>> <t:otherwise>default</t:otherwise>
>>> </t:choose>
>>>
>>>
>>> On 12 July 2013 19:54, Thiago H de Paula Figueiredo <thiagohp@gmail.com
>>> wrote:
>>>
>>>> On Fri, 12 Jul 2013 14:41:04 -0300, Barry Books <tr...@gmail.com>
>> wrote:
>>>>
>>>> I don't like it either. Perhaps it should be
>>>>>
>>>>> <t:if test="checked'>
>>>>> <p:then>
>>>>> </p:then>
>>>>> <p:else>
>>>>> </p:else>
>>>>> </t:if>
>>>>
>>>> IMHO this looks way better then just <p:else>, but I still prefer the
>> two
>>>> If instances version. Matter of taste, probably.
>>>>
>>>>
>>>>
>>>>>
>>>>> On Fri, Jul 12, 2013 at 7:51 AM, Thiago H de Paula Figueiredo <
>>>>> thiagohp@gmail.com> wrote:
>>>>>
>>>>> On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi <
>>>>>> tawushafeez@gmail.com> wrote:
>>>>>>
>>>>>> You can try
>>>>>>
>>>>>>>
>>>>>>> <t:if test='checked'>
>>>>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>>>>>> checked='checked'/>
>>>>>>>
>>>>>>> <p:else>
>>>>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>>>>>> </p:else>
>>>>>>> </t:if>
>>>>>> Better yet (I hate using p:else. I think it's quite confusing to have
>> the
>>>>>> else part inside the if part),
>>>>>>
>>>>>>
>>>>>> <t:if test='checked'>
>>>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>>>>> checked='checked'/>
>>>>>> </t:if>
>>>>>> <t:if test='!checked'>
>>>>>>
>>>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>>>>> </t:if>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Thiago H. de Paula Figueiredo
>>>>>>
>>>>>> ------------------------------****----------------------------**
>>>>>> --**---------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**a**pache.org<
>> http://apache.org>
>>>>>> <users-unsubscribe@**tapestry.apache.org<
>> users-unsubscribe@tapestry.apache.org>
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>> --
>>>> Thiago H. de Paula Figueiredo
>>>>
>>>>
>> ------------------------------**------------------------------**---------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<
>> 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
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How to set HTML checkbox from java page
Posted by Barry Books <tr...@gmail.com>.
TAPS-2140 created with patch for Choose if someone can apply it.
Thanks
On Fri, Jul 12, 2013 at 4:39 PM, Lenny Primak <lp...@hope.nyc.ny.us>wrote:
> +1. A big plus one.
>
>
>
> On Jul 12, 2013, at 5:34 PM, Lance Java <la...@googlemail.com> wrote:
>
> > My personal preference is for the JSTL style
> >
> > <t:choose>
> > <t:when test="test1">value1</t:when>
> > <t:when test="test2">value2</t:when>
> > <t:otherwise>default</t:otherwise>
> > </t:choose>
> >
> >
> > On 12 July 2013 19:54, Thiago H de Paula Figueiredo <thiagohp@gmail.com
> >wrote:
> >
> >> On Fri, 12 Jul 2013 14:41:04 -0300, Barry Books <tr...@gmail.com>
> wrote:
> >>
> >> I don't like it either. Perhaps it should be
> >>>
> >>> <t:if test="checked'>
> >>> <p:then>
> >>> </p:then>
> >>> <p:else>
> >>> </p:else>
> >>> </t:if>
> >>
> >> IMHO this looks way better then just <p:else>, but I still prefer the
> two
> >> If instances version. Matter of taste, probably.
> >>
> >>
> >>
> >>>
> >>> On Fri, Jul 12, 2013 at 7:51 AM, Thiago H de Paula Figueiredo <
> >>> thiagohp@gmail.com> wrote:
> >>>
> >>> On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi <
> >>>> tawushafeez@gmail.com> wrote:
> >>>>
> >>>> You can try
> >>>>
> >>>>>
> >>>>> <t:if test='checked'>
> >>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
> >>>>> checked='checked'/>
> >>>>>
> >>>>> <p:else>
> >>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
> >>>>> </p:else>
> >>>>> </t:if>
> >>>> Better yet (I hate using p:else. I think it's quite confusing to have
> the
> >>>> else part inside the if part),
> >>>>
> >>>>
> >>>> <t:if test='checked'>
> >>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
> >>>> checked='checked'/>
> >>>> </t:if>
> >>>> <t:if test='!checked'>
> >>>>
> >>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
> >>>> </t:if>
> >>>>
> >>>>
> >>>> --
> >>>> Thiago H. de Paula Figueiredo
> >>>>
> >>>> ------------------------------****----------------------------**
> >>>> --**---------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**a**pache.org<
> http://apache.org>
> >>>> <users-unsubscribe@**tapestry.apache.org<
> users-unsubscribe@tapestry.apache.org>
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >> --
> >> Thiago H. de Paula Figueiredo
> >>
> >>
> ------------------------------**------------------------------**---------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<
> 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: How to set HTML checkbox from java page
Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
+1. A big plus one.
On Jul 12, 2013, at 5:34 PM, Lance Java <la...@googlemail.com> wrote:
> My personal preference is for the JSTL style
>
> <t:choose>
> <t:when test="test1">value1</t:when>
> <t:when test="test2">value2</t:when>
> <t:otherwise>default</t:otherwise>
> </t:choose>
>
>
> On 12 July 2013 19:54, Thiago H de Paula Figueiredo <th...@gmail.com>wrote:
>
>> On Fri, 12 Jul 2013 14:41:04 -0300, Barry Books <tr...@gmail.com> wrote:
>>
>> I don't like it either. Perhaps it should be
>>>
>>> <t:if test="checked'>
>>> <p:then>
>>> </p:then>
>>> <p:else>
>>> </p:else>
>>> </t:if>
>>
>> IMHO this looks way better then just <p:else>, but I still prefer the two
>> If instances version. Matter of taste, probably.
>>
>>
>>
>>>
>>> On Fri, Jul 12, 2013 at 7:51 AM, Thiago H de Paula Figueiredo <
>>> thiagohp@gmail.com> wrote:
>>>
>>> On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi <
>>>> tawushafeez@gmail.com> wrote:
>>>>
>>>> You can try
>>>>
>>>>>
>>>>> <t:if test='checked'>
>>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>>>> checked='checked'/>
>>>>>
>>>>> <p:else>
>>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>>>> </p:else>
>>>>> </t:if>
>>>> Better yet (I hate using p:else. I think it's quite confusing to have the
>>>> else part inside the if part),
>>>>
>>>>
>>>> <t:if test='checked'>
>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>>> checked='checked'/>
>>>> </t:if>
>>>> <t:if test='!checked'>
>>>>
>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>>> </t:if>
>>>>
>>>>
>>>> --
>>>> Thiago H. de Paula Figueiredo
>>>>
>>>> ------------------------------****----------------------------**
>>>> --**---------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>>> <us...@tapestry.apache.org>
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>> --
>> Thiago H. de Paula Figueiredo
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@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: How to set HTML checkbox from java page
Posted by Lance Java <la...@googlemail.com>.
My personal preference is for the JSTL style
<t:choose>
<t:when test="test1">value1</t:when>
<t:when test="test2">value2</t:when>
<t:otherwise>default</t:otherwise>
</t:choose>
On 12 July 2013 19:54, Thiago H de Paula Figueiredo <th...@gmail.com>wrote:
> On Fri, 12 Jul 2013 14:41:04 -0300, Barry Books <tr...@gmail.com> wrote:
>
> I don't like it either. Perhaps it should be
>>
>> <t:if test="checked'>
>> <p:then>
>> </p:then>
>> <p:else>
>> </p:else>
>> </t:if>
>>
>
> IMHO this looks way better then just <p:else>, but I still prefer the two
> If instances version. Matter of taste, probably.
>
>
>
>>
>> On Fri, Jul 12, 2013 at 7:51 AM, Thiago H de Paula Figueiredo <
>> thiagohp@gmail.com> wrote:
>>
>> On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi <
>>> tawushafeez@gmail.com> wrote:
>>>
>>> You can try
>>>
>>>>
>>>> <t:if test='checked'>
>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>>> checked='checked'/>
>>>>
>>>> <p:else>
>>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>>> </p:else>
>>>> </t:if>
>>>>
>>>>
>>> Better yet (I hate using p:else. I think it's quite confusing to have the
>>> else part inside the if part),
>>>
>>>
>>> <t:if test='checked'>
>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>> checked='checked'/>
>>> </t:if>
>>> <t:if test='!checked'>
>>>
>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>> </t:if>
>>>
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>>
>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>> <us...@tapestry.apache.org>
>>> >
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: How to set HTML checkbox from java page
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 12 Jul 2013 14:41:04 -0300, Barry Books <tr...@gmail.com> wrote:
> I don't like it either. Perhaps it should be
>
> <t:if test="checked'>
> <p:then>
> </p:then>
> <p:else>
> </p:else>
> </t:if>
IMHO this looks way better then just <p:else>, but I still prefer the two
If instances version. Matter of taste, probably.
>
>
> On Fri, Jul 12, 2013 at 7:51 AM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
>> On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi <
>> tawushafeez@gmail.com> wrote:
>>
>> You can try
>>>
>>> <t:if test='checked'>
>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>> checked='checked'/>
>>>
>>> <p:else>
>>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>> </p:else>
>>> </t:if>
>>>
>>
>> Better yet (I hate using p:else. I think it's quite confusing to have
>> the
>> else part inside the if part),
>>
>>
>> <t:if test='checked'>
>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>> checked='checked'/>
>> </t:if>
>> <t:if test='!checked'>
>>
>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>> </t:if>
>>
>>
>> --
>> Thiago H. de Paula Figueiredo
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail:
>> users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How to set HTML checkbox from java page
Posted by Barry Books <tr...@gmail.com>.
I don't like it either. Perhaps it should be
<t:if test="checked'>
<p:then>
</p:then>
<p:else>
</p:else>
</t:if>
On Fri, Jul 12, 2013 at 7:51 AM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi <
> tawushafeez@gmail.com> wrote:
>
> You can try
>>
>> <t:if test='checked'>
>> <input type='checkbox' name='leaf' id='leaf' value='leaf'
>> checked='checked'/>
>>
>> <p:else>
>> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>> </p:else>
>> </t:if>
>>
>
> Better yet (I hate using p:else. I think it's quite confusing to have the
> else part inside the if part),
>
>
> <t:if test='checked'>
> <input type='checkbox' name='leaf' id='leaf' value='leaf'
> checked='checked'/>
> </t:if>
> <t:if test='!checked'>
>
> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
> </t:if>
>
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: How to set HTML checkbox from java page
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi
<ta...@gmail.com> wrote:
> You can try
>
> <t:if test='checked'>
> <input type='checkbox' name='leaf' id='leaf' value='leaf'
> checked='checked'/>
>
> <p:else>
> <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
> </p:else>
> </t:if>
Better yet (I hate using p:else. I think it's quite confusing to have the
else part inside the if part),
<t:if test='checked'>
<input type='checkbox' name='leaf' id='leaf' value='leaf'
checked='checked'/>
</t:if>
<t:if test='!checked'>
<input type='checkbox' name='leaf' id='leaf' value='leaf'/>
</t:if>
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How to set HTML checkbox from java page
Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
You can try
<t:if test='checked'>
<input type='checkbox' name='leaf' id='leaf' value='leaf' checked='checked'/>
<p:else>
<input type='checkbox' name='leaf' id='leaf' value='leaf'/>
</p:else>
</t:if>
regards
Taha
On 12-Jul-2013, at 7:37 AM, newbie newbie <co...@gmail.com> wrote:
> Hi.
> I am using the HTML checkbox with a Tree. When I use the Checkbox
> component(tapestry) with Tree, it gives me error and I don't know how to
> solve it. So I try with HTML checkbox. Do you have any idea on how to use
> Checkbox component(tapestry) with Tree?
>
>
> On Fri, Jul 12, 2013 at 9:46 AM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
>> Hi!
>>
>> Yeah, I think my suggestion wasn't correct. I apologize.
>>
>> One question: why don't you want to use the Checkbox component and use a
>> regular HTML one instead?
>>
>>
>> On Thu, 11 Jul 2013 22:04:23 -0300, newbie newbie <co...@gmail.com>
>> wrote:
>>
>> Hi,
>>> The solution below is not working
>>> <input type="checkbox" name="leaf" id="leaf" value="leaf"
>>> checked="${checked}"/>
>>>
>>> public String getChecked() {
>>> if (shouldBeChecked()) {
>>> return "checked";
>>> }
>>> else {
>>> return "";
>>> The checkbox is always checked. I think once you write the "checked"
>>> attribute, the checkbox will be checked. I need to checked some checkbox
>>> but leave the rest unchecked.
>>>
>>>
>>> On Thu, Jul 11, 2013 at 10:06 PM, Thiago H de Paula Figueiredo <
>>> thiagohp@gmail.com> wrote:
>>>
>>> On Thu, 11 Jul 2013 05:12:53 -0300, newbie newbie <co...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>>> I am using plain HTML checkbox(not Tapestry type). I need to set the
>>>>> checkbox to checked in my java page. How do I do that?
>>>>>
>>>>> Here is my tml code fragment
>>>>>
>>>>> <input type="checkbox" name="leaf" id="leaf" value="leaf"/>
>>>>>
>>>>>
>>>> <input type="checkbox" name="leaf" id="leaf" value="leaf"
>>>> checked="${checked}"/>
>>>>
>>>> public String getChecked() {
>>>> if (shouldBeChecked()) {
>>>> return "checked";
>>>> }
>>>> else {
>>>> return "";
>>>>
>>>> }
>>>> }
>>>>
>>>>
>>>>
>>>>> Any help would be appreciated. Thanks.
>>>>>
>>>>>
>>>>
>>>> --
>>>> Thiago H. de Paula Figueiredo
>>>>
>>>> ------------------------------****----------------------------**
>>>> --**---------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>>> <us...@tapestry.apache.org>
>>>>>
>>>>
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>
>> --
>> Thiago H. de Paula Figueiredo
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@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: How to set HTML checkbox from java page
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 11 Jul 2013 23:07:58 -0300, newbie newbie <co...@gmail.com>
wrote:
> Hi.
Hi!
> I am using the HTML checkbox with a Tree. When I use the Checkbox
> component(tapestry) with Tree, it gives me error and I don't know how to
> solve it.
The recommended approach is to understand the error first. That's what you
should do. With your approach, you may end up wasting a lot of time doing
something more complex than you needed.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How to set HTML checkbox from java page
Posted by newbie newbie <co...@gmail.com>.
Hi.
I am using the HTML checkbox with a Tree. When I use the Checkbox
component(tapestry) with Tree, it gives me error and I don't know how to
solve it. So I try with HTML checkbox. Do you have any idea on how to use
Checkbox component(tapestry) with Tree?
On Fri, Jul 12, 2013 at 9:46 AM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> Hi!
>
> Yeah, I think my suggestion wasn't correct. I apologize.
>
> One question: why don't you want to use the Checkbox component and use a
> regular HTML one instead?
>
>
> On Thu, 11 Jul 2013 22:04:23 -0300, newbie newbie <co...@gmail.com>
> wrote:
>
> Hi,
>> The solution below is not working
>> <input type="checkbox" name="leaf" id="leaf" value="leaf"
>> checked="${checked}"/>
>>
>> public String getChecked() {
>> if (shouldBeChecked()) {
>> return "checked";
>> }
>> else {
>> return "";
>> The checkbox is always checked. I think once you write the "checked"
>> attribute, the checkbox will be checked. I need to checked some checkbox
>> but leave the rest unchecked.
>>
>>
>> On Thu, Jul 11, 2013 at 10:06 PM, Thiago H de Paula Figueiredo <
>> thiagohp@gmail.com> wrote:
>>
>> On Thu, 11 Jul 2013 05:12:53 -0300, newbie newbie <co...@gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>>> I am using plain HTML checkbox(not Tapestry type). I need to set the
>>>> checkbox to checked in my java page. How do I do that?
>>>>
>>>> Here is my tml code fragment
>>>>
>>>> <input type="checkbox" name="leaf" id="leaf" value="leaf"/>
>>>>
>>>>
>>> <input type="checkbox" name="leaf" id="leaf" value="leaf"
>>> checked="${checked}"/>
>>>
>>> public String getChecked() {
>>> if (shouldBeChecked()) {
>>> return "checked";
>>> }
>>> else {
>>> return "";
>>>
>>> }
>>> }
>>>
>>>
>>>
>>>> Any help would be appreciated. Thanks.
>>>>
>>>>
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>>
>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>> <us...@tapestry.apache.org>
>>> >
>>>
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: How to set HTML checkbox from java page
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
Hi!
Yeah, I think my suggestion wasn't correct. I apologize.
One question: why don't you want to use the Checkbox component and use a
regular HTML one instead?
On Thu, 11 Jul 2013 22:04:23 -0300, newbie newbie <co...@gmail.com>
wrote:
> Hi,
> The solution below is not working
> <input type="checkbox" name="leaf" id="leaf" value="leaf"
> checked="${checked}"/>
>
> public String getChecked() {
> if (shouldBeChecked()) {
> return "checked";
> }
> else {
> return "";
> The checkbox is always checked. I think once you write the "checked"
> attribute, the checkbox will be checked. I need to checked some checkbox
> but leave the rest unchecked.
>
>
> On Thu, Jul 11, 2013 at 10:06 PM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
>> On Thu, 11 Jul 2013 05:12:53 -0300, newbie newbie <co...@gmail.com>
>> wrote:
>>
>> Hi,
>>> I am using plain HTML checkbox(not Tapestry type). I need to set the
>>> checkbox to checked in my java page. How do I do that?
>>>
>>> Here is my tml code fragment
>>>
>>> <input type="checkbox" name="leaf" id="leaf" value="leaf"/>
>>>
>>
>> <input type="checkbox" name="leaf" id="leaf" value="leaf"
>> checked="${checked}"/>
>>
>> public String getChecked() {
>> if (shouldBeChecked()) {
>> return "checked";
>> }
>> else {
>> return "";
>>
>> }
>> }
>>
>>
>>>
>>> Any help would be appreciated. Thanks.
>>>
>>
>>
>> --
>> Thiago H. de Paula Figueiredo
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail:
>> users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How to set HTML checkbox from java page
Posted by newbie newbie <co...@gmail.com>.
Hi,
The solution below is not working
<input type="checkbox" name="leaf" id="leaf" value="leaf"
checked="${checked}"/>
public String getChecked() {
if (shouldBeChecked()) {
return "checked";
}
else {
return "";
The checkbox is always checked. I think once you write the "checked"
attribute, the checkbox will be checked. I need to checked some checkbox
but leave the rest unchecked.
On Thu, Jul 11, 2013 at 10:06 PM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> On Thu, 11 Jul 2013 05:12:53 -0300, newbie newbie <co...@gmail.com>
> wrote:
>
> Hi,
>> I am using plain HTML checkbox(not Tapestry type). I need to set the
>> checkbox to checked in my java page. How do I do that?
>>
>> Here is my tml code fragment
>>
>> <input type="checkbox" name="leaf" id="leaf" value="leaf"/>
>>
>
> <input type="checkbox" name="leaf" id="leaf" value="leaf"
> checked="${checked}"/>
>
> public String getChecked() {
> if (shouldBeChecked()) {
> return "checked";
> }
> else {
> return "";
>
> }
> }
>
>
>>
>> Any help would be appreciated. Thanks.
>>
>
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: How to set HTML checkbox from java page
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 11 Jul 2013 05:12:53 -0300, newbie newbie <co...@gmail.com>
wrote:
> Hi,
> I am using plain HTML checkbox(not Tapestry type). I need to set the
> checkbox to checked in my java page. How do I do that?
>
> Here is my tml code fragment
>
> <input type="checkbox" name="leaf" id="leaf" value="leaf"/>
<input type="checkbox" name="leaf" id="leaf" value="leaf"
checked="${checked}"/>
public String getChecked() {
if (shouldBeChecked()) {
return "checked";
}
else {
return "";
}
}
>
>
> Any help would be appreciated. Thanks.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org