JqGrid compound cell with wiquery component

40 views
Skip to first unread message

bimsimsala

unread,
Mar 22, 2011, 5:42:48 PM3/22/11
to wiquery-plugins
Hi,
i'm using jqgrid wiquery implementation with compound cells
(overriding getCellPopulator of GridColumnModel). it works pretty well
as long as i use normal components.
when it comes to wiquery components that should be renderes inside a
cell i'm facing the problem, that just the half of the wiquery render
cycle is executed. the statement() method, which delivers the
javascript to initialize the component is not getting called.

How could we add the mechanism to call these javascripts after the row
data have been inserted? Btw, before rendering the page do we need to
invoke the contribute() method to add required javascript (jquery
plugin) files.

Thx for your comments

Ernesto Reinaldo Barreiro

unread,
Mar 23, 2011, 3:25:10 AM3/23/11
to wiquery...@googlegroups.com
Hi,

I'm afraid you will not be able to use other wiquery components as
cell's content :-( Neither you could use wicket components that
requiere executing JavaScript the wicket way (e.g. implementing
IHeaderContributor). The reason why this will not work is that jqgrid
uses jQuery's AJAX implementation to fetch server side contents
(data).... so the request we receive on server side is not a Wicket
AJAX request. Thus, we have cloned some wickets AJAX classes to
implement the server side rendering of components and generate the XML
with the data needed by the grid... but at client side it is jqgrid
who will render the data (and will not use any of Wicket's client side
machinery:-(

One thing you could try is create components that do not use Wicket or
wiquery script contributions. E.g.

<wicket:panel>
<div wicket:id="bla">
</div>
<script wicket:id="script">
${}.... // your generated script here...
</script>
</wicket:panel>

I haven't tried the above myself but it might work. NOTE: With this
approach you will have to contribute all CSS and JavaScript manually.

This limitation is one of the main reasons why I prefer to use [1] in
my applications.

Best,

Ernesto

References.

1-http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.TablePage

bimsimsala

unread,
Mar 23, 2011, 10:59:01 AM3/23/11
to wiquery-plugins
Hi,
thanks for your reply.
I'll try your suggested walkaround.

What are other advantages/disadvantages of antilia grid over jqgrid?
Could you please give us some more info on this topic?

What is the framework behind this grid implementation?

Thx

On 23 Mrz., 08:25, Ernesto Reinaldo Barreiro <reier...@gmail.com>
wrote:
> 1-http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage...

Ernesto Reinaldo Barreiro

unread,
Mar 23, 2011, 11:04:48 AM3/23/11
to wiquery...@googlegroups.com
Antilia grid is just grid I have built using jquery for column drag
and drop... It is a normal Wicket component... it does not provides
all the rich functionality provided by jqgrid but it is more
extensible (configurable) as it uses default wicket machinery.

Best,

Ernesto

Reply all
Reply to author
Forward
0 new messages