Re: Manually Rendering a DataGridView

2011-08-01 Thread Matt Schmidt
Gotcha. Is there a way to do this without adding the DGV to the page? In my case, I just want to add an empty table/ tag and pass the would-be rendered HTML of the DGV to a jQuery function that populates the table. Specifically, I am trying to dynamically instantiate a jQuery DataTables using the

Re: Manually Rendering a DataGridView

2011-08-01 Thread Martin Grigorov
See https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/datatables-parent On Mon, Aug 1, 2011 at 3:54 PM, Matt Schmidt mschmid...@gmail.com wrote: Gotcha. Is there a way to do this without adding the DGV to the page? In my case, I just want to add an empty table/ tag and pass the

Re: Manually Rendering a DataGridView

2011-08-01 Thread Matt Schmidt
I already have a WiQuery plugin/behavior that does basically the same thing. It renders the table's HTML to the page, then jQuery has to parse through it and put it in the DOM to initialize. It gets awfully slow with a lot of data. That's why I'm trying to not render the table to the HTML at all,

Re: Manually Rendering a DataGridView

2011-08-01 Thread Pedro Santos
I don't think you can because page carries some renderer state. What do you think about use a transient page? one with just one component slot available to you plug any component you want, visit children, extract the info you need to assemble the JavaScript, and discard its instance to be garbage

Re: Manually Rendering a DataGridView

2011-07-31 Thread Pedro Santos
Hi, I had a similar need and used the code at TableParser[1] to render the component tree to a mock response and later get its char sequence. 1 - https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/wicket-poi-parent/wicket-poi/src/main/java/org/wicketstuff/poi/excel/TableParser.java

Re: Manually Rendering a DataGridView

2011-07-31 Thread Matt Schmidt
So after calling tableParser.parse(myDataGridView), how do I get the the char sequence? Or iterate over each row to get the char sequence for each cell? I don't see any public methods for that. On Sunday, July 31, 2011, Pedro Santos pedros...@gmail.com wrote: Hi, I had a similar need and used

Re: Manually Rendering a DataGridView

2011-07-31 Thread Pedro Santos
The char sequence is returned by mockResponse.getText() Sure, there are no public methods and would be a good idea to refectory the code and move the mock response logic to other place. You can use an IVisitor to visit cells in you component tree, create a mock response to render them and use its

Manually Rendering a DataGridView

2011-07-29 Thread Matt Schmidt
Is there any way to access the HTML of each cell that would be rendered in a DataGridView without adding it to the page and actually rendering it? Ultimately, I am trying to add all of the inner HTML of the cells of the DataGridView to a JavaScript array.