Hi,

as I see, you want to interact a lot with your table. The table solution may be 
better if you just want to display data.

The List Renderer way might be much better for you.

I will create a little example List Renderer, and attach it to the Stack 
Overflow example mentioned a few mails ago.

Greetz Christopher

Am 31.10.2013 um 10:42 schrieb tedi tedi 
<[email protected]<mailto:[email protected]>>:

I used the qx.mobile.embed.Html widget and i generated the html code to create 
my table: this is the table:

<div style="overflow:auto;"><table style="border:1px solid 
black;border-collapse:collapse;"><tr><th style="border:1px solid 
black;border-collapse:collapse;">id</th><th style="border:1px solid 
black;border-collapse:collapse;">sign</th><th style="border:1px solid 
black;border-collapse:collapse;">symbol</th><th style="border:1px solid 
black;border-collapse:collapse;">name</th><th style="border:1px solid 
black;border-collapse:collapse;">description</th><th style="border:1px solid 
black;border-collapse:collapse;">valueToMainUnit</th></tr><tr 
onClick='javascript:qx.core.Init.getApplication().globalData.pages[2].setFormData({"id":6,"userId":1,"sign":"€","symbol":"EUR","name":"Euro","description":"European
 currency","valueToMainUnit":4.4414})' style="cursor:pointer;"><td 
style="border:1px solid black;border-collapse:collapse;">6</td><td 
style="border:1px solid black;border-collapse:collapse;">€</td><td 
style="border:1px solid black;border-collapse:collapse;">EUR</td><td 
style="border:1px solid black;border-collapse:collapse;">Euro</td><td 
style="border:1px solid black;border-collapse:collapse;">European 
currency</td><td style="border:1px solid 
black;border-collapse:collapse;">4.4414</td></tr><tr 
onClick='javascript:qx.core.Init.getApplication().globalData.pages[2].setFormData({"id":9,"userId":1,"sign":"a","symbol":"b","name":"c","description":"d","valueToMainUnit":6})'
 style="cursor:pointer;"><td style="border:1px solid 
black;border-collapse:collapse;">9</td><td style="border:1px solid 
black;border-collapse:collapse;">a</td><td style="border:1px solid 
black;border-collapse:collapse;">b</td><td style="border:1px solid 
black;border-collapse:collapse;">c</td><td style="border:1px solid 
black;border-collapse:collapse;">d</td><td style="border:1px solid 
black;border-collapse:collapse;">6</td></tr></table></div>

I added 
onClick='javascript:qx.core.Init.getApplication().globalData.pages[2].setFormData({"id":9,"userId":1,"sign":"a","symbol":"b","name":"c","description":"d","valueToMainUnit":6})'
 on every table row (<tr>). The thing is that the application works just fine 
on my desktop, but it does not work on my mobile, it does not feel the "click". 
The app also works in a Android Virtual Device. Should I do things in another 
way ? I also tried to do it by adding the class attribute to the table row and 
then adding this to qooxdoo:
q('.MTS_CRUD_tableRow').on("click",function(){qx.core.Init.getApplication().globalData.pages[2].setFormData(unit)});
I also tried to make a simple alert instead of that qx.core.... The alert 
doesn't work either.

I also tried to do it with a ListRenderer, I managed to create the list 
renderer as i wanted it but I don't get that column alignment (although added 
the labels with {flex:1}). If I use the list instead of the table I can easily 
click the listItem on my mobile device, it reacts to my click.

Any ideeas? Thanks


În Miercuri, 30 Octombrie 2013 10:05:40, tedi tedi 
<[email protected]<mailto:[email protected]>> a scris:
Thank you, Cristopher, I think I will go with the qx.mobile.embed.Html widget. 
I didn't know about this qx.bom.Template.render class. It will make my code a 
lot easier to read :-).

I did see your stackoverflow post but I had a hard time after this step: "You 
may use qx.ui.mobile.list.renderer.Default as a good starting point (or just 
copy its content)." I didn't know exactly how to modify it to meet my needs, 
that's why I asked if someone had an example of a customized List Renderer 
class. Although i'll go with the HTML widget, such a class would be helpful in 
the future.

Thanks again for giving your time, and creating those examples !



În Marţi, 29 Octombrie 2013 18:52:35, Christopher Zündorf 
<[email protected]<mailto:[email protected]>> a scris:
Here is a more details playground example:

http://tinyurl.com/otomo36


It includes the possibility to delete a line...

Am 29.10.2013 um 17:37 schrieb Christopher Zündorf 
<[email protected]<mailto:[email protected]>>:

Solution 1:
My first thought was the qx.mobile.embed.Html widget ,too.

If you want to use this solution I would propose to use q to append click 
listeners:

q(„#table-cell-id“).on(„click“,function() {});

A few months ago, I also tried to implement my own qx.Mobile table widget. This 
was only a convenience layer which used a 2-dimensional array and parsed it 
into a table.

Finally I decided that it is much easier to use qx.Mobile templating class and 
apply HTML into the app.

qooxdoo has integrated the templating library „mustache.js“:

https://github.com/janl/mustache.js

With this it is very easy to create a HTML table out of JSON data.

Especially the chapter „Lists“ will be interesting for you.

You could pass an array with your data, and mustache would

Have a look at this example:

http://tinyurl.com/p85xh49


Solution 2:
Writing your own list renderer is quite easy, too. I wrote an explanation on 
Stack Overflow:
http://stackoverflow.com/questions/18833656/qooxdoo-mobile-list-view-item-expandable






Am 29.10.2013 um 15:27 schrieb tedi tedi 
<[email protected]<mailto:[email protected]>>:

Hello,

I want to add a table (datagrid) to my page. I did it now using HTML but it not 
exactly what I was expecting:
http://tinyurl.com/papusnn
Now, I would like to show an Anchor Popup or Anchor Menu ( as seen here 
http://demo.qooxdoo.org/current/mobileshowcase/#%2Fdialog ) whenever I click a 
row. And I would like to let the user choose if he wants to Update/Delete the 
row. I guess it's doable with this HTML object, but I was thinking about a list 
renderer but now I realise that using a list I don't know how to set the table 
head.

Can you guys help me with this?
Thank you !

P.S.: Does anyone have an example of a customized List renderer class and how 
to use it ? thx ^.^
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk_______________________________________________
qooxdoo-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk_______________________________________________
qooxdoo-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk

_______________________________________________
qooxdoo-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk

_______________________________________________
qooxdoo-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to