Css for panel
I have a component that extends panel. I need to add css customization to this panel. I can include the css in the over all site CSS, but I like to separate the CSS for this panel. For example, MyPanel.java MyPanel.html MyPanel.css I like to have MyPanel.css included in the header of the html when ever MyPanel is used. How do I do this with wicket 6.0 ?? Thank you. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Css for panel
Thank you all. On Wed, Aug 29, 2012 at 1:49 PM, Paul Bors p...@bors.ws wrote: See Including CSS resources at: https://cwiki.apache.org/WICKET/including-css-resources.html This is also covered by all of the books on Wicket: http://wicket.apache.org/learn/books/ You should invest into such a Book. Personally I suggest Wicket in Action since its authors are Wicket developers and you see their names in many of the replies on those mailing lists :) http://wicket.apache.org/learn/books/wia.html ~ Thank you, Paul Bors -Original Message- From: ronny.v...@consult.nordea.com [mailto:ronny.v...@consult.nordea.com] Sent: Wednesday, August 29, 2012 1:31 PM To: users@wicket.apache.org Subject: RE: Css for panel Hi Actually I am pretty new with Wicket, but I give it a shot... :-) @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.renderCSSReference(YOUR_CSS_REF); } private static final ResourceReference YOUR_CSS_REF = new PackageResourceReference(... -Original Message- From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com] Sent: 29 August 2012 19:20 To: users Subject: Css for panel I have a component that extends panel. I need to add css customization to this panel. I can include the css in the over all site CSS, but I like to separate the CSS for this panel. For example, MyPanel.java MyPanel.html MyPanel.css I like to have MyPanel.css included in the header of the html when ever MyPanel is used. How do I do this with wicket 6.0 ?? Thank you. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Navigation bar links
I am looking to produce the following mark up: ul lia href=/Home/a/li li class=current About/li lia href=contactContact us/a/li ul the problem is I can not add a conditionally to li. I am using ListView to populate the Items. Can someone give me a hint about how to achieve this ?? Thank you in advance.
Re: Navigation bar links
Thank you a lot. Both methods did the trick. One last question in the same context. This is the code I am working with: list.add(new BookmarkablePageLinkWebPage(link, HomePage.class)); list.add(new BookmarkablePageLinkWebPage(link, About.class)); list.add(new BookmarkablePageLinkWebPage(link, ContactUs.class)); @SuppressWarnings(unchecked) ListView listview = new ListView(listview, list) { protected void populateItem(ListItem item) { BookmarkablePageLinkWebPage lnk = (BookmarkablePageLinkWebPage) item .getModelObject(); String requestedUrl = getRequest().getUrl().getPath(); String linkUrl = getRequestCycle().urlFor( lnk.getPageClass() , new PageParameters()).toString().substring(2); logger.debug(requested : + requestedUrl); logger.debug(current link : + linkUrl); Label label = new Label(lbl, lnk.getId()); lnk.add(label); item.add(lnk); if (linkUrl.equals(requestedUrl)) { logger.debug(matched link with requested url); // lnk.setRenderBodyOnly(true); lnk.setEnabled(false); } } }; add(listview); I am trying to compare the requested URL to the link url. I need to obtain the link url. It's no clear to me how to do it in clean way. I am using: String linkUrl = getRequestCycle().urlFor( lnk.getPageClass() , new PageParameters()).toString().substring(2); This introduced a problem. It works fine if the page is mounted on some path. But if the link url is something like: wicket/bookmarkable/com.example.MyPage Then it breaks. Is there a better way to obtain the url for each link ?? Thank you. On Tue, Aug 21, 2012 at 2:55 AM, Martin Grigorov mgrigo...@apache.orgwrote: Or you can do link.setRenderBodyOnly(true); On Tue, Aug 21, 2012 at 9:30 AM, Sven Meier s...@meiers.net wrote: You can use a disabled link, which will render as a span. Sven On 08/21/2012 08:10 AM, Mansour Al Akeel wrote: I am looking to produce the following mark up: ul lia href=/Home/a/li li class=current About/li lia href=contactContact us/a/li ul the problem is I can not add a conditionally to li. I am using ListView to populate the Items. Can someone give me a hint about how to achieve this ?? Thank you in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Highlight current/clicked AjaxLink
Marco, thank you. I have implemented already the pages as a panel to be replaced, and this was a requirement to do it with ajax. So I can not follow this route at this point. But what you have here is the exact functionality I am after. It will be nice if I can disable the current link, but I need to at least show it's current in the style. On Mon Mar 28,2011 08:46 am, Marco Springer wrote: Hi Mansour For reloading different pages I'm using BookmarkablePageLink (non-ajax), that have the option for setAutoEnable(true)'. When this option is set for each BookmarkablePageLink and one BookmarkablePageLink is clicked on the website, the generated HTML for that link is changed. For example: My current page is Home and the other available page link is the Gallery. spanemHome/em/span a href=galleryGallery/a After clicking on the Gallery button: a href=homeHome/a spanemGallery/em/span I think this does the job perfectly, in my case... Perhaps you can apply it for your case as well. For a more detailed description: http://wicketstuff.org/wicket14/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.BookmarkablePageLinkPage G'luck Marco. On 28 March 2011 07:48, Mansour Al Akeel mansour.alak...@gmail.com wrote: Josh, Yes each link is reloading a different page, and the list of the links is not rebuilt. Only the contents part of the page. What would your css alternative solution be ? How can I get the clicked link disabled and assing it a class, excluding the rest of the links, without breaking the ajax functionality for the AjaxLink ? On Mon Mar 28,2011 07:51 am, Josh Kamau wrote: hi. Have you tried something like ?myLink.add(new AttributeAppender(...)); or myLink.add(new AttributeModifier(...)) this methods can add/modify a css class in a markup element. Please check the javadocs for method details if this is what you want. However, if i were in your situation, i would use css only to archieve this , that is , if each link reloads a different page. Josh. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Highlight current/clicked AjaxLink
Josh, I tried to run the app, but I couldn't resolve an issue with maven. May be you have seen something similar before. I had deleted the corresponding wicket/1.4.12 direcotry from maven repo to forse it to re download, but no luck. I am using maven 3. Do I need to install all these required projects manaully ? Apache Maven 3.0.1 (r1038046; 2010-11-23 05:58:32-0500) Java version: 1.6.0_24 Java home: /opt/sun-jdk-1.6.0.24/jre Default locale: en_US, platform encoding: ANSI_X3.4-1968 OS name: linux version: 2.6.36-gentoo-r5 arch: amd64 Family: unix [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.josh:demoapp:war:1.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.mortbay.jetty:maven-jetty-plugin is missing. @ line 174, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 163, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-eclipse-plugin is missing. @ line 178, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] [INFO] Building demoapp 1.0-SNAPSHOT [INFO] [INFO] [INFO] maven-jetty-plugin:6.1.22:run (default-cli) @ demoapp [WARNING] The POM for org.apache.wicket:wicket:jar:1.4.12 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.apache.wicket:wicket-extensions:jar:1.4.12 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.apache.wicket:wicket-guice:jar:1.4.12 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for com.google.inject:guice-servlet:jar:2.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for com.wideplay.warp:warp-persist:jar:2.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.hibernate:hibernate-entitymanager:jar:3.5.1-Final is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.hibernate:hibernate-validator:jar:4.0.2.GA is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ demoapp --- [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 2 resources [INFO] Copying 12 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ demoapp --- [WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent! [INFO] Compiling 25 source files to /home/mansour/downloads/demoapp/demoapp/target/classes [INFO] - [ERROR] COMPILATION ERROR : [INFO] - [ERROR] error: error reading /home/mansour/.m2/repository/org/apache/wicket/wicket/1.4.12/wicket-1.4.12.jar; error in opening zip file [ERROR] error: error reading /home/mansour/.m2/repository/org/apache/wicket/wicket-extensions/1.4.12/wicket-extensions-1.4.12.jar; error in opening zip file [ERROR] error: error reading /home/mansour/.m2/repository/org/apache/wicket/wicket-guice/1.4.12/wicket-guice-1.4.12.jar; error in opening zip file [ERROR] error: error reading /home/mansour/.m2/repository/com/google/inject/guice-servlet/2.0/guice-servlet-2.0.jar; error in opening zip file [ERROR] error: error reading /home/mansour/.m2/repository/com/wideplay/warp/warp-persist/2.0/warp-persist-2.0.jar; error in opening zip file [ERROR] error: error reading /home/mansour/.m2/repository/org/hibernate/hibernate-entitymanager/3.5.1-Final/hibernate-entitymanager-3.5.1-Final.jar; error in opening zip file [ERROR] error: error reading /home/mansour/.m2/repository/org/hibernate/hibernate-validator/4.0.2.GA/hibernate-validator-4.0.2.GA.jar; error in opening zip file [INFO] 7 errors [INFO] - [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time:
Re: Navigation and Adding Panels dynamically.
Martin, I could not find any help using this extension. May be I missed something somewhere. Let's look at a peice of code of what I am trying to do: private void setScreen(String screen) { try { Panel myPanel; myPanel = (Panel) Class.forName(com.mycompany.components.+screen).newInstance(); screenPanel.replaceWith(myPanel); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } } So assuming I need to display a screen called EditUserScreen, I need to load myPanel = (Panel) Class.forName(com.mycompany.components.EditUserScreen).newInstance(); With the above code everything works fine. But Nothing is replaced. I mean it executes with with no error, but the new panel is not shown. One more thing to mention, if I add additional components in the EditUserScreen Panel class, without adding them in the html, I see NO error generated ! Is't correct to conclude that the html template for EditUserScreen is never parsed, and instead the Panle.java is used ? Shouldn't the old panel should be removed in this case, at least? On Fri Mar 25,2011 03:06 pm, Mansour Al Akeel wrote: Thank you Martin, I had a quick look at extension. I will try a small application with it soon. However my requirement are a bit more complex, as I need to load Panels by string. So let's say I have a String called EditUserScreen, then I need to dynamically load this panel. I am not sure yet if the wizard extension can do this, but will try it anyway. If you know something else that can work for these requirements please advice me. On Fri Mar 25,2011 12:37 pm, Martin Grigorov wrote: See Wizard component in wicket-extensions. You'll need custom logic to check whether the previous/next wizard step should be shown to the current user depending on its privileges. On Fri, Mar 25, 2011 at 1:57 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: I do have the need to implement different screens. Each screen is a Panel that will be displayed when requested from the screens menu. The screen menu should display the items depending on the functionality the user has access to. Can some one point me to an article or a tutorial with similar requirements ? I trully appreciate any help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Navigation and Adding Panels dynamically.
Vineet, thank you for replying. I don't think this is the issue, because the panels I am creating, have their Id's set directly in the constructor. For example, public EditUserScreen(){ super(workScreen); setOutputMarkupPlaceholderTag(true); setOutputMarkupId(true); } And basically they all have the same Id. However, I don't think this has anything to do with creation of the Panels anymore. I have just tried something like: EditUserScreen screen = new EditUserScreen(); currentPanel.replaceWith(screen); currentPanel = screen; Still nothing changed. So it doesn't look to me like the wat I am creating the panel is the problem. I think there is issues with the way I am using replaceWith method. Any ideas ? On Sun Mar 27,2011 01:50 pm, vineet semwal wrote: Foo.class.newInstance() will use zero arg constructor which is not possible because panel has no zero arg. constructor so basically you got the exception at that line itself :) just pass the panel id in screen method and one enum which helps you in identifying the panel type you want to create and then create a panel instance in a normal way etc. what you want to do.. On Sun, Mar 27, 2011 at 12:56 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Martin, I could not find any help using this extension. May be I missed something somewhere. Let's look at a peice of code of what I am trying to do: ? ?private void setScreen(String screen) { ? ? ? ? ? ?try { ? ? ? ? ? ? ? ? ? ?Panel myPanel; ? ? ? ? ? ? ? ? ? ?myPanel = (Panel) Class.forName(com.mycompany.components.+screen).newInstance(); ? ? ? ? ? ? ? ? ? ?screenPanel.replaceWith(myPanel); ? ? ? ? ? ?} catch (InstantiationException e) { ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); ? ? ? ? ? ?} catch (IllegalAccessException e) { ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); ? ? ? ? ? ?} catch (ClassNotFoundException e) { ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); ? ? ? ? ? ?} ? ?} So assuming I need to display a screen called EditUserScreen, I need to load ? ?myPanel = (Panel) Class.forName(com.mycompany.components.EditUserScreen).newInstance(); With the above code everything works fine. But Nothing is replaced. I mean it executes with with no error, but the new panel is not shown. One more thing to mention, if I add additional components in the EditUserScreen Panel class, without adding them in the html, I see NO error generated ! Is't correct to conclude that the html template for EditUserScreen is never parsed, and instead the Panle.java is used ? Shouldn't the old panel should be removed in this case, at least? On Fri Mar 25,2011 03:06 pm, Mansour Al Akeel wrote: Thank you Martin, I had a quick look at extension. I will try a small application with it soon. However my requirement are a bit more complex, as I need to load Panels by string. So let's say I have a String called EditUserScreen, then I need to dynamically load this panel. I am not sure yet if the wizard extension can do this, but will try it anyway. If you know something else that can work for these requirements please advice me. On Fri Mar 25,2011 12:37 pm, Martin Grigorov wrote: See Wizard component in wicket-extensions. You'll need custom logic to check whether the previous/next wizard step should be shown to the current user depending on its privileges. On Fri, Mar 25, 2011 at 1:57 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: I do have the need to implement different screens. Each screen is a Panel that will be displayed when requested from the screens menu. The screen menu should display the items depending on the functionality the user has access to. Can some one point me to an article or a tutorial with similar requirements ? I trully appreciate any help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- thank you, regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Navigation and Adding Panels dynamically.
Hello Vineet, I resolved the issue. I didn't add the panel to the Ajax request target. So ajaxRequestTarget.add(currentPanel); solved the issue. Thank you. On Sun Mar 27,2011 02:50 pm, vineet semwal wrote: sorry i wrongly assumed you might not have defined zero arg constructor.. you dont need setOutputMarkupId(true) as you are already using setOutputMarkupPlaceholderTag(true) and yes you are using replacewith correctly ,i dont think there is any problem in this code.. On Sun, Mar 27, 2011 at 2:08 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Vineet, thank you for replying. I don't think this is the issue, because the panels I am creating, have their Id's set directly in the constructor. For example, public EditUserScreen(){ ? ?super(workScreen); ? ?setOutputMarkupPlaceholderTag(true); ? ?setOutputMarkupId(true); } And basically they all have the same Id. However, I don't think this has anything to do with creation of the Panels anymore. I have just tried something like: EditUserScreen screen = new EditUserScreen(); currentPanel.replaceWith(screen); currentPanel = screen; Still nothing changed. So it doesn't look to me like the wat I am creating the panel is the problem. I think there is issues with the way I am using replaceWith method. Any ideas ? On Sun Mar 27,2011 01:50 pm, vineet semwal wrote: Foo.class.newInstance() will use zero arg constructor which is not possible because panel has no zero arg. constructor so basically you got the exception at that line itself ?:) just pass the panel id in screen method and one enum which helps you in identifying the panel type you want to create and then create a panel instance in a normal way etc. what you want to do.. On Sun, Mar 27, 2011 at 12:56 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Martin, I could not find any help using this extension. May be I missed something somewhere. Let's look at a peice of code of what I am trying to do: ? ?private void setScreen(String screen) { ? ? ? ? ? ?try { ? ? ? ? ? ? ? ? ? ?Panel myPanel; ? ? ? ? ? ? ? ? ? ?myPanel = (Panel) Class.forName(com.mycompany.components.+screen).newInstance(); ? ? ? ? ? ? ? ? ? ?screenPanel.replaceWith(myPanel); ? ? ? ? ? ?} catch (InstantiationException e) { ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); ? ? ? ? ? ?} catch (IllegalAccessException e) { ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); ? ? ? ? ? ?} catch (ClassNotFoundException e) { ? ? ? ? ? ? ? ? ? ?e.printStackTrace(); ? ? ? ? ? ?} ? ?} So assuming I need to display a screen called EditUserScreen, I need to load ? ?myPanel = (Panel) Class.forName(com.mycompany.components.EditUserScreen).newInstance(); With the above code everything works fine. But Nothing is replaced. I mean it executes with with no error, but the new panel is not shown. One more thing to mention, if I add additional components in the EditUserScreen Panel class, without adding them in the html, I see NO error generated ! Is't correct to conclude that the html template for EditUserScreen is never parsed, and instead the Panle.java is used ? Shouldn't the old panel should be removed in this case, at least? On Fri Mar 25,2011 03:06 pm, Mansour Al Akeel wrote: Thank you Martin, I had a quick look at extension. I will try a small application with it soon. However my requirement are a bit more complex, as I need to load Panels by string. So let's say I have a String called EditUserScreen, then I need to dynamically load this panel. I am not sure yet if the wizard extension can do this, but will try it anyway. If you know something else that can work for these requirements please advice me. On Fri Mar 25,2011 12:37 pm, Martin Grigorov wrote: See Wizard component in wicket-extensions. You'll need custom logic to check whether the previous/next wizard step should be shown to the current user depending on its privileges. On Fri, Mar 25, 2011 at 1:57 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: I do have the need to implement different screens. Each screen is a Panel that will be displayed when requested from the screens menu. The screen menu should display the items depending on the functionality the user has access to. Can some one point me to an article or a tutorial with similar requirements ? I trully appreciate any help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com
Highlight current/clicked AjaxLink
Hello all, I have created a dynamic menu using AjaxLink. Clicking a link results in dispalying the correcponding class on the screen. It's common, to display the clicked link in a different color/background ... etc. But I wasn't able to find a way to achieve this. Any advice tutorial, article ? I am using 1.5-rc2 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem get selected value using dynamic select with optgroup
I didn't clearly understand the question. But another shot in the dark ;) You mean, is the behaviour of the ajax link depends on the clicked item ? If that's what you mean, then I like to be able to disable the clicked link while viewing the corresponding panel. The second part about the onchange event, I didn't get it at all. Can you please kindly elaborate. I am not new to wicket, but not very advnaced either. Thank you. On Tue Feb 22,2011 11:35 am, Mike Mander wrote: A shot in the dark. Is the behavior required at the select? Or is the option getting the onchange event? Cheers Mike I'm using the select component due to realizing a dynamic optgroup and option list. It works rather fine but my problem is to get the selected value. I tried to use an ajax behavior (AjaxComponentUpdatingBehavior, OnChangeBehavior) but the onUpdate methode is never called -- doesn't work! Maybe there is a solution for my problem!? What I'm doing wrong? My code: Select select = new Select(selectId); select.add(new ListView(optGroups, myList) { @Override protected void populateItem(ListItem item) { MyBean myBean = (MyBean) item.getModelObject(); item.add(new OptGroup(optGroup, myBean.getName(), myBean.getList())); } }); add(select); class OptGroup extends SelectOption { String label; ListMyBean2 list; public OptGroup(String id, String label, ListMyBean2 list) { super(id); this.label = label; this.list = list; init(); } @SuppressWarnings(unchecked) private void init() { this.add(new ListView(grpOptions, list) { @Override protected void populateItem(ListItem item) { MyBean2 myBean2 = (MyBean2) item.getModelObject(); item.add(new CustomSelectOption(grpOption, myBean2.getName())); } }); } protected void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, optgroup); Select select = (Select) findParent(Select.class); if (select == null) { throw new WicketRuntimeException( OptGroup component [ + getPath() + ] cannot find its parent Select. All OptGroup components must be a child of or below in the hierarchy of a Select component.); } tag.put(label, label); } } public class CustomSelectOption extends SelectOption { @SuppressWarnings(unchecked) public CustomSelectOption(String id, String displayValue) { super(id, new Model(displayValue)); } protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, getDefaultModelObjectAsString()); } } I tried this, but it doesn't work: select.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { System.out.println(Update ajax); // @todo updating model } }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Highlight current/clicked AjaxLink
No answer yet. Any thing not clear ? On Sun Mar 27,2011 07:37 pm, Mansour Al Akeel wrote: Hello all, I have created a dynamic menu using AjaxLink. Clicking a link results in dispalying the correcponding class on the screen. It's common, to display the clicked link in a different color/background ... etc. But I wasn't able to find a way to achieve this. Any advice tutorial, article ? I am using 1.5-rc2 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Highlight current/clicked AjaxLink
Bruno, There' no bug here. It's just something I need to do, and unable to find a way to do it with wicket. All I need to do is to highlight the clicked ajaxLink in a list. I am not sure how to add a css class to this link only, knowing that there is other links in this list. I just didn't get any response, so I thought something not clear. On Mon Mar 28,2011 01:13 am, Bruno Borges wrote: Please provide a quickstart with the use case, so we can reproduce the bug. Bruno Borges www.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld On Sun, Mar 27, 2011 at 8:37 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Hello all, I have created a dynamic menu using AjaxLink. Clicking a link results in dispalying the correcponding class on the screen. It's common, to display the clicked link in a different color/background ... etc. But I wasn't able to find a way to achieve this. Any advice tutorial, article ? I am using 1.5-rc2 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Highlight current/clicked AjaxLink
Josh, Yes each link is reloading a different page, and the list of the links is not rebuilt. Only the contents part of the page. What would your css alternative solution be ? How can I get the clicked link disabled and assing it a class, excluding the rest of the links, without breaking the ajax functionality for the AjaxLink ? On Mon Mar 28,2011 07:51 am, Josh Kamau wrote: hi. Have you tried something like myLink.add(new AttributeAppender(...)); or myLink.add(new AttributeModifier(...)) this methods can add/modify a css class in a markup element. Please check the javadocs for method details if this is what you want. However, if i were in your situation, i would use css only to archieve this , that is , if each link reloads a different page. Josh. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Navigation and Adding Panels dynamically.
Thank you Martin, I had a quick look at extension. I will try a small application with it soon. However my requirement are a bit more complex, as I need to load Panels by string. So let's say I have a String called EditUserScreen, then I need to dynamically load this panel. I am not sure yet if the wizard extension can do this, but will try it anyway. If you know something else that can work for these requirements please advice me. On Fri Mar 25,2011 12:37 pm, Martin Grigorov wrote: See Wizard component in wicket-extensions. You'll need custom logic to check whether the previous/next wizard step should be shown to the current user depending on its privileges. On Fri, Mar 25, 2011 at 1:57 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: I do have the need to implement different screens. Each screen is a Panel that will be displayed when requested from the screens menu. The screen menu should display the items depending on the functionality the user has access to. Can some one point me to an article or a tutorial with similar requirements ? I trully appreciate any help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Authorization using JAAS and getting the Principal.
On Tue Mar 22,2011 10:15 pm, Zilvinas Vilutis wrote: https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html#SpringSecurityandWicket-auth-roles-Wicketsetup and call SecureSession.get().getUser() ??ilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Tue, Mar 22, 2011 at 6:13 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Woops forgot to include the way I am getting the request. private User getLoggedInUser() { ?? ??ServletWebRequest servletWebRequest = (ServletWebRequest) RequestCycle .get().getRequest(); ?? ??HttpServletRequest request = servletWebRequest.getContainerRequest(); ?? ??Principal principal = request.getUserPrincipal(); ?? ??User user = (User) principal; ?? ??return user; } I appreciate your help. On Tue Mar 22,2011 08:42 pm, Mansour Al Akeel wrote: Hello all, I am authenticating a user, and it's working fine through our own Jaas module implementation. However, I am trying to get one of the Panels to display based on the logged in user. I am not using wicket-aut yet, and looking to do this by obtaining the Principal implementaton from the HttpServletRequest. I am getting null when I do so. I am trying to avoid diving into wicket specific implementation related to auth because I am a bit on a tight dead line. How would others deal with this issue? If you have a component to be displayed depending on the logged in user, how can I get the logged in user ? Thank you in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Authorization using JAAS and getting the Principal.
Thank you. Will try that. On Thu Mar 24,2011 08:08 pm, Mansour Al Akeel wrote: On Tue Mar 22,2011 10:15 pm, Zilvinas Vilutis wrote: https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html#SpringSecurityandWicket-auth-roles-Wicketsetup and call SecureSession.get().getUser() ??ilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Tue, Mar 22, 2011 at 6:13 PM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Woops forgot to include the way I am getting the request. private User getLoggedInUser() { ?? ??ServletWebRequest servletWebRequest = (ServletWebRequest) RequestCycle .get().getRequest(); ?? ??HttpServletRequest request = servletWebRequest.getContainerRequest(); ?? ??Principal principal = request.getUserPrincipal(); ?? ??User user = (User) principal; ?? ??return user; } I appreciate your help. On Tue Mar 22,2011 08:42 pm, Mansour Al Akeel wrote: Hello all, I am authenticating a user, and it's working fine through our own Jaas module implementation. However, I am trying to get one of the Panels to display based on the logged in user. I am not using wicket-aut yet, and looking to do this by obtaining the Principal implementaton from the HttpServletRequest. I am getting null when I do so. I am trying to avoid diving into wicket specific implementation related to auth because I am a bit on a tight dead line. How would others deal with this issue? If you have a component to be displayed depending on the logged in user, how can I get the logged in user ? Thank you in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Navigation and Adding Panels dynamically.
I do have the need to implement different screens. Each screen is a Panel that will be displayed when requested from the screens menu. The screen menu should display the items depending on the functionality the user has access to. Can some one point me to an article or a tutorial with similar requirements ? I trully appreciate any help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Authorization using JAAS and getting the Principal.
Hello all, I am authenticating a user, and it's working fine through our own Jaas module implementation. However, I am trying to get one of the Panels to display based on the logged in user. I am not using wicket-aut yet, and looking to do this by obtaining the Principal implementaton from the HttpServletRequest. I am getting null when I do so. I am trying to avoid diving into wicket specific implementation related to auth because I am a bit on a tight dead line. How would others deal with this issue? If you have a component to be displayed depending on the logged in user, how can I get the logged in user ? Thank you in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Authorization using JAAS and getting the Principal.
Woops forgot to include the way I am getting the request. private User getLoggedInUser() { ServletWebRequest servletWebRequest = (ServletWebRequest) RequestCycle .get().getRequest(); HttpServletRequest request = servletWebRequest.getContainerRequest(); Principal principal = request.getUserPrincipal(); User user = (User) principal; return user; } I appreciate your help. On Tue Mar 22,2011 08:42 pm, Mansour Al Akeel wrote: Hello all, I am authenticating a user, and it's working fine through our own Jaas module implementation. However, I am trying to get one of the Panels to display based on the logged in user. I am not using wicket-aut yet, and looking to do this by obtaining the Principal implementaton from the HttpServletRequest. I am getting null when I do so. I am trying to avoid diving into wicket specific implementation related to auth because I am a bit on a tight dead line. How would others deal with this issue? If you have a component to be displayed depending on the logged in user, how can I get the logged in user ? Thank you in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Maven archetype and tomcat:run
Martin, thank you. But I don't have servlet.jar in the lib folder. There's no lib folder, since I am using maven archetype. If I have to exclude it from POM.XML then how ? tomcat plugin depends on it ! can you please kindly give me more details ? On Sun, Jul 18, 2010 at 11:16 AM, Martin Grigorov martin.grigo...@gmail.com wrote: Remove servlet.jar from yourApplication.war#WEB-INF/lib/ folder 2010/7/18 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I am trying to run tomcat from maven and including openEJB. The command I am using to run tomcat: mvn tomcat:run The error I am getting : Jul 18, 2010 6:53:29 AM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server Jul 18, 2010 6:53:29 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.26 Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter wicket.site java.lang.ClassCastException: org.apache.wicket.protocol.http.WicketFilter cannot be cast to javax.servlet.Filter at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.startup.Embedded.start(Embedded.java:825) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:533) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:239) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart So I created a webapp project from maven archetype, and added openEjb dependency: dependency groupIdorg.apache.openejb/groupId artifactIdopenejb-core/artifactId version3.1.2/version /dependency The error I am getting now is: Jul 18, 2010 7:02:37 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/jasper/servlet/JasperLoader) previously initiated loading for a different type with name javax/servlet/http/HttpServletRequest at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2444) at java.lang.Class.getDeclaredMethods(Class.java:1808) at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:226
Re: Maven archetype and tomcat:run
Martin, I don't have this depndency in my pom, and it's not in the list of resolved dependencies: here's what I have dependencies dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version${wicket.version}/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-extensions/artifactId version${wicket.version}/version /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.6/version scopetest/scope /dependency dependency groupIdorg.wicketstuff/groupId artifactIdjavaee-inject/artifactId version${wicketstuff.version}/version /dependency dependency groupIdorg.apache.openejb/groupId artifactIdopenejb-core/artifactId version3.1.2/version /dependency dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version${slf4j.version}/version /dependency On Mon, Jul 19, 2010 at 3:07 PM, Martin Grigorov mgrigo...@apache.org wrote: In your pom.xml find the dependency for javax.servlet:servlet-api and add scopeprovided/scope 2010/7/19 Mansour Al Akeel mansour.alak...@gmail.com Martin, thank you. But I don't have servlet.jar in the lib folder. There's no lib folder, since I am using maven archetype. If I have to exclude it from POM.XML then how ? tomcat plugin depends on it ! can you please kindly give me more details ? On Sun, Jul 18, 2010 at 11:16 AM, Martin Grigorov martin.grigo...@gmail.com wrote: Remove servlet.jar from yourApplication.war#WEB-INF/lib/ folder 2010/7/18 Mansour Al Akeel mansour.alak...@gmail.com Hello all: I am trying to run tomcat from maven and including openEJB. The command I am using to run tomcat: mvn tomcat:run The error I am getting : Jul 18, 2010 6:53:29 AM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server Jul 18, 2010 6:53:29 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.26 Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter wicket.site java.lang.ClassCastException: org.apache.wicket.protocol.http.WicketFilter cannot be cast to javax.servlet.Filter at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.startup.Embedded.start(Embedded.java:825) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:533) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:239) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362
Re: Maven archetype and tomcat:run
It runs ok under a standard tomcat installation, and I can do remote debugging. However, it's not as convenient as if it's running from maven, where I can view changes easily. In my case, changes has to be deployed to tomcat installation after re-packaging the war file. When dealing with maven-jetty-plugin (from http://javaadventure.blogspot.com/2010/03/openejb-jetty-and-maven-transaction.html ) I get an exception: Listening for transport dt_socket at address: 4000 [INFO] Scanning for projects... [INFO] [INFO] Building quickstart [INFO]task-segment: [jetty:run] [INFO] [INFO] Preparing jetty:run [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources {execution: default-testResources}] [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [jetty:run {execution: default-cli}] [INFO] Configuring Jetty for project: quickstart [INFO] Webapp source directory = /home/mansour/workspace/Rentals/wicket/src/main/webapp [INFO] Reload Mechanic: automatic [INFO] Classes = /home/mansour/workspace/Rentals/wicket/target/classes [INFO] Configuring Jetty from xml configuration file = /home/mansour/workspace/Rentals/wicket/src/main/jetty/jetty.xml 2010-07-19 16:34:21.916:INFO::Logging to STDERR via org.mortbay.log.StdErrLog Apache OpenEJB 3.1.2build: 20091010-03:11 http://openejb.apache.org/ INFO - openejb.home = /home/mansour/workspace/Rentals/wicket INFO - openejb.base = /home/mansour/workspace/Rentals/wicket INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service) INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager) INFO - Found ClientModule in classpath: /home/mansour/.m2/repository/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar INFO - Found ClientModule in classpath: /home/mansour/.m2/repository/org/mortbay/jetty/start/6.1.22/start-6.1.22.jar INFO - Beginning load: /home/mansour/.m2/repository/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar ERROR - Unable to clear Sun JarFileFactory cache java.lang.ClassCastException: java.lang.String cannot be cast to java.net.URL at org.apache.openejb.ClassLoaderUtil.clearSunJarFileFactoryCache(ClassLoaderUtil.java:173) at org.apache.openejb.ClassLoaderUtil.destroyClassLoader(ClassLoaderUtil.java:130) at org.apache.openejb.ClassLoaderUtil.destroyClassLoader(ClassLoaderUtil.java:97) at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:185) at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:509) at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380) at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:299) at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:278) at org.apache.openejb.OpenEJB$Instance.init(OpenEJB.java:137) at org.apache.openejb.OpenEJB.init(OpenEJB.java:286) at org.apache.openejb.OpenEJB.init(OpenEJB.java:265) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36) at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71) at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53) at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.init(InitialContext.java:197) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at
Maven archetype and tomcat:run
Hello all: I am trying to run tomcat from maven and including openEJB. The command I am using to run tomcat: mvn tomcat:run The error I am getting : Jul 18, 2010 6:53:29 AM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server Jul 18, 2010 6:53:29 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.26 Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter wicket.site java.lang.ClassCastException: org.apache.wicket.protocol.http.WicketFilter cannot be cast to javax.servlet.Filter at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.startup.Embedded.start(Embedded.java:825) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:533) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:239) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart So I created a webapp project from maven archetype, and added openEjb dependency: dependency groupIdorg.apache.openejb/groupId artifactIdopenejb-core/artifactId version3.1.2/version /dependency The error I am getting now is: Jul 18, 2010 7:02:37 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/jasper/servlet/JasperLoader) previously initiated loading for a different type with name javax/servlet/http/HttpServletRequest at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2444) at java.lang.Class.getDeclaredMethods(Class.java:1808) at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:226) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:148) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
Models and panel updates
Hello all, I have been trying to resolve this issue. I have a panel that shows a product info. public class ProductDetails extends Panel { public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new Label(codProduct)); add(new AjaxLinkString(save) { @Override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } when ever I click a link to update the product panel using ajax link, I get the correct info displayed. However, I need to be able to edit the labels in the panel. So I used : add(new AjaxEditableLabelString(codProduct)); I get this: WicketMessage: No get method defined for class: class rentals.entities.Product expression: label In a previous thread, I was advised to use CompoundPropertyModel, and I think it's easier, but why I am getting this ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Models and panel updates
so what should I use in this case? can you give me an example, to update the panel and have ajax fields ? On Thu, Jul 15, 2010 at 3:17 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I would dis-advice you using compoundpropertymodel. Dropping it will make everything more explicit and clear all your problems. Using compoundpropertymodel you will get all kinds of surprises.. sometimes, and spend lot of extra time resolving. ** Martin 2010/7/15 Mansour Al Akeel mansour.alak...@gmail.com: Hello all, I have been trying to resolve this issue. I have a panel that shows a product info. public class ProductDetails extends Panel { public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new Label(codProduct)); add(new AjaxLinkString(save) { �...@override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } when ever I click a link to update the product panel using ajax link, I get the correct info displayed. However, I need to be able to edit the labels in the panel. So I used : add(new AjaxEditableLabelString(codProduct)); I get this: WicketMessage: No get method defined for class: class rentals.entities.Product expression: label In a previous thread, I was advised to use CompoundPropertyModel, and I think it's easier, but why I am getting this ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Models and panel updates
I just tried it. It doesn't update the panel. Here's the full code: public class ProductDetails extends Panel { @EJB private ProductServicesLocal productServices; public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new AjaxEditableLabelString(codProduct, new PropertyModelString((Product)getDefaultModelObject(), codProduct))); add(new AjaxLinkString(save) { @Override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Models and panel updates
Hello Martrin, and Ernesto, it's still not working. I have this ProductPanel to be updated and (possibly edited). It shows the product info when an item is clicked. Here's the code for the Product Panel: public class ProductDetails extends Panel { @EJB private ProductServicesLocal productServices; public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new AjaxEditableLabelString(codProduct, new PropertyModelString(getDefaultModel(), codProduct))); add(new Label(tpVat)); add(new AjaxLinkString(save) { @Override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } And here's the code for the item to update the panel: AjaxLinkString link = new AjaxLinkString(link) { { add(new Label(id, new PropertyModelString(model, id))); } @Override public void onClick(AjaxRequestTarget target) { Product product = item.getModelObject(); productDetails.setCurrentProduct(product); target.addComponent(productDetails); System.out.println(product.getId()); } }; item.add(link); The problem with this code, is the Editable Label doesn't update with the rest of the labels. I mean if I click on an item, it shows me the results for the corresponding product in the Labels, but not in the AjaxEditableLabel. On Thu, Jul 15, 2010 at 3:48 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: you need to add the updated panel into target: target.addComponent(panelToBeUpdated); 2010/7/15 Mansour Al Akeel mansour.alak...@gmail.com: I just tried it. It doesn't update the panel. Here's the full code: public class ProductDetails extends Panel { �...@ejb private ProductServicesLocal productServices; public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new AjaxEditableLabelString(codProduct, new PropertyModelString((Product)getDefaultModelObject(), codProduct))); add(new AjaxLinkString(save) { �...@override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Models and panel updates
Sven, thank you, but it worked when using this ? add(new Label(codProduct)); Is there an easy way to update the default model And the AjaxEditableLabel in the similar fasion? Nice to have an example. Why would the reference be outdated, since ProperyModel is considered dynamic module ? Thank you. On Thu, Jul 15, 2010 at 8:35 PM, Sven Meier s...@meiers.net wrote: Hi, it's the outdated reference problem (as often when something goes wrong with models): new PropertyModelString(getDefaultModel(), codProduct)) Note that you're putting the current default model into another model. Later on you change the default model: setDefaultModel(new CompoundPropertyModelProduct(product)) How should your PropertyModel be aware of this change? BTW Martijn's statement is incorrect: If you look at the source code for AjaxEditableLabel you could've seen that it is not suited for CompoundPropertyModel usage. AjaxEditableLabel is very well capable of working with CompoundPropertyModels, see AjaxEditableLabel#getParentModel(). Regards Sven On 07/15/2010 04:29 PM, Mansour Al Akeel wrote: Hello Martrin, and Ernesto, it's still not working. I have this ProductPanel to be updated and (possibly edited). It shows the product info when an item is clicked. Here's the code for the Product Panel: public class ProductDetails extends Panel { �...@ejb private ProductServicesLocal productServices; public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new AjaxEditableLabelString(codProduct, new PropertyModelString(getDefaultModel(), codProduct))); add(new Label(tpVat)); add(new AjaxLinkString(save) { �...@override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } And here's the code for the item to update the panel: AjaxLinkString link = new AjaxLinkString(link) { { add(new Label(id, new PropertyModelString(model, id))); } �...@override public void onClick(AjaxRequestTarget target) { Product product = item.getModelObject(); productDetails.setCurrentProduct(product); target.addComponent(productDetails); System.out.println(product.getId()); } }; item.add(link); The problem with this code, is the Editable Label doesn't update with the rest of the labels. I mean if I click on an item, it shows me the results for the corresponding product in the Labels, but not in the AjaxEditableLabel. On Thu, Jul 15, 2010 at 3:48 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: you need to add the updated panel into target: target.addComponent(panelToBeUpdated); 2010/7/15 Mansour Al Akeelmansour.alak...@gmail.com: I just tried it. It doesn't update the panel. Here's the full code: public class ProductDetails extends Panel { �...@ejb private ProductServicesLocal productServices; public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new AjaxEditableLabelString(codProduct, new PropertyModelString((Product)getDefaultModelObject(), codProduct))); add(new AjaxLinkString(save) { �...@override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional
Re: Models and panel updates
Sven, thank you. I had a look at the Ajax example. I think you mean that I need to use the PanelDetails class as a model, and create all the properties in it. This is very verbose as the Product class contains many fields that I need to edit, and adding getters/setters to the PanelDetails class will make it big, and the code is repeated. Based on the example, my class should be: public class ProductDetails extends Panel { @EJB private ProductServicesLocal productServices; private Product product; public ProductDetails(String id, Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new AjaxEditableLabelString(codProduct)); add(new AjaxLinkString(save) { @Override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { this.product = product; setDefaultModel(new CompoundPropertyModelProductDetails(this)); } public void setCodProduct(String codProduct) { this.product.setCodProduct(codProduct); } public String getCodProduct() { return this.product.getCodProduct(); } } This brings up a question, what is the best way to wrap domain objects in a Model for easy CRUD and with a minimum amount of coding, and reusing the component (ie, without having to recreate the object) ? On Thu, Jul 15, 2010 at 10:12 PM, Sven Meier s...@meiers.net wrote: Hi, please see EditableLabelPage.java in wicket-examples for AjaxEditableLabels working with a CompoundPropertyModel. Why would the reference be outdated, since ProperyModel is considered dynamic module ? PropertyModel is dynamic in the property it provides, but it is hard-wired on the object you give to its constructor. Hope this helps Sven On 07/15/2010 08:36 PM, Mansour Al Akeel wrote: Sven, thank you, but it worked when using this ? add(new Label(codProduct)); Is there an easy way to update the default model And the AjaxEditableLabel in the similar fasion? Nice to have an example. Why would the reference be outdated, since ProperyModel is considered dynamic module ? Thank you. On Thu, Jul 15, 2010 at 8:35 PM, Sven Meiers...@meiers.net wrote: Hi, it's the outdated reference problem (as often when something goes wrong with models): new PropertyModelString(getDefaultModel(), codProduct)) Note that you're putting the current default model into another model. Later on you change the default model: setDefaultModel(new CompoundPropertyModelProduct(product)) How should your PropertyModel be aware of this change? BTW Martijn's statement is incorrect: If you look at the source code for AjaxEditableLabel you could've seen that it is not suited for CompoundPropertyModel usage. AjaxEditableLabel is very well capable of working with CompoundPropertyModels, see AjaxEditableLabel#getParentModel(). Regards Sven On 07/15/2010 04:29 PM, Mansour Al Akeel wrote: Hello Martrin, and Ernesto, it's still not working. I have this ProductPanel to be updated and (possibly edited). It shows the product info when an item is clicked. Here's the code for the Product Panel: public class ProductDetails extends Panel { �...@ejb private ProductServicesLocal productServices; public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new AjaxEditableLabelString(codProduct, new PropertyModelString(getDefaultModel(), codProduct))); add(new Label(tpVat)); add(new AjaxLinkString(save) { �...@override public void onClick(AjaxRequestTarget target) { System.out.println(saving product ); } }); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } And here's the code for the item to update the panel: AjaxLinkString link = new AjaxLinkString(link) { { add(new Label(id, new PropertyModelString(model, id))); } �...@override
Re: Panel update with Ajax
Sven, thank you. But what about the ajax part. On Tue, Jul 13, 2010 at 7:28 PM, Sven Meier s...@meiers.net wrote: Hi, always when working with PropertyModel make sure that the properties exists. In your case it should probably be: new PropertyModelString(this, model.object.id)) This one is not working as expected. Do you have a ling for an example ? Note that using the CompoundPropertyModel as suggested earlier is much easier. Regards Sven On 07/13/2010 05:16 AM, Mansour Al Akeel wrote: Thank you. I didn't know that wicket will pick the properties without getters. I thought I have to create a getter for each property before it's seen. Now the remaining issues: When I use soemthing like : add(new Label(id, new PropertyModelString(this, model.id))); I get an exception: WicketMessage: No get method defined for class: class org.apache.wicket.model.CompoundPropertyModel expression: id Root cause: org.apache.wicket.WicketRuntimeException: No get method defined for class: class org.apache.wicket.model.CompoundPropertyModel expression: id at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:445) The second issue is when I use add(new AjaxEditableLabelString(codProduct)); and then try to update the panel, I get this exception: WicketMessage: No get method defined for class: class rentals.entities.Product expression: label Root cause: org.apache.wicket.WicketRuntimeException: No get method defined for class: class rentals.entities.Product expression: label at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:445) Any explanation why this is happening ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Panel update with Ajax
Thank you. It worked. But I am missing something. see the comments please. On Sun, Jul 11, 2010 at 6:35 PM, Sven Meier s...@meiers.net wrote: Hi, a usual error when working with models: new PropertyModelString(model, id) Note you're passing around a reference to the initial model. Later updates of this member will not change any other reference held anywhere else. You'd have to do it this way instead: add(new Label(id, new PropertyModelString(this, model.id))); When I use this, the component class should provide the properties. This part I don't understand. I read the wiki about models, but still missing something. But since you're using a CompoundPropertyModel already, why not let is do the heavy lifting? public class ProductDetails extends Panel { public ProductDetails(String id, Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id)); add(new Label(codProduct)); add(new Label(tpVat)); } public void setCurrentProduct(Product product) { setDefaultModel(new CompoundPropertyModelProduct(product)); } } HTH Sven On 07/11/2010 05:54 AM, Mansour Al Akeel wrote: I have a panel that displays a product info : public class ProductDetails extends Panel { private IModelProduct model; public ProductDetails(String id, Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id, new PropertyModelString(model, id))); add(new Label(codProduct, new PropertyModelString(this.model, codProduct))); add(new Label(tpVat, new PropertyModelString(this.model, tpVat))); } public void setCurrentProduct(Product product) { this.model = new CompoundPropertyModelProduct(product); } } I am trying to update it from a link in another panel: AjaxLinkString link = new AjaxLinkString(link) { { add(new Label(id, new PropertyModelString(model, id))); } �...@override public void onClick(AjaxRequestTarget target) { Product product = item.getModelObject(); productDetails.setCurrentProduct(product); target.addComponent(productDetails); System.out.println(target.toString()); } }; item.add(link); Updates are not shown. I believe the issue is with the Model I am using (IModelProduct). However, I don't know the alternative model I should be using (if it's a model issue). Product is a JPA entity. Any ideas ? example ? thanx - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Panel update with Ajax
Thank you. I didn't know that wicket will pick the properties without getters. I thought I have to create a getter for each property before it's seen. Now the remaining issues: When I use soemthing like : add(new Label(id, new PropertyModelString(this, model.id))); I get an exception: WicketMessage: No get method defined for class: class org.apache.wicket.model.CompoundPropertyModel expression: id Root cause: org.apache.wicket.WicketRuntimeException: No get method defined for class: class org.apache.wicket.model.CompoundPropertyModel expression: id at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:445) The second issue is when I use add(new AjaxEditableLabelString(codProduct)); and then try to update the panel, I get this exception: WicketMessage: No get method defined for class: class rentals.entities.Product expression: label Root cause: org.apache.wicket.WicketRuntimeException: No get method defined for class: class rentals.entities.Product expression: label at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:445) Any explanation why this is happening ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Panel update with Ajax
I have a panel that displays a product info : public class ProductDetails extends Panel { private IModelProduct model; public ProductDetails(String id, Product product) { super(id); setOutputMarkupId(true); this.setCurrentProduct(product); add(new Label(id, new PropertyModelString(model, id))); add(new Label(codProduct, new PropertyModelString(this.model, codProduct))); add(new Label(tpVat, new PropertyModelString(this.model, tpVat))); } public void setCurrentProduct(Product product) { this.model = new CompoundPropertyModelProduct(product); } } I am trying to update it from a link in another panel: AjaxLinkString link = new AjaxLinkString(link) { { add(new Label(id, new PropertyModelString(model, id))); } @Override public void onClick(AjaxRequestTarget target) { Product product = item.getModelObject(); productDetails.setCurrentProduct(product); target.addComponent(productDetails); System.out.println(target.toString()); } }; item.add(link); Updates are not shown. I believe the issue is with the Model I am using (IModelProduct). However, I don't know the alternative model I should be using (if it's a model issue). Product is a JPA entity. Any ideas ? example ? thanx - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: SV: Wicket and portlets JSR 286
In fact, I tried to send String as events, and I got the same error. Finally I found that I had to use the full name for the String class java.lang.String . event-definition qname xmlns:x=http://example.com;x:ReportName/qname value-typejava.lang.String/value-type /event-definition It's working now. Thank you. On Wed Jan 06,2010 11:04 am, Wilhelmsen Tor Iver wrote: java.lang.IllegalArgumentException: Payload has not the right class at org.apache.jetspeed.events.EventCoordinationServiceImpl.createEvent(Eve ntCoordinationServiceImpl.java:98) This is the portlet container complaining about: ReportType report = new ReportType(); report.setReportPath(SomePath); response.setEvent(qname, report); Keep in mind that the XML event definition declares both the qualified name and the payload class; Jetspeed apparently checks that the object is of the declared type. What is your event definition? - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket and portlets JSR 286
I am having a problem finding a resource or an example for portlets communications with events processEvent(EventRequest request, EventResponse response) how do I dispatch and event from wicket page? for example if I have a ViewPage and I need to send an event to a subscribed portlet , how do I do it ? Another thing is setting attributes and access them in the Page from the WicketPortlet, After processAction or doView. I need to send some preferences to the edit page. Thank you. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: Wicket and portlets JSR 286
Thank you Tor: I am using wicket 1.4.5. I was able to find some examples for events but I am having difficulties getting my code to work with wicket. Here's a refrence: http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/ In my code I am trying to send the event from onClick, which I think, resulting in an exception: WicketMessage: Method onLinkClicked of interface org.apache.wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = link]] threw an exception Root cause: java.lang.IllegalArgumentException: Payload has not the right class at org.apache.jetspeed.events.EventCoordinationServiceImpl.createEvent(EventCoordinationServiceImpl.java:98) at org.apache.jetspeed.container.providers.EventProviderImpl.createEvent(EventProviderImpl.java:49) at org.apache.pluto.container.impl.StateAwareResponseImpl.setEvent(StateAwareResponseImpl.java:140) at com.sardonyxsolutions.automotive.ReportSelectorView$1.onClick(ReportSelectorView.java:25) at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:224) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) And here's the correspoinding part of my code: public ReportSelectorView() { add(new LinkString(link) { @Override public void onClick() { PortletRequestContext context = (PortletRequestContext) RequestContext .get(); ActionResponse response = (ActionResponse) context .getPortletResponse(); QName qname = new QName(http://example.com;, ReportName); ReportType report = new ReportType(); report.setReportPath(SomePath); response.setEvent(qname, report); System.out.println(Sending Event); } }); } What I think I need to do, is to create an event within processAction(request,responce) method in the portlet. The problem would be to create an action event URL. I am still playing around trying to find my way. If you have any idea please let me know. By the way, I am new to wicket, and I still don't fully understand the concept of Models. Do you think Models can help keeping the code simple and somving the issue in this case ? Any idea or advice, is highly appreciated. On Tue Jan 05,2010 11:50 am, Wilhelmsen Tor Iver wrote: I am having a problem finding a resource or an example for portlets communications with events processEvent(EventRequest request, EventResponse response) how do I dispatch and event from wicket page? for example if I have a ViewPage and I need to send an event to a subscribed portlet , how do I do it ? It seems WicketPortlet does not override GenericPortlet.processEvent() at least as of 1.4.3; try subclassing WicketPortlet and add @ProcessEvent(eventname) annotation to a method of your own. As for routing you should be able to configure that in your container combined with the relevant elements in portlet.xml. Dispatching is done via the PortletResponse.setEvent() as the spec says. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Hello World Portlet
I am trying to understand portlets using wicket. I read on multiple resources, that wicket supports JSR 286 in a transparent way. However, I can not see any reference to a simple portlet application to adopt as the basis for my project and build on top of it. I have checked out the examples from the svn wicket-examples and ran the application with the embeded jetty. But I was not able to find the portlet application runing. After all I find the WicketExamplesMenuPortlet is a bit unclear to me . What I find unclear, is the way it functions. It extends a wicker portlet, but the application is ran from WebApplication instance that mounts EditPage, HeaderPage, and doesn't seem to have any direct link to the WicketPortlet. Any hint ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet Examples/title keywordsWicket/keywords /portlet-info /portlet /portlet-app And my WebApplication class: import javax.servlet.ServletContext; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; public class Application extends WebApplication { @Override public Class? extends Page getHomePage() { return ViewReport.class; } @Override protected void init() { mountBookmarkablePage(/view, ViewReport.class); mountBookmarkablePage(/edit, EditReport.class); servletContext = getWicketFilter().getFilterConfig() .getServletContext(); } private static ServletContext servletContext; } Now, when I deploy to Jetspeed I get this error in catalina.out, and I was not able to find any relevant exception in the logs. I will change the log level and dig further. but I don't know, if there's something wrong with the web.xml or portlet.xml ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet Examples/title keywordsWicket/keywords /portlet-info /portlet /portlet-app And my WebApplication class: import javax.servlet.ServletContext; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; public class Application extends WebApplication { �...@override public Class? extends Page getHomePage() { return ViewReport.class; } �...@override protected void init() { mountBookmarkablePage(/view, ViewReport.class); mountBookmarkablePage(/edit, EditReport.class); servletContext = getWicketFilter().getFilterConfig() .getServletContext(); } private static ServletContext servletContext; } Now, when I deploy to Jetspeed I get this error in catalina.out, and I was not able to find any relevant exception in the logs. I will change the log level and dig further. but I don't know, if there's something wrong with the web.xml or portlet.xml ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
I checked jetspeed.log it but no luck. I was going to change the log level to see what's going on. However, I decided to run my wicket pages as a web application, and found that I was missing the binding for slf4j. I added this to the pom and it worked: dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.8/version /dependency I am not sure if that's what fixed the issue, or something else when I was trying to run it as a web app. It's working anyway. Would it be a good idea to provide a maven archetype for wicket portlets ? On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet Examples/title keywordsWicket/keywords /portlet-info /portlet /portlet-app And my WebApplication class: import javax.servlet.ServletContext; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; public class Application extends WebApplication { �...@override public Class? extends Page getHomePage() { return ViewReport.class; } �...@override protected void init() { mountBookmarkablePage(/view, ViewReport.class); mountBookmarkablePage(/edit, EditReport.class); servletContext = getWicketFilter().getFilterConfig() .getServletContext
Re: Hello World Portlet
Yes, this is JS2.2, but how where you able to tell it it's JSR286 ? In fact this was going to be my next step, to do interportlet communication. If you work with JS, I have to tell you that wicket with JS is amazingly col. You have all the pages you need where they sould be. I am still new to wicket, but enjoying it already :) On Mon Jan 04,2010 04:52 pm, Steve Swinsburg wrote: Absolutely that would be great. BTW I assume this is Jetspeed 2 since its JSR286? On 04/01/2010, at 4:48 PM, Mansour Al Akeel wrote: I checked jetspeed.log it but no luck. I was going to change the log level to see what's going on. However, I decided to run my wicket pages as a web application, and found that I was missing the binding for slf4j. I added this to the pom and it worked: dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.8/version /dependency I am not sure if that's what fixed the issue, or something else when I was trying to run it as a web app. It's working anyway. Would it be a good idea to provide a maven archetype for wicket portlets ? On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param nameeditPage/name value/report/edit/value /init-param supports mime-type*/*/mime-type portlet-modeVIEW/portlet-mode portlet-modeEDIT/portlet-mode /supports supported-localeen/supported-locale portlet-info titleWicket Birt Portlet
Re: Hello World Portlet
I totally forgot I mentioned JSR 286. Thank you. On Mon Jan 04,2010 05:47 pm, Steve Swinsburg wrote: You said in your first post it was JSR286 and Jetspeed 2 implements that spec, whereas Jetspeed 1 is JSR-168. I am glad you have Wicket based portlets working in a JSR-286 container, shame the same can't be said for a JSR-168 container, ie Pluto :( cheers, Steve On 04/01/2010, at 5:17 PM, Mansour Al Akeel wrote: Yes, this is JS2.2, but how where you able to tell it it's JSR286 ? In fact this was going to be my next step, to do interportlet communication. If you work with JS, I have to tell you that wicket with JS is amazingly col. You have all the pages you need where they sould be. I am still new to wicket, but enjoying it already :) On Mon Jan 04,2010 04:52 pm, Steve Swinsburg wrote: Absolutely that would be great. BTW I assume this is Jetspeed 2 since its JSR286? On 04/01/2010, at 4:48 PM, Mansour Al Akeel wrote: I checked jetspeed.log it but no luck. I was going to change the log level to see what's going on. However, I decided to run my wicket pages as a web application, and found that I was missing the binding for slf4j. I added this to the pom and it worked: dependency groupIdorg.slf4j/groupId artifactIdslf4j-log4j12/artifactId version1.5.8/version /dependency I am not sure if that's what fixed the issue, or something else when I was trying to run it as a web app. It's working anyway. Would it be a good idea to provide a maven archetype for wicket portlets ? On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: Sorry, Forgot to include the error message: Found web.xml Found WEB-INF/portlet.xml Attempting to add portlet_2_0.tld to war... Adding portlet_2_0.tld to war... Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/reports-0.5.4] Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive reports-0.5.4.war Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/reports-0.5.4] startup failed due to previous errors On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel mansour.alak...@gmail.com wrote: Thank you Tor: Here's what I have. this is copied from the web.xml from the wicket maven project : web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameReports/display-name filter filter-namewicket.report/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.example.automotive.Application/param-value /init-param init-param param-namedetectPortletContext/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-namewicket.report/filter-name url-pattern/report/*/url-pattern /filter-mapping /web-app Here's my portlet.xml : portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd; portlet descriptionMy Wicket portlet examples/description portlet-nameWicketExamplesMenuApplication/portlet-name display-namewicket examples/display-name portlet-classcom.example.automotive.BirtPortlet/portlet-class init-param namewicketFilterPath/name value/report/value /init-param init-param nameviewPage/name value/report/view/value /init-param init-param
Re: Issue regarding refresh a wicket page portlet in Jetspeed portal
Arun: See my comment. On Wed May 27,2009 04:01 pm, Arun Wagle wrote: Hello , I have an issue with refreshing the portlet in jetspeed. I will try to explain the issue below I have a navigation in Jetspeed which point to a psml file. This psml file will bring up a wicket portlet. In the wicket portlet, I am having multiple pages. So when we click on the navigation link(psml url), I get to the home page of the wicket portlet. I do some action on the home page(Page A) and then use setResponsePage method of the Component class to redirect to a different page(Page B) Now when I click on the navigation page again, instead of going to the home page(Page A) it goes to the Page B directly. I want that whenever I click on the navigation link (which points to a psml file), it should always go to home page(Page A) and not to any intermediate page (Page B in this case) I think what is happenning here is, whenever I click on the navigation link, the last rendered response is rendered by the portlet. I agree with you here. The last url is the render response, and it gets reloaded when you refresh. It sounds a bit strange (at least to me); loading another page when refreshing a page ?! Any how, I think this can be done with javascript, by modifying the variable window.location.href . I haven't tested this. Let me know if more details are needed. Regards, Arun Wagle - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org