Hey guys, I'm new to Wicket and trying to learn everything I can.

I'm looking at the AjaxFallbackDefaultDataTable and like how the top left
corner displays a item counter + total items.

I'm currently trying to do that to my DataView that I have created.
<wicket:extend xmlns:wicket="http://wicket.apache.org";>

        *Search Results*: 
        

        

                        ID
                        Name
                        Type
                        Sub Type
                        Instrument
        
        

                        [id]
                        [name] 
                        [type]
                        [type]
                        [instrument]
        
        

        [dataview navigator]

</wicket:extend>

What I want to do is eventually calculate the item counter so I'm learning
that I can probably do that if I use the DataView.getCurrentPage(). When the
first time I run this application and I do my search the current page does
show up, but when I click on the PagingNavigator on page two the current
page message does not show up for me. So what I did was override the
PagingNavigator's onBeforeRender function so that every time I click on the
PagingNavigator page it will give me that page. Which it does.

My issue now is that displaying the  within onBeforeRender will give me an
error.
Last cause: Unable to find component with id 'resultCount' in
[TransparentWebMarkupContainer [Component id = wicket_extend2]]
        Expected: 'wicket_child1:wicket_extend2.resultCount'.
        Found with similar names: 'navigator:resultCount'

I'm not really understanding what that error means and I'm probably doing
this incorrectly. What is the correct way to create the item counter + total
item for my dataView. And also I was reading on the forms saying that maybe
I should create my own AjaxFallbackDefaultDataTable, are there examples on
this.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Creating-My-Own-AjaxFallbackDefaultDataTable-tp4657089.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to