How to populate checkbox value?

View: New views
4 Messages — Rating Filter:   Alert me  

How to populate checkbox value?

by Andreas Smigielski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

i would like to change the Value in a input checkbox from a iterative template Model:

<table border="1" summary="TestModel Table">
  <tr align="left" class="Dir::Block_Iterate_Start.TestModel"><td> </td></tr>
  <tr align="left" class="Dir::Iterate_Next.TestModel">
    <th class="Dir::Get_Data.TestModel.RowNumber">
      <input class="Dir::Get_Data.TestModel.SampleData" type="checkbox"
              name="MyTest" value="Test 1">Row 1
    </th>
  </tr>
  <tr align="left" class="Dir::Block_Iterate_End.TestModel"><td> </td></tr>
</table>

Code where i try to change the value:

if (key.equals("SampleData")) {
    box++;
    BToggleButton checkbox = new BToggleButton(BInput.CHECKBOX,
                            "MyTest", "MyBox " + box, false);
    return checkbox;
}

This doesn't work. The Iterative Model displays several rows and I see always the old value="Test 1" of the old checkbox in the resulting page.
I need several checkboxes with the same name.

How can i change the value in this checkbox?

Regards,
Andreas.




--

Barracuda mailing list

Barracuda@...

http://www.objectweb.org/wws/lists/projects/barracuda


Re: How to populate checkbox value?

by Andreas Smigielski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Freitag, den 06.07.2007, 15:17 +0200 schrieb Andreas Smigielski:

> Hello,
>
> i would like to change the Value in a input checkbox from a iterative template Model:
>
> <table border="1" summary="TestModel Table">
>   <tr align="left" class="Dir::Block_Iterate_Start.TestModel"><td> </td></tr>
>   <tr align="left" class="Dir::Iterate_Next.TestModel">
>     <th class="Dir::Get_Data.TestModel.RowNumber">
>       <input class="Dir::Get_Data.TestModel.SampleData" type="checkbox"
>               name="MyTest" value="Test 1">Row 1
>     </th>
>   </tr>
>   <tr align="left" class="Dir::Block_Iterate_End.TestModel"><td> </td></tr>
> </table>
I have solved this already. The input element must be enclosed by e.g.
<td> ... </td>, then the Model works.

Regards,
Andreas.





--

Barracuda mailing list

Barracuda@...

http://www.objectweb.org/wws/lists/projects/barracuda


Re: How to populate checkbox value?

by Jacob Kjome :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


So, you're saying that if you use <td> instead of <th> it works fine,
but <th> causes things to fail?  What version of Barracuda are you
using?  Are you using XMLC 2.2.xx or 2.3?

Jake

At 03:30 PM 7/12/2007, you wrote:
 >Am Freitag, den 06.07.2007, 15:17 +0200 schrieb Andreas Smigielski:
 >> Hello,
 >>
 >> i would like to change the Value in a input checkbox from a
 >iterative template Model:
 >>
 >> <table border="1" summary="TestModel Table">
 >>   <tr align="left"
class="Dir::Block_Iterate_Start.TestModel"><td> </td></tr>
 >>   <tr align="left" class="Dir::Iterate_Next.TestModel">
 >>     <th class="Dir::Get_Data.TestModel.RowNumber">
 >>       <input class="Dir::Get_Data.TestModel.SampleData" type="checkbox"
 >>               name="MyTest" value="Test 1">Row 1
 >>     </th>
 >>   </tr>
 >>   <tr align="left" class="Dir::Block_Iterate_End.TestModel"><td> </td></tr>
 >> </table>
 >
 >I have solved this already. The input element must be enclosed by e.g.
 ><td> ... </td>, then the Model works.
 >
 >Regards,
 >Andreas.
 >
 >
 >
 >
 >--
 >Barracuda mailing list
 >Barracuda@...
 >http://www.objectweb.org/wws/lists/projects/barracuda





--

Barracuda mailing list

Barracuda@...

http://www.objectweb.org/wws/lists/projects/barracuda


Re: How to populate checkbox value?

by Andreas Smigielski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Donnerstag, den 12.07.2007, 23:45 -0500 schrieb Jacob Kjome:
> So, you're saying that if you use <td> instead of <th> it works fine,
> but <th> causes things to fail?  What version of Barracuda are you
> using?  Are you using XMLC 2.2.xx or 2.3?

Barracuda 2.1, XMLC 2.2.14

I say if I use only <th> on both statements then only the first
Dir::Get_Data will be executed. If I use <th> or <td> on the next
statement then also the second Dir::Get_Data will be executed.

<th class="Dir::Get_Data.TestModel.RowNumber">Row 1
  <td> <input class="Dir::Get_Data.TestModel.SampleData"
        type="checkbox" name="MyTest" value="Test 1">
  </td>
</th>

works.

Andreas.

> At 03:30 PM 7/12/2007, you wrote:
>  >Am Freitag, den 06.07.2007, 15:17 +0200 schrieb Andreas Smigielski:
>  >> Hello,
>  >>
>  >> i would like to change the Value in a input checkbox from a
>  >iterative template Model:
>  >>
>  >> <table border="1" summary="TestModel Table">
>  >>   <tr align="left"
> class="Dir::Block_Iterate_Start.TestModel"><td> </td></tr>
>  >>   <tr align="left" class="Dir::Iterate_Next.TestModel">
>  >>     <th class="Dir::Get_Data.TestModel.RowNumber">
>  >>       <input class="Dir::Get_Data.TestModel.SampleData" type="checkbox"
>  >>               name="MyTest" value="Test 1">Row 1
>  >>     </th>
>  >>   </tr>
>  >>   <tr align="left" class="Dir::Block_Iterate_End.TestModel"><td> </td></tr>
>  >> </table>
>  >
>  >I have solved this already. The input element must be enclosed by e.g.
>  ><td> ... </td>, then the Model works.
>  >
>  >Regards,
>  >Andreas.
>  >
>  >
>  >
>  >
>  >--
>  >Barracuda mailing list
>  >Barracuda@...
>  >http://www.objectweb.org/wws/lists/projects/barracuda
>
>
> einfaches Textdokument-Anlage (message-footer.txt)
>
> --
>
> Barracuda mailing list
>
> Barracuda@...
>
> http://www.objectweb.org/wws/lists/projects/barracuda
>
--





--

Barracuda mailing list

Barracuda@...

http://www.objectweb.org/wws/lists/projects/barracuda

LightInTheBox - Buy quality products at wholesale price