You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by hubert_hupe <hu...@gmx.de> on 2011/06/08 17:28:37 UTC
navigation menu
hi guys,
i have no clue how to create a simple navigation bar like this: http://net.tutsplus.com/tutorials/javascript-ajax/a-different-top-navigation/
if possible i need images for the headlines.
when you move the mouse over the menu it drops down - there are millions of website with this functionality.
the problem is: i have to ceate the menu dynamically. the informations which menuitem should be in the menu comes from the database. so i cannot use a static javascript code in the html file.
is anybody there who can give me a hint or even an example?
best regards
hubert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: navigation menu
Posted by hubert_hupe <hu...@gmx.de>.
hi,
thanks for the hint thats the thing iam looking for. unfortunately i cannot run the example. i get the following error message: "Index cannot be resolved to a type"
there is no method or class names Index...
regards
hubert
private List<MenuItem> buildMenu() {
//Create one seperator menu item
MenuItem seperatorMenuItem = new MenuItem(true);
//Define Primary Menu items (menuText,destinationWebPage)
//MenuItem primaryMenu1 = new MenuItem("MENU 1", new Index());
MenuItem primaryMenu1 = new MenuItem("MENU 1", new Index()); << ERROR Index cannot be resolved to a type
Am 08.06.2011 um 17:51 schrieb Fatih Mehmet Ucar:
> http://code.google.com/p/wicket-menu/
>
> Not complete but if you see the source code, it will give you an idea.
>
> cheers,
> -fatih
>
> On 8 June 2011 16:28, hubert_hupe <hu...@gmx.de> wrote:
>> hi guys,
>>
>> i have no clue how to create a simple navigation bar like this: http://net.tutsplus.com/tutorials/javascript-ajax/a-different-top-navigation/
>> if possible i need images for the headlines.
>> when you move the mouse over the menu it drops down - there are millions of website with this functionality.
>> the problem is: i have to ceate the menu dynamically. the informations which menuitem should be in the menu comes from the database. so i cannot use a static javascript code in the html file.
>> is anybody there who can give me a hint or even an example?
>>
>> best regards
>>
>> hubert
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
Re: navigation menu
Posted by Fatih Mehmet UCAR <fm...@gmail.com>.
Well at the beginning of my email I stated that it is not complete. I don't
there is a way to do it directly, but you may wanna change the code or use
some pieces to make it the way you want it, better than starting from
scratch. Take a look at the source of both components and then you can
create your own.
cheers,
fatih
-----Original Message-----
From: hubert_hupe
Sent: Thursday, June 09, 2011 15:31 PM
To: users@wicket.apache.org
Subject: Re: navigation menu
hi,
the wicket menu works fairly (
http://www.cooldatasoft.com/wicket-menu-demo/wicket/bookmarkable/com.cooldatasoft.page.SunriseGlossDropDownMenuDemo?1
)
the problem at the moment is that the target page (p1) replaces the current
page where the menu is inside.
is there a way to define a target container/DIV where the target page should
be shown? for example like this: http://wicketstuff.org/wicket/navomatic/
regards hubert
i used the component in this way:
final testMenu p1 = new testMenu();
//Define Primary Menu items (menuText,destinationWebPage)
MenuItem primaryMenu1 = new MenuItem("MENU 1",p1);
List<MenuItem> primaryMenuList = new ArrayList<MenuItem>();
primaryMenuList.add(primaryMenu1);
add(new SunriseGlossDropDownMenu("sunriseGlossMenu", primaryMenuList));
markup:
<div wicket:id="sunriseGlossMenu"></div>
Am 08.06.2011 um 21:33 schrieb Peter Karich:
Am 08.06.2011 um 17:51 schrieb Fatih Mehmet Ucar:
> http://code.google.com/p/wicket-menu/
>
> Not complete but if you see the source code, it will give you an idea.
>
> cheers,
> -fatih
>
> On 8 June 2011 16:28, hubert_hupe <hu...@gmx.de> wrote:
>> hi guys,
>>
>> i have no clue how to create a simple navigation bar like this:
>> http://net.tutsplus.com/tutorials/javascript-ajax/a-different-top-navigation/
>> if possible i need images for the headlines.
>> when you move the mouse over the menu it drops down - there are millions
>> of website with this functionality.
>> the problem is: i have to ceate the menu dynamically. the informations
>> which menuitem should be in the menu comes from the database. so i cannot
>> use a static javascript code in the html file.
>> is anybody there who can give me a hint or even an example?
>>
>> best regards
>>
>> hubert
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: navigation menu
Posted by hubert_hupe <hu...@gmx.de>.
hi,
the wicket menu works fairly ( http://www.cooldatasoft.com/wicket-menu-demo/wicket/bookmarkable/com.cooldatasoft.page.SunriseGlossDropDownMenuDemo?1 )
the problem at the moment is that the target page (p1) replaces the current page where the menu is inside.
is there a way to define a target container/DIV where the target page should be shown? for example like this: http://wicketstuff.org/wicket/navomatic/
regards hubert
i used the component in this way:
final testMenu p1 = new testMenu();
//Define Primary Menu items (menuText,destinationWebPage)
MenuItem primaryMenu1 = new MenuItem("MENU 1",p1);
List<MenuItem> primaryMenuList = new ArrayList<MenuItem>();
primaryMenuList.add(primaryMenu1);
add(new SunriseGlossDropDownMenu("sunriseGlossMenu", primaryMenuList));
markup:
<div wicket:id="sunriseGlossMenu"></div>
Am 08.06.2011 um 21:33 schrieb Peter Karich:
Am 08.06.2011 um 17:51 schrieb Fatih Mehmet Ucar:
> http://code.google.com/p/wicket-menu/
>
> Not complete but if you see the source code, it will give you an idea.
>
> cheers,
> -fatih
>
> On 8 June 2011 16:28, hubert_hupe <hu...@gmx.de> wrote:
>> hi guys,
>>
>> i have no clue how to create a simple navigation bar like this: http://net.tutsplus.com/tutorials/javascript-ajax/a-different-top-navigation/
>> if possible i need images for the headlines.
>> when you move the mouse over the menu it drops down - there are millions of website with this functionality.
>> the problem is: i have to ceate the menu dynamically. the informations which menuitem should be in the menu comes from the database. so i cannot use a static javascript code in the html file.
>> is anybody there who can give me a hint or even an example?
>>
>> best regards
>>
>> hubert
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
Re: navigation menu
Posted by Peter Karich <pe...@yahoo.de>.
Hi,
why not use the 'tutsplus' code which you like and bind the links to
bookmarkable pages?
You could also inject some variables (e.g. the urls) into javascript
from wicket:
private HeaderContributor contrib = new HeaderContributor(
new IHeaderContributor() {
@Override
public void renderHead(IHeaderResponse response) {
PageParameters params = new PageParameters();
params.add("myparam", "true");
String url = RequestUtils.toAbsolutePath(urlFor(MyPage1.class,
params).toString());
response.renderJavascript("var myurl1 = '" + url + "';",
"myjsinjection");
}
});
of course this should be injected before the external code:
public void init(final PageParameters parameters) {
add(contrib);
add(new HeaderContributor(
new IHeaderContributor() {
public void renderHead(IHeaderResponse response) {
response.renderJavascriptReference("js/external.js");
}
}));}
Would this help?
Regards,
Peter.
> http://code.google.com/p/wicket-menu/
>
> Not complete but if you see the source code, it will give you an idea.
>
> cheers,
> -fatih
>
> On 8 June 2011 16:28, hubert_hupe <hu...@gmx.de> wrote:
>> hi guys,
>>
>> i have no clue how to create a simple navigation bar like this: http://net.tutsplus.com/tutorials/javascript-ajax/a-different-top-navigation/
>> if possible i need images for the headlines.
>> when you move the mouse over the menu it drops down - there are millions of website with this functionality.
>> the problem is: i have to ceate the menu dynamically. the informations which menuitem should be in the menu comes from the database. so i cannot use a static javascript code in the html file.
>> is anybody there who can give me a hint or even an example?
>>
>> best regards
>>
>> hubert
--
http://jetwick.com open twitter search
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: navigation menu
Posted by Fatih Mehmet Ucar <fm...@gmail.com>.
http://code.google.com/p/wicket-menu/
Not complete but if you see the source code, it will give you an idea.
cheers,
-fatih
On 8 June 2011 16:28, hubert_hupe <hu...@gmx.de> wrote:
> hi guys,
>
> i have no clue how to create a simple navigation bar like this: http://net.tutsplus.com/tutorials/javascript-ajax/a-different-top-navigation/
> if possible i need images for the headlines.
> when you move the mouse over the menu it drops down - there are millions of website with this functionality.
> the problem is: i have to ceate the menu dynamically. the informations which menuitem should be in the menu comes from the database. so i cannot use a static javascript code in the html file.
> is anybody there who can give me a hint or even an example?
>
> best regards
>
> hubert
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org