Re: Wicket Dynamic Navigation

2011-10-03 Thread Nelson Segura
To be fair, there is code in the web site he pointed at. Look under
"Beispielcode" link. I don't speak a lick of german, but it is not
hard to figure out that is the code, and under the web apps directory
there is some code that can be useful

wicket-praxis-code\de.wicketpraxis--webapp\src\main\java\de\wicketpraxis\web\components\paging\OffsetPagePanel.java

There is a lot more code there too.

-Nelson

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Wicket Dynamic Navigation

2011-10-03 Thread leaosou
Hi Kai Mütz,

Why don't you show some code? Don't you think this is better than
advertising a book?
The site your link point to does not show any code but only talk about the
book.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Dynamic-Navigation-tp2228587p3869216.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket Dynamic Navigation

2010-05-25 Thread Steve Mactaggart
Sorry Gmail sent before I was finished. Just take what was before and where
the List view's populateListItem method goes, implement the list view's
method with something like:

 protected void populateItem(ListItem item)
{
   item.add(new MenuItemPanel("menu", item.getModel());
}

That way you can have more that 2 levels too.

Also please forgive the code, it is rushed in the gmail editor and has not
been even close to compiled.

Steve

On Tue, May 25, 2010 at 10:24 PM, Steve Mactaggart <
st...@whitesquaresoft.com> wrote:

> I guess the other issue is what is the data like?
>
> If you had a class called MenuItem that had a name and a List as
> children then you could create a panel
>
> MenuItemPanel extends Panel {
>
>   public MenuItemPanel(String id, IModel model) {
>   {
> super(id, model);
>
> add(new Label("category", model.getModelObject().getName());
>
> ListView menuOptions = new ListView("menus",
> model.getModelObject().getChildren()) {
> protected void populateItem(ListItem item) {
>
> };
>
> add(menuOptions);
>
>   }
>
> }
>
>
> On Tue, May 25, 2010 at 1:02 AM, vp143 wrote:
>
>>
>> I forgot to mention that I require the HTML markup to be like the
>> following:
>>
>> 
>>Category 1
>>Category 2
>>
>>
>>     # Category 2 - Sub category 1 
>> # Category 2 - Sub category 2 
>>
>>
>> 
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Wicket-Dynamic-Navigation-tp2228587p2228687.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: Wicket Dynamic Navigation

2010-05-25 Thread Steve Mactaggart
I guess the other issue is what is the data like?

If you had a class called MenuItem that had a name and a List as
children then you could create a panel

MenuItemPanel extends Panel {

  public MenuItemPanel(String id, IModel model) {
  {
super(id, model);

add(new Label("category", model.getModelObject().getName());

ListView menuOptions = new ListView("menus",
model.getModelObject().getChildren()) {
protected void populateItem(ListItem item) {

};

add(menuOptions);

  }

}


On Tue, May 25, 2010 at 1:02 AM, vp143  wrote:

>
> I forgot to mention that I require the HTML markup to be like the
> following:
>
> 
>Category 1
>Category 2
>
>
> # Category 2 - Sub category 1 
> # Category 2 - Sub category 2 
>
>
> 
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Dynamic-Navigation-tp2228587p2228687.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


RE: Wicket Dynamic Navigation

2010-05-24 Thread vp143

Unfortunately my knowledge of German is non-existent. Thanks for your reply
though.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Dynamic-Navigation-tp2228587p2228741.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Wicket Dynamic Navigation

2010-05-24 Thread Kai Mutz
I have read a solution for this in a german wicket book called "Praxisbuch
Wicket" which you can use as a starting point. But I do not know how good
your German is.

http://www.hanser.de/buch.asp?isbn=978-3-446-41909-4

vp143  wrote:
> I forgot to mention that I require the HTML markup to be like the
> following:
>
> 
> Category 1
> Category 2
> 
>   
># Category 2 - Sub category 1 
># Category 2 - Sub category 2 
>   
> 
> 



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket Dynamic Navigation

2010-05-24 Thread vp143

I forgot to mention that I require the HTML markup to be like the following:


Category 1
Category 2


 # Category 2 - Sub category 1 
 # Category 2 - Sub category 2 



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Dynamic-Navigation-tp2228587p2228687.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket Dynamic Navigation

2010-05-24 Thread Vishal Popat
Hi,

 

I am looking to build a 1-2 level left navigation where the first level is a
list of categories and the 2nd is a list of optional sub categories. 

 

I have tried various ways of designing this in wicket such as a DataView for
level 1 and another DataView for level 2 which is inside a wicket enclosure.
The problem I encountered here is that level 2 component already exists when
it come to outputting the 2nd item in level 1.

 

Any thoughts on design or an example (as I have yet been unable to find one)
would be greatly appreciated.

 

Regards

 

Vishal