have you tried
final WebMarkupContainer gridviewcontainer=new WebMarkupContainer();
gridviewcontainer.setOutputMarkupId(true);
gridviewcontainer.add(new gridview(...));
gridviewcontainer.add(new ajaxpagingnavigator(...) {
onAjaxEvent(target) { target.add(gridviewcontainer); }
}
this is a common practice with repeaters, you cannot repaint them directly,
but rather have to repaint some container higher above.
by default ajaxpagingnavigator repaints the ipageable, when that is a
<table> tag (datatable) it works fine, when it isnt you have to do a bit
more work.
-igor
On 4/19/07, Lec <[EMAIL PROTECTED]> wrote:
Hie Igor,
Just to provide more info on the"GridView doesn't work in
AjaxPagingNavigator" part in case you don't get what I mean, when I said
it's not working in AjaxPagingNavigator, I actually mean, the data manage
to
display onto the GridView, but when I try to click onto other page number,
the displayed data still remain on the same page of the GridView. Any
idea?
Lec wrote:
>
> Hie Igor,
> I need to check with you. I noticed GridView only works in
> PagingNavigator but not in AjaxPagingNavigator, and to have it working
in
> AjaxPagingNavigator, I tried implementing a "IPageable" interface into
> GridView but it wasn't fruitful. As far as I know and If im right about
> this, based on the javadoc I read, I came to know that GridView is not
> allowed be "IPageable" as GridView inherits
> "wicket.extensions.markup.html.repeater.pageable.AbstractPageableView"
> that have a final method of getPageCount, this is the method which we
need
> to override if we were to implement a "IPageable" interface in GridView
> right? But this method is final and cannot be overriden. Am I missing
> anything here? Is there any workaround to this? It would be great if you
> can provide me a pointer as to how to get "pageable" behaviour in
> GridView. Thanks
>
>
> igor.vaynberg wrote:
>>
>> so what you want is an ajaxified gridview
>>
>> what you need is AjaxPagingNavigator which we already have, and
>> AjaxFallbackOrderByBorder which we also already have.
>>
>> then you just need to create a panel that encapsulate and connects the
>> gridview and the aforementioned two components - just like datatable
>> does.
>>
>> -igor
>>
>>
>> and your own version of orderbylink but
>> On 1/16/07, Daniele Dellafiore <[EMAIL PROTECTED]> wrote:
>>>
>>> I want to provide different views of my data. Ajaxified table is good
>>> for multiple-columns view where columns are "name" "title" "address"
>>> and so on.
>>> The layout I have with the use of a GridView is such that each cell
>>> have all informations, so in cell 1,1 displays the entry number 1 with
>>> the picture and below a label with "name, title, address" on multiple
>>> lines. Cell 1,2 have the second entry and so on.
>>> In DataTable a single entry data are spaned over the row. What I want
>>> is that all data of a single entry stay in a single cell.
>>>
>>> What I expect is to tell my view how many columns I have and a row is
>>> created when there is no more column available. This is what a
>>> GridView already does.
>>>
>>> What I want is to obtain an ajaxified component that wraps a GridView
>>> like the AjaxFallbackDefaultDataTable does with DataGridView
>>> inheriting from DataTable. In this way I Can obtain the ajax-behavior
>>> when changing pages and resorting data.
>>>
>>> On 1/16/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>>> > i dont get what you are trying to describe, can you try again?
>>> >
>>> > are you trying to ajaxify the gridview?
>>> > use datatable to show non-tabular data?
>>> >
>>> > -igor
>>> >
>>> >
>>> >
>>> > On 1/16/07, Daniele Dellafiore <[EMAIL PROTECTED]> wrote:
>>> > >
>>> > > Hi. I am using a AjaxFallbackDefaultDataTable to display some
search
>>> > > results and this is good for typical multiple-columns layout.
>>> > > I want results also to be displayed in a "grid" layout, where a
>>> whole
>>> > > single result stays in a single cell (an image and a text label
>>> > > below).
>>> > >
>>> > > I can't figure out how to do with a DataTable but I can do this
with
>>> a
>>> > > GridView but I want the ajaxified version... So I have explored
the
>>> > > various options wicket offers to display data and I have some
>>> > > problems.
>>> > > Before starting, I have noticed an error the wiki here:
>>> > > http://cwiki.apache.org/WICKET/tables-and-grids.html
>>> > > maybe this informations are just out of date?
>>> > >
>>> > > Back to the problem: DataTable wraps a DataGridView, so my
question
>>> is:
>>> > > there is a way to obtain my desired layout with a DataGridView and
>>> so
>>> > > from a DataTable? Or, have I to use GridView instead?
>>> > >
>>> > > I have tried to build a solution following the second way, making
a
>>> > > sort of DataTable that wraps a GridView, the code is taken from
>>> > > original DataTable. This was simple, both GridView and
DataGridView
>>> > > extends BaseDataView and there are just some different methods
>>> > > (setRows instead of setRowsPerPage...)
>>> > > Problems arise when I try to make the ajaxified version due to the
>>> > > fact that a lot of components used by AjaxFallbackDefaultDataTable
>>> > > make direct use of DataTable... This difficoulties to me seem
>>> related
>>> > > to the fact that inheritance is often used where probably would
have
>>> > > given more power to user that wanted to extends funcionality and
>>> > > behavior of existing classes. Maybe this is just an impression due
>>> to
>>> > > the fact I am new to wicket...
>>> > >
>>> > > Any advice is welcome, thanks.
>>> > >
>>> > >
>>> >
>>>
-------------------------------------------------------------------------
>>> > > Take Surveys. Earn Cash. Influence the Future of IT
>>> > > Join SourceForge.net's Techsay panel and you'll get the chance to
>>> share
>>> > your
>>> > > opinions on IT & business topics through brief surveys - and earn
>>> cash
>>> > >
>>> >
>>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>> > > _______________________________________________
>>> > > Wicket-user mailing list
>>> > > [email protected]
>>> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
>>> > >
>>> >
>>> >
>>> >
>>>
-------------------------------------------------------------------------
>>> > Take Surveys. Earn Cash. Influence the Future of IT
>>> > Join SourceForge.net's Techsay panel and you'll get the chance to
>>> share
>>> your
>>> > opinions on IT & business topics through brief surveys - and earn
cash
>>> >
>>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>> >
>>> > _______________________________________________
>>> > Wicket-user mailing list
>>> > [email protected]
>>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>>> >
>>> >
>>> >
>>>
>>>
-------------------------------------------------------------------------
>>> Take Surveys. Earn Cash. Influence the Future of IT
>>> Join SourceForge.net's Techsay panel and you'll get the chance to
share
>>> your
>>> opinions on IT & business topics through brief surveys - and earn cash
>>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>> _______________________________________________
>>> Wicket-user mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>>
>>
>>
-------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/How-to-get-desired-DataTable-layout-tf3022626.html#a10083448
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user