spring mvc - Dojo grid: load data from html markup -


i'm using dojox.grid.datagrid displaying data, in second request sent server data. i'm using spring mvc, , hence fill data (from markup) using model data in view (using jstl, exact). , i'm no getting near in achieving this, since cant find way data inside grid via html markup. dojo grid supports filling data via script (store)?

i found dojox.data.htmlstore made use of. making sure there's no better solution.

yes, dojox.grid.datagrid can defined using html markup.

sample code:

<table data-dojo-type="dojox.grid.datagrid" >   <thead>     <tr>       <th field="fieldname" >col1</th>       <th field="fieldname" >col2</th>     </tr>   </thead> </table> 

so in jsp have logic generate above structure.

more info can found here

and data part can this:

 <table data-dojo-type="dojox.grid.datagrid" >       <thead>         <tr>           <th field="fieldname" get="mydata.getcol1">col1</th>           <th field="fieldname" get="mydata.getcol2">col2</th>         </tr>       </thead>     </table> 

javascript function:

mydata.getcol1 = function(colindex,item){   return "<place actual content jstl variables here>"; };  while  

the above solution works not smarter way, please use store , return constructed json object server.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -