 |
Dojo Dijit widgets and jMaki
Posted by carlavmott on February 12, 2008 at 04:13 PM | Comments (9)
We just posted the jMaki wrappers for many of the Dojo Dijit 1.0.2 widgets. Widgets wrapped include the grid, tabbed view, tree, accordion, button, fisheye, calendar and more. All the widgets support the jMaki data models as described on the wiki pages here.
Follow the instructions on Ludo's blog to add the library to NetBeans IDE or simply unzip the file in your jMaki web app and add the appropriate tags to you page.
Enjoy!
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Hi Carla Thank you very much. Yet when I tried dojo.dijit.grid with service="/getjason.do" where /getjason.do returns a jason like the followings, there is no output. But this works fine with yahoo.dataTable. Do you know why? Thank you!
jsp file
<a:widget name="yahoo.dataTable" service="/getjason.do" />
<a:widget name="dojo.dijit.grid" service="/getjason.do" />
/getjason.do output
{columns : [
{ label : 'Cust id', id : 'title'},
{ label :'Author', id : 'author'},
{ label : 'ISBN', id : 'isbn'},
{ label : 'Description', id : 'description'}
],
rows : [
{ title : 'Book Title 1', author : 'Author 1', isbn: '4412', description : 'A Some long description'},
{ id : 'bar', title : 'Book Title 2', author : 'Author 2', isbn : '4412', description : 'A Some long description'}
]
}
Posted by: wc2006 on February 22, 2008 at 03:12 AM
-
I'm looking at this now. I will get back to you when I have some info.
Carla
Posted by: carlavmott on February 22, 2008 at 01:29 PM
-
Thank you Carla! I have tried to look at dijit grid's component.js and found that at line 338 it uses dojo.xhrGet instead of jmaki's doajax. Sorry I am not familiar with the dojo library. Looking forward to your finding! Thanks
Posted by: wc2006 on February 23, 2008 at 06:30 PM
-
Hi Carla, me again. Is this problem related to "Using document.getElementById will not work since the DOM has been modified by Dojo" Does it mean that Dojo cannot be used together with other libraries? Or workaround exists? Thanks
Posted by: wc2006 on February 23, 2008 at 06:47 PM
-
Hi,
The problem is that the response is an object containing more than the data. I have code to get the data but I'm seeing problems when rendering the table.
We do create our own container to place the grid in ( and other Dojo widgets too). I have not seen problems using it with other libraries as we namespace everything just to avoid naming problems.
The code that will pick up the data correctly follows,
starting a line 344 the following lines need to replace what is there now:
load: function (type,response,evt) {
if (response == false) {
container.innerHTML = "Data format error loading data from " + wargs.service;
} else {
var data = eval ('('+response.xhr.responseText+')');
Posted by: carlavmott on February 23, 2008 at 08:43 PM
-
It works. Thank you Carla! Allow 2 more questions? 1)For this dijit grid, do you know how to set the column width dynamically according to the width of the column data? 2)And can we enable the horizontal scroll bar? Thank you! ~Wilfred
Posted by: wc2006 on February 24, 2008 at 07:01 PM
-
Hai Experts ..
Iam new to jmakii...
I wondered by seeing web pages created using jmaki.
Now i trying to use it in my projects..
Iam using Netbeans Ide..
I want to include Jmaki Dijit widget , where as iam ving Jmaki googole ,jmakidojo widgets..
i had downloaded jmaki dijit1.1 but i dont no how to add the this widhet in netbeans ide..
Please i need your help..
Thanks in advance
By
Shanmu
Posted by: shanmu on March 28, 2008 at 01:51 AM
-
Hi Shanmu,
the latest NebBeans plugin has both dojo and dijit widgets. But if you want to add the dijit lib see ludo's blog for step by step instructions on adding widget libs. http://weblogs.java.net/blog/ludo/archive/2007/01/extending_the_j.html
carla
Posted by: carlavmott on March 31, 2008 at 02:05 PM
-
wilfred,
I don't know of a way to automatically set the width of a column and I thought that horizontal scroll bar was added automatically based on the data set but looks like that is not the case. I need to look at this more closely.
Carla
Posted by: carlavmott on March 31, 2008 at 02:18 PM
|