Re: WebPage constructor
Thanks Johan So that means that if you would like to fetch data every time the page is shown you would need to call the database in the onrender method. I'm not using a repeater, only labels to display the data.(With a repeater I could use the populatemethods that runs during onrender). Or might there be a smart model for this. I tried extending PropertyModel overriding getObject but as I suspected it was called every time a label wanted to get a property from the modelobject. e.g. 5 labels for 5 properties on the modelobject would end upp with 5 calls to the db. Jens Alenius So if I would like to display database data some amount of labels everytime the p Only when you have a bookmarkable url (or home page) and you press refresh in the browser you will get a new page. The url you refresh points to an existing page instance and that one is just rendered again, so no page construction is being done then -- View this message in context: http://www.nabble.com/WebPage-constructor-tp19977659p19988260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stream/download files through portlet
Thijs and I debugged the code together this morning because when he read this thread he was sure that both options (overriding setheaders and onclick) should work. After some debugging we found a bug in Liferay which could be easily fixed in our used version. The current (5.1.2) version has a lot of changes around these properties, we will recheck that once we're able to upgrade. Thanks for your help. Serkan Camurcuoglu wrote: In the PLT.12.1.1 section of jsr 286 it says: Response properties can be viewed as header values set for the portal application. If these header values are intended to be transmitted to the client they should be set before the response is committed. When setting headers in the render lifecycle phase portlets should set the header in the render headers part or simply override the GenericPortlet.doHeaders method (see PLT.11.1.1.4.3). I think you may try: PortletRequestContext ctx = (PortletRequestContext) RequestContext.get(); PortletResponse presp = ctx.getPortletResponse(); presp.addProperty(header, value); this is kind of a hack but it might work.. Rob Sonke wrote: No, too bad. The headers aren't picked up. Serkan Camurcuoglu wrote: For the DynamicWebResource case, doesn't overriding setHeaders() in DynamicWebResource and adding your http header in this method work? By the way, which portlet container are you working with? Rob Sonke wrote: Hi, We're using wicket for our portlets now for almost 3/4 year and it's great. We're following/try to help with the full implementation of jsr 286 in wicket too (Thijs and me, see other threads). But I'm having a problem now with offering files through a portlet. There are actually two options, use the resource phase of jsr286 or use a separate download servlet. First option rocks, second option not (if option 1 won't work, I'll have to deal with it but I prefer not). So I'm trying to serve a file through the portlet based on a wicket link. A normal link would end up in a actionResponse which will not allow you to touch the resourcestream (returning null as the portlet specs describe). An ajax link (which uses the resource phase) will end up with a lot of binary code in the ajax xml output which will, of course, not work. I tried also adding a DynamicWebResource to a wicket ResourceLink, which works actually pretty good except that he's not communicating the filename to the brower by setting a header. I tried adding a header to the ResourceResponse but that one was not passed to the client too (maybe I did that wrong). Could anyone point me in the right direction or could tell me what I'm doing wrong over here? Regards, Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebPage constructor
no everytime you want to fetch data from a database you should do that in your models load the data an detach the data see detachable models On Wed, Oct 15, 2008 at 9:30 AM, jensiator [EMAIL PROTECTED] wrote: Thanks Johan So that means that if you would like to fetch data every time the page is shown you would need to call the database in the onrender method. I'm not using a repeater, only labels to display the data.(With a repeater I could use the populatemethods that runs during onrender). Or might there be a smart model for this. I tried extending PropertyModel overriding getObject but as I suspected it was called every time a label wanted to get a property from the modelobject. e.g. 5 labels for 5 properties on the modelobject would end upp with 5 calls to the db. Jens Alenius So if I would like to display database data some amount of labels everytime the p Only when you have a bookmarkable url (or home page) and you press refresh in the browser you will get a new page. The url you refresh points to an existing page instance and that one is just rendered again, so no page construction is being done then -- View this message in context: http://www.nabble.com/WebPage-constructor-tp19977659p19988260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebPage constructor
Thanks Mårten and Johan. Now I know what to do. Sometime you just need to discuss issues in wicket because there is not so many bestpractise aricticles. Like in the Struts Framework. But it will change in time... Jens -- View this message in context: http://www.nabble.com/WebPage-constructor-tp19977659p19988724.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebPage constructor
http://cwiki.apache.org/WICKET/working-with-wicket-models.html Maarten On Wed, Oct 15, 2008 at 9:40 AM, Johan Compagner [EMAIL PROTECTED]wrote: no everytime you want to fetch data from a database you should do that in your models load the data an detach the data see detachable models On Wed, Oct 15, 2008 at 9:30 AM, jensiator [EMAIL PROTECTED] wrote: Thanks Johan So that means that if you would like to fetch data every time the page is shown you would need to call the database in the onrender method. I'm not using a repeater, only labels to display the data.(With a repeater I could use the populatemethods that runs during onrender). Or might there be a smart model for this. I tried extending PropertyModel overriding getObject but as I suspected it was called every time a label wanted to get a property from the modelobject. e.g. 5 labels for 5 properties on the modelobject would end upp with 5 calls to the db. Jens Alenius So if I would like to display database data some amount of labels everytime the p Only when you have a bookmarkable url (or home page) and you press refresh in the browser you will get a new page. The url you refresh points to an existing page instance and that one is just rendered again, so no page construction is being done then -- View this message in context: http://www.nabble.com/WebPage-constructor-tp19977659p19988260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Now thats *really* friendly :-) On 15 okt 2008, at 13:11, James Carman wrote: Right, I guess that's what I meant by friendly too. Friendly to search engines, not just our eyes. On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote: Keeping keywords in URLs also improves search engine rankings. Regards, Daan On 15 okt 2008, at 13:01, James Carman wrote: When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063 They just add in the text to make it more friendly I guess. On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session destruction due to timeout...
Hi I use this approach: @Override protected ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new DiskPageStore()) { @Override protected void onBind(Request request, Session newSession) { sessionMap.put(newSession.getId(), (ZeuzSession) newSession); super.onBind(request, newSession); } @Override protected void onUnbind(String sessionId) { ZeuzSession session = (ZeuzSession) sessionMap.get(sessionId); session.onBeforeDestroy(); sessionMap.remove(sessionId); super.onUnbind(sessionId); } }; } Session.java public void onBeforeDestroy() { getPerson().setLoggedIn(false); } There are several problems(like what if the application crashes) with this approach, but in my case it's okay.. I do not have trouble with hibernate... Mendeleev wrote: I need to add functionality to my Wicket application that allows me to record in the MySQL database the exact time a user logs out of the application. This includes recording the time the session is destroyed by the web container due to user inactivity. I tried: 1. An implementation of HttpSessionListener 2. Extending the HttpSessionStore class 3. WebApplication.sessionDestroyed(String sessionid) 4. An implementation of HttpSessionBindingListener All of these do not work in my case, because the methods are called AFTER the session is already destroyed. At that time, the hibernate session that connects to the database, does not exist anymore. I cannot reopen it, because the Application.get() method returns null at this time. My question is: is there any way that I can record the destruction right before it happens? Is there some sort of a listener I can implement? If not, how is the wicket application notified that the user navigates away from the page, starting a period of inactivity? If there is a way I can register that happening, I can solve the problem by adding a timer. Thanks, Drago -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HTTPS, again
I have web-site with login form in header, so the form does appear on all pages. Normally it does work insecure, so the page could be viewed insecure, but the form on it must be secure, otherwise it will send username/password over insecure http. I found in wicket wiki a solution for a page it checks page for RequiredSSL annotation and redirects if not ssl. But in my case the https should be before, in url, but not after data is sent already. I mean form action for login form must be https://...;. How to do it? Also, as I understand, sessionid for insecure connection should be transferred to secure and after it the sessionid should be generated again, otherwise hacker can use this sessionid stolen from insecure connection to intrude into session data which is expected to be secure. Am I right? Is there easy way to do it in wicket? -- WBR, kan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Hmm...could be. Google shows only one urls [1] Maybe amazon uses other techniques like robots.txt or the meta-tag robots to block the other urls. But i didn't look at it. If you are interested in duplicate content, the google webmaster central blog has some very nice posts [2] [3]. [1] http://www.google.com/search?hl=enq=site%3Aamazon.com+%22Pragmatic+Version+Control+Using+Subversion+Mike+Mason%22btnG=Search [2] http://googlewebmastercentral.blogspot.com/2006/12/deftly-dealing-with-duplicate-content.html [3] http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html Witold Am Wed, 15 Oct 2008 07:45:39 -0400 schrieb James Carman [EMAIL PROTECTED]: To be fair, I didn't find that second URL. I hand-crafted it. So, maybe Amazon doesn't let the search engines find those types of URLs by crawling. Wouldn't that help? On Wed, Oct 15, 2008 at 7:32 AM, Witold Czaplewski [EMAIL PROTECTED] wrote: Btw... amazon.com is a very bad example for a search engine friendly site. Duplicate content like the posted urls are more problematic than non-friendly urls. The perfect solution (unfortunately not always possible) is only one friendly or meaningful url for every unique page. Witold Am Wed, 15 Oct 2008 07:11:16 -0400 schrieb James Carman [EMAIL PROTECTED]: Right, I guess that's what I meant by friendly too. Friendly to search engines, not just our eyes. On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote: Keeping keywords in URLs also improves search engine rankings. Regards, Daan On 15 okt 2008, at 13:01, James Carman wrote: When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063 They just add in the text to make it more friendly I guess. On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: Empty PageParametyers when using HybridUrlCodingStrategy
Itayh, What you do seems alright. Please show us complete code fragments. Both the part where you create the InlineFrame component, and the constructor of the MyFrame class. Regards, Erik. itayh schreef: Any Idea? itayh wrote: Thx for the quick response. I cahnged the url mount in my application to mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... My problem is that still when i try to create iframe like: PageParameters params = new PageParameters(); params.add(url, url) or params.add(0, url) InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(),MyFrame.class, params); myFrame .add(new AttributeModifier(src, newModel((Serializable)/myapp/iframe/MyFrame))); The params get empty to the MyFrame constructor.The only situation the params are not empty is when I do: myFrame .add(new AttributeModifier(src, newModel((Serializable)/myapp/iframe/MyFrame/param_value))); But then the url is not found since I define in my app: mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... The param is runtime value and I can not know it when creating my app. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Highlight some words in the markup content
tekst.replaceAll(searchword, span class=search + searchword + /span); label.setEscapeModelStrings(false); Martijn On Wed, Oct 15, 2008 at 3:56 PM, Thomas Singer [EMAIL PROTECTED] wrote: We are using Wicket as base for our website (www.syntevo.com). We have a simple search feature on the website, but want to extend it like it is known to work in forums: the searched words should be highlighted. Does someone already has implemented such a feature to surround plain words in the markup by a special tag? -- Cheers, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strange exception when trying to use wicketstuff-annotation library
Hi, When trying to use the wicketstuff-annotation library I got a very strange Exception: *log4j:ERROR Error occured while converting date.*. This causes that my application couldn't be started up. When removing this jar and his dependencies from the lib and just use the normal Wicket mounting strategies everything works fine again. Does someone already got the same problem and knowd what the cause is? Thank you. Regards, Hbiloo
Re: GuiceInjectorHolder inside WebApplication
Have you looked at the wicket guice integration? I think that does it already. Richard Edgar Merino wrote: Let me correct that last response: the problem is not solved yet. I thought it was but after redeploying my application again I got a serialization exception, why didn't the previously supplied solution didn't work? can anyone give me a hand on this? thanks in advance. Edgar Merino Edgar Merino escribió: Ok I re-read the javadoc for the GuiceInjectorHolder and found out I had to use it as a MetaDataKey, so I did that in my application: public void init() { //initialization code Injector injector = Guice.createInjector(); setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new GuiceInjectorHolder(injector)); } public void someMethod() { Injector injector = ((GuiceInjectorHolder) getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.getInstance(SomeClass.class); } I was thinking about adding a GuiceComponentInjector to my application, but I'm not using guice with wicket so I don't think I need that, any suggestion? Edgar Merino Edgar Merino escribió: Hello, I need to hold a reference to a Guice injector inside my WebApplication, however since the injector is not serializable I tried using a GuiceInjectorHolder and keeping a reference to it in my WebApplication, but I'm still getting serialization exceptions when redeploying my application. Why didn't it work? what should I do in this case to keep a reference to my Guice injector? Thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- View this message in context: http://www.nabble.com/GuiceInjectorHolder-inside-WebApplication-tp19989539p19995217.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Highlight some words in the markup content
OK, this looks trivial, but were should I place this code to replace all content, no matter whether it comes from a page template, border or fragment? -- Cheers, Tom Martijn Dashorst wrote: tekst.replaceAll(searchword, span class=search + searchword + /span); label.setEscapeModelStrings(false); Martijn On Wed, Oct 15, 2008 at 3:56 PM, Thomas Singer [EMAIL PROTECTED] wrote: We are using Wicket as base for our website (www.syntevo.com). We have a simple search feature on the website, but want to extend it like it is known to work in forums: the searched words should be highlighted. Does someone already has implemented such a feature to surround plain words in the markup by a special tag? -- Cheers, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Empty PageParametyers when using HybridUrlCodingStrategy
Creating the InlineFrame component: PageParameters params = new PageParameters(); params.add(url, myUrl); InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(), MyFrame.class, params); myFrame.add(new AttributeModifier(src, new Model(/myapp/app/iframe/MyFrame))); add(myFrame); Creating MyFrame: public MyFrame(PageParameters params ){ String url = params.get(url); //the problem is that this params are empty doSomething(url); } Url mounting: mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)); I tried also for the url mounting: mount(new HybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)); In all cases the params inside the constructor of MyFrame class has no values in them (size = 0) Thanks, Itay Erik van Oosten wrote: Itayh, What you do seems alright. Please show us complete code fragments. Both the part where you create the InlineFrame component, and the constructor of the MyFrame class. Regards, Erik. itayh schreef: Any Idea? itayh wrote: Thx for the quick response. I cahnged the url mount in my application to mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... My problem is that still when i try to create iframe like: PageParameters params = new PageParameters(); params.add(url, url) or params.add(0, url) InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(),MyFrame.class, params); myFrame .add(new AttributeModifier(src, newModel((Serializable)/myapp/iframe/MyFrame))); The params get empty to the MyFrame constructor.The only situation the params are not empty is when I do: myFrame .add(new AttributeModifier(src, newModel((Serializable)/myapp/iframe/MyFrame/param_value))); But then the url is not found since I define in my app: mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... The param is runtime value and I can not know it when creating my app. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Empty-PageParametyers-when-using-HybridUrlCodingStrategy-tp19666330p19995785.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Highlight some words in the markup content
iresponsefilter -igor On Wed, Oct 15, 2008 at 8:22 AM, Thomas Singer [EMAIL PROTECTED] wrote: OK, this looks trivial, but were should I place this code to replace all content, no matter whether it comes from a page template, border or fragment? -- Cheers, Tom Martijn Dashorst wrote: tekst.replaceAll(searchword, span class=search + searchword + /span); label.setEscapeModelStrings(false); Martijn On Wed, Oct 15, 2008 at 3:56 PM, Thomas Singer [EMAIL PROTECTED] wrote: We are using Wicket as base for our website (www.syntevo.com). We have a simple search feature on the website, but want to extend it like it is known to work in forums: the searched words should be highlighted. Does someone already has implemented such a feature to surround plain words in the markup by a special tag? -- Cheers, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to change field values in a validator?
Hi Igor Thanks, you saved my day. That was much more what I was looking for. I extended FormComponentPanel not to require a separate HTML file but live with what is in the original source which makes the usage much much easier. With that, I was able to implement my logic in no time. Since I'm sticking to 1.3 (which probably is safer for a soon-to-be productive environment), I didn't loko at the Listener but that also sounds very good. Thanks again Matt Igor Vaynberg wrote: wrap this in a formcomponentpanel, that way in convertinput() of the panel you have all child component's inputs available also via getconvertedinput(). anothing option, if you are using 1.4 is to wrap this in a panel or a fragment and use IFormModelListener to push whatever value you want into the model. -igor On Mon, Oct 13, 2008 at 6:43 AM, Matthias Keller [EMAIL PROTECTED]wrote: Hi I've got a custom validator here which needs to dynamically change some other input field's value to a new value. Here's the scenario with two radios and a pulldown: ( ) I don't need anything ( ) I need: [ pulldown with options ] Now if I need is selected, everything works as expected, the pulldown value gets stored to the model. Now if 'I dont need anything' is selected, another value for the pulldown needs to be stored in the model. Let's say a marker entry like 'nothing'. I can't have 'nothing' directly in the pulldown as it would make no sense (and the customer explicitly doesn't want that). So in the validator I need to check the status of the radios and if the first option is selected, set the pulldown model's value to my custom value, ignoring any possible input value. I tried it with .setModelObject() and .setConvertedInput() but it appears that the input fields are initialized again later from the parameters, overriding my value... Is there anything I can do? Thanks Matt -- [EMAIL PROTECTED] +41 44 268 83 98 Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich http://www.ergon.ch __ e r g o nsmart people - smart software -- [EMAIL PROTECTED] +41 44 268 83 98 Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich http://www.ergon.ch __ e r g o nsmart people - smart software smime.p7s Description: S/MIME Cryptographic Signature
Re: form components within an AccordionPanel
Thanks for the quick response. I am using wicket 1.3.4. I have been able to reproduce my problem with a very simplified example that is just an extension of the wicket-contrib-accordion-examples project. I have taken the AccordionPage and added another menu item that has a TextField inside of it. It works fine in Safari and Google Chrome, but not in IE7 or Mozilla 5. In IE7 the input is not rendered at all when the menu item is expanded. However when you close it, it shows up for a split second and then goes away again before the menu item fully closes. Also, the normal menu items seem to show up fine when clicked, but when I close them they reopen again and then go closed really quickly. I have run the code with just the barebones html, css and javascript that is available at http://www.hedgerwow.com/360/mwd/accordion/demo.php and I am getting the same problem with the form components but not with the other I mentioned. Could it be the span tags that are in the wicket code? Is it upset because of form components being inside of a span tag maybe? Thanks for your time, Josh Nino.Martinez wrote: I forgot to mention, that I do think dojo are being picked up at wicket 1.4, some guys talked about it on the dev list. I take it you are using the 1.3? Nino Saturnino Martinez Vazquez Wael wrote: jchappelle wrote: I am trying to render a form inside a Panel within an AccordionPanel. I have even reduced it to trying to only render a TextArea inside a Panel within it. However, when I click on the title of one of the items it expands with nothing but white space within it. Sounds a little wierd. What I would do would be to try to have a simple mock html that used the accordion js and see if I could replicate it there. Theres also a chance that the author of accordion.js has some hints on this. The examples for the AccordionPanel only have a Label inside a Panel as the content. Yeah that's what I needed at the time. Is this not possible? I even tried to use the DojoAccordionContainer but it gave some weird error debug messages that splattered all over my webpage(I'm not even sure how that happened unless it found a FeedbackPanel or something). Im not sure what state dojo are in. I'm starting to lose faith in many of these wicket-stuff projects. PLEASE HELP! Well some of the wicketstuff projects are not being maintained, AFAIK. People are always welcome to maintain them. I saw you wrote a direct mail to me i'll reply on the questions you had there. Thanks, Josh -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://www.nabble.com/file/p19996411/AccordionPage.html AccordionPage.html http://www.nabble.com/file/p19996411/AccordionPage.java AccordionPage.java http://www.nabble.com/file/p19996411/formcontent.html formcontent.html http://www.nabble.com/file/p19996411/formcontent.java formcontent.java http://www.nabble.com/file/p19996411/content.java content.java http://www.nabble.com/file/p19996411/content.html content.html -- View this message in context: http://www.nabble.com/form-components-within-an-AccordionPanel-tp19980730p19996411.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Django adds a slug field, which is unique, for its urls. Then you look up the content by slug instead of id Its admin interface suggests a slug, which is alterable if it is not unique. On 10/15/08, James Carman [EMAIL PROTECTED] wrote: To be fair, I didn't find that second URL. I hand-crafted it. So, maybe Amazon doesn't let the search engines find those types of URLs by crawling. Wouldn't that help? On Wed, Oct 15, 2008 at 7:32 AM, Witold Czaplewski [EMAIL PROTECTED] wrote: Btw... amazon.com is a very bad example for a search engine friendly site. Duplicate content like the posted urls are more problematic than non-friendly urls. The perfect solution (unfortunately not always possible) is only one friendly or meaningful url for every unique page. Witold Am Wed, 15 Oct 2008 07:11:16 -0400 schrieb James Carman [EMAIL PROTECTED]: Right, I guess that's what I meant by friendly too. Friendly to search engines, not just our eyes. On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote: Keeping keywords in URLs also improves search engine rankings. Regards, Daan On 15 okt 2008, at 13:01, James Carman wrote: When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063 They just add in the text to make it more friendly I guess. On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Sent from Gmail for mobile | mobile.google.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: errors on the WicketStuff Dojo split container example
Hi I never get the response from Fernando, I asked for a snip of code.. It looked that his problem were something with YUI clashing, different versions between YUI and accordion panel.. jchappelle wrote: Did someone solve this? I am having the same issue. Thanks, Josh Fernando Wermus-2 wrote: I have the same problem. Did you solve by yourself? This is my code an debugging, DEBUG: widget ID collision on ID: resumenPartido111 DEBUG: widget ID collision on ID: detallePartido112 wicket:panel table tr wicket:id=repeating tddiv wicket:id=accordion[accordion]/div/td /tr /table /wicket:panel public class SolapaPartidos extends Panel { private static final long serialVersionUID = 5452141466481309848L; public SolapaPartidos(String id) { super(id); RepeatingView repeating=new RepeatingView(repeating); add(repeating); WebMarkupContainer item = new WebMarkupContainer( repeating.newChildId()); repeating.add(item); item.add(new Accordion(accordion)); } } wicket:panel div wicket:id=partido div wicket:id=resumenPartido [resumenPartido] /div div wicket:id=detallePartido [detallePartido] /div /div /wicket:panel public class Accordion extends Panel { private static final long serialVersionUID = -3342221765791589494L; public Accordion(String id, InscripcionPartido inscripcion) { super(id); DojoAccordionContainer container = new DojoAccordionContainer(partido); container.setHeight(200px); container.add(new DojoSimpleContainer(resumenPartido, Resumen del partido)); container.add(new DojoSimpleContainer(detallePartido, Detalle del partido)); add(container); } } On Wed, Jan 30, 2008 at 1:43 PM, Wicketter [EMAIL PROTECTED] wrote: There are errors on this page which displays split container example. Also copying the source code, doesn't do the same thing as example running on the site. Here are the errors displayed: DEBUG: widget ID collision on ID: tab11 DEBUG: widget ID collision on ID: tab22 DEBUG: widget ID collision on ID: tab33 clear | close Wicket Ajax Debug Window (drag me here) WICKET AJAX DEBUG DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for panel in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for panel in wicket.widget registered to namespace wicket DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for panel in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for panel in wicket.widget registered to namespace wicket DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for child in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for child in wicket.widget registered to namespace wicket DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for extend in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for extend in wicket.widget registered to namespace wicket DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for simpledropdowndatepicker in dojo.widget registered to namespace dojo. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for panel in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for panel in wicket.widget registered to namespace wicket DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for panel in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for panel in wicket.widget registered to namespace wicket DEBUG: DEPRECATED:
Multiple RadioGroups in an Table....
Hi, In follow up to the following thread: http://wicket.markmail.org/search/?q=multiple%20radiogroup%20in%20table#query:multiple%20radiogroup%20in%20table+page:1+mid:4mgyvni2ggbffkfq+state:results Can anyone offer any suggestions as to how one might roll their own component, as suggested, to achieve the desired behaviour? Thx, Joel -- SU3 Analytics Ltd 61b Oxford Gardens W10 5UJ London Tel: +44 20 8960 2634 Mob: +44 75 2501 0825 www.su3analytics.com SU3 Analytics Ltd is a company registered in England and Wales under company number 06639473 at registered address 61b Oxford Gardens, London W10 5UJ, United Kingdom. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
GuiceInjectorHolder inside WebApplication
Hello, I need to hold a reference to a Guice injector inside my WebApplication, however since the injector is not serializable I tried using a GuiceInjectorHolder and keeping a reference to it in my WebApplication, but I'm still getting serialization exceptions when redeploying my application. Why didn't it work? what should I do in this case to keep a reference to my Guice injector? Thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GuiceInjectorHolder inside WebApplication
Let me correct that last response: the problem is not solved yet. I thought it was but after redeploying my application again I got a serialization exception, why didn't the previously supplied solution didn't work? can anyone give me a hand on this? thanks in advance. Edgar Merino Edgar Merino escribió: Ok I re-read the javadoc for the GuiceInjectorHolder and found out I had to use it as a MetaDataKey, so I did that in my application: public void init() { //initialization code Injector injector = Guice.createInjector(); setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new GuiceInjectorHolder(injector)); } public void someMethod() { Injector injector = ((GuiceInjectorHolder) getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.getInstance(SomeClass.class); } I was thinking about adding a GuiceComponentInjector to my application, but I'm not using guice with wicket so I don't think I need that, any suggestion? Edgar Merino Edgar Merino escribió: Hello, I need to hold a reference to a Guice injector inside my WebApplication, however since the injector is not serializable I tried using a GuiceInjectorHolder and keeping a reference to it in my WebApplication, but I'm still getting serialization exceptions when redeploying my application. Why didn't it work? what should I do in this case to keep a reference to my Guice injector? Thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Keeping keywords in URLs also improves search engine rankings. Regards, Daan On 15 okt 2008, at 13:01, James Carman wrote: When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063 They just add in the text to make it more friendly I guess. On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Empty PageParametyers when using HybridUrlCodingStrategy
Any Idea? itayh wrote: Thx for the quick response. I cahnged the url mount in my application to mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... My problem is that still when i try to create iframe like: PageParameters params = new PageParameters(); params.add(url, url) or params.add(0, url) InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(),MyFrame.class, params); myFrame .add(new AttributeModifier(src, newModel((Serializable)/myapp/iframe/MyFrame))); The params get empty to the MyFrame constructor.The only situation the params are not empty is when I do: myFrame .add(new AttributeModifier(src, newModel((Serializable)/myapp/iframe/MyFrame/param_value))); But then the url is not found since I define in my app: mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)) ... The param is runtime value and I can not know it when creating my app. Erik van Oosten wrote: You should use one of the other HybridUrlCoding strategies. E.g. the IndexedHybridUrlCodingStrategy. If you need an MixedParamHybridUrlCodingStrategy, I can mail it to the list. Regards, Erik. itayh wrote: Hi, I am using HybridUrlCodingStrategy for my url's (I need that the mount point will preserved even after invoking listener interfaces). I am creating IFrames using InlineFrame class. In order that the url of the IFrame will be what I want I do: PageParameters params = new PageParameters(); params.add(url, url); InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(), MyFrame.class, params); myFrame .add(new AttributeModifier(src, new Model((Serializable)/myapp/iframe/MyFrame))); In my Application I have: mount(new HybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)); The thing is that in MyFrame class the PageParameters are empty. I am not sure how to use HybridUrlCodingStrategy.PAGE_PARAMETERS_META_DATA_KEY and where, or maybe I don't need to set src directly and there is another way to do it? Anyone? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Empty-PageParametyers-when-using-HybridUrlCodingStrategy-tp19666330p19993282.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063 They just add in the text to make it more friendly I guess. On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Highlight some words in the markup content
Thanks. But how the filter should know about the request which contains the information about what to highlight? -- Cheers, Tom Igor Vaynberg wrote: iresponsefilter -igor On Wed, Oct 15, 2008 at 8:22 AM, Thomas Singer [EMAIL PROTECTED] wrote: OK, this looks trivial, but were should I place this code to replace all content, no matter whether it comes from a page template, border or fragment? -- Cheers, Tom Martijn Dashorst wrote: tekst.replaceAll(searchword, span class=search + searchword + /span); label.setEscapeModelStrings(false); Martijn On Wed, Oct 15, 2008 at 3:56 PM, Thomas Singer [EMAIL PROTECTED] wrote: We are using Wicket as base for our website (www.syntevo.com). We have a simple search feature on the website, but want to extend it like it is known to work in forums: the searched words should be highlighted. Does someone already has implemented such a feature to surround plain words in the markup by a special tag? -- Cheers, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GuiceInjectorHolder inside WebApplication
Ok I re-read the javadoc for the GuiceInjectorHolder and found out I had to use it as a MetaDataKey, so I did that in my application: public void init() { //initialization code Injector injector = Guice.createInjector(); setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new GuiceInjectorHolder(injector)); } public void someMethod() { Injector injector = ((GuiceInjectorHolder) getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.getInstance(SomeClass.class); } I was thinking about adding a GuiceComponentInjector to my application, but I'm not using guice with wicket so I don't think I need that, any suggestion? Edgar Merino Edgar Merino escribió: Hello, I need to hold a reference to a Guice injector inside my WebApplication, however since the injector is not serializable I tried using a GuiceInjectorHolder and keeping a reference to it in my WebApplication, but I'm still getting serialization exceptions when redeploying my application. Why didn't it work? what should I do in this case to keep a reference to my Guice injector? Thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Right, I guess that's what I meant by friendly too. Friendly to search engines, not just our eyes. On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote: Keeping keywords in URLs also improves search engine rankings. Regards, Daan On 15 okt 2008, at 13:01, James Carman wrote: When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063 They just add in the text to make it more friendly I guess. On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebPage constructor
Oh and to you that has read this thread looking for code examples. Here is my code for doing this. (Hope it's the right way of doing it) There is no form or repeater in the page. It only shows a persons data from the database. Even when hitting refresh in browser. In page constructor public MyConstuctor(UUID pSelectePersonIdKey) PersonDetachedModel personModel=new PersonMainDetachedModel(pSelectedPersonIdKey); add(new Label(numberLabel, new PropertyModel(personModel, personNumber))); add(new Label(firstnameLabel, new PropertyModel(personModel, firstName))); . PersonDetachedModel extends LoadableDetachableModelPerson. It holds the personIdkey as a member. In the load method you fetch the data from db,webservice, rest whatever. Jens Alenius -- View this message in context: http://www.nabble.com/WebPage-constructor-tp19977659p19989810.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple RadioGroups in an Table....
there is an issue in jira which provides a patch for this so you can lookat that. the change is pretty simple. i will try to roll it into 1.4 soon if i have time. -igor On Wed, Oct 15, 2008 at 3:00 AM, Joel Halbert [EMAIL PROTECTED] wrote: Hi, In follow up to the following thread: http://wicket.markmail.org/search/?q=multiple%20radiogroup%20in%20table#query:multiple%20radiogroup%20in%20table+page:1+mid:4mgyvni2ggbffkfq+state:results Can anyone offer any suggestions as to how one might roll their own component, as suggested, to achieve the desired behaviour? Thx, Joel -- SU3 Analytics Ltd 61b Oxford Gardens W10 5UJ London Tel: +44 20 8960 2634 Mob: +44 75 2501 0825 www.su3analytics.com SU3 Analytics Ltd is a company registered in England and Wales under company number 06639473 at registered address 61b Oxford Gardens, London W10 5UJ, United Kingdom. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session destruction due to timeout...
I need to add functionality to my Wicket application that allows me to record in the MySQL database the exact time a user logs out of the application. This includes recording the time the session is destroyed by the web container due to user inactivity. I tried: 1. An implementation of HttpSessionListener 2. Extending the HttpSessionStore class 3. WebApplication.sessionDestroyed(String sessionid) 4. An implementation of HttpSessionBindingListener All of these do not work in my case, because the methods are called AFTER the session is already destroyed. At that time, the hibernate session that connects to the database, does not exist anymore. I cannot reopen it, because the Application.get() method returns null at this time. My question is: is there any way that I can record the destruction right before it happens? Is there some sort of a listener I can implement? If not, how is the wicket application notified that the user navigates away from the page, starting a period of inactivity? If there is a way I can register that happening, I can solve the problem by adding a timer. Thanks, Drago -- View this message in context: http://www.nabble.com/Session-destruction-due-to-timeout...-tp19989230p19989230.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session destruction due to timeout...
no you cant and Application.get() will never work then because the auto destruct of a container doesnt do that in a request ofcourse but just somewhere on some thread. if you need an application object you could try: Application.get(String applicationKey) The session object is gone so you cant access it anymore. On Wed, Oct 15, 2008 at 10:40 AM, Mendeleev [EMAIL PROTECTED] wrote: I need to add functionality to my Wicket application that allows me to record in the MySQL database the exact time a user logs out of the application. This includes recording the time the session is destroyed by the web container due to user inactivity. I tried: 1. An implementation of HttpSessionListener 2. Extending the HttpSessionStore class 3. WebApplication.sessionDestroyed(String sessionid) 4. An implementation of HttpSessionBindingListener All of these do not work in my case, because the methods are called AFTER the session is already destroyed. At that time, the hibernate session that connects to the database, does not exist anymore. I cannot reopen it, because the Application.get() method returns null at this time. My question is: is there any way that I can record the destruction right before it happens? Is there some sort of a listener I can implement? If not, how is the wicket application notified that the user navigates away from the page, starting a period of inactivity? If there is a way I can register that happening, I can solve the problem by adding a timer. Thanks, Drago -- View this message in context: http://www.nabble.com/Session-destruction-due-to-timeout...-tp19989230p19989230.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Highlight some words in the markup content
as far as i know the response filter runs within the request cycle and request cycle has metadata facility, so -igor On Wed, Oct 15, 2008 at 10:07 AM, Thomas Singer [EMAIL PROTECTED] wrote: Thanks. But how the filter should know about the request which contains the information about what to highlight? -- Cheers, Tom Igor Vaynberg wrote: iresponsefilter -igor On Wed, Oct 15, 2008 at 8:22 AM, Thomas Singer [EMAIL PROTECTED] wrote: OK, this looks trivial, but were should I place this code to replace all content, no matter whether it comes from a page template, border or fragment? -- Cheers, Tom Martijn Dashorst wrote: tekst.replaceAll(searchword, span class=search + searchword + /span); label.setEscapeModelStrings(false); Martijn On Wed, Oct 15, 2008 at 3:56 PM, Thomas Singer [EMAIL PROTECTED] wrote: We are using Wicket as base for our website (www.syntevo.com). We have a simple search feature on the website, but want to extend it like it is known to work in forums: the searched words should be highlighted. Does someone already has implemented such a feature to surround plain words in the markup by a special tag? -- Cheers, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble printing image
This ended up working for Firefox, but not for IE. The image served in Firefox will Save As x.png, but the image in IE still shows as untitled.bmp. Thanks for the suggestion though, it at least taught me a lot about resources and setting headers :) Dane -Original Message- From: Serkan Camurcuoglu [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2008 12:25 PM To: users@wicket.apache.org Subject: Re: Trouble printing image while serving the image resource, setting the Content-Disposition http header to inline; filename=x.png might help, but this is just a guess.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is it a wrong idea to implement injection on Models?
Hi, I read a few other threads related to this issue, but saw only technical means of freeing ourselves of the injection-is-only-for-Components limitation. Context After refactoring my code to make it so that the Guice injection no more happens on our Components but on our Models instead, I was surprised to find out that Injection is only supported on Components. I thought it would make more sense to inject the models, but I may be misunderstanding some Wicket principle. Questions Was my approach of having injection on Models instead of Components sound? And are there foreseeable issues with this approach? Or would it be better that I only use injection on Components? -- View this message in context: http://www.nabble.com/Is-it-a-wrong-idea-to-implement-injection-on-Models--tp19998823p19998823.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is it a wrong idea to implement injection on Models?
there is no easy way for us to support this because imodel is an interface and users implement their own implementations quiet frequently, so there is no way for us to intercept its creation like there is with Component which is a concrete class. what is needed in java is a general mechanism for service lookup. they kind of have that with serviceloader but that is on a much more coarse scope. check out salve.googlecode.com, its a project i wrote that uses bytecode instrumentation to allow dependency injection/service lookup hybrid on any object no matter how it is instantiated. -igor On Wed, Oct 15, 2008 at 10:54 AM, Daniel Jomphe [EMAIL PROTECTED]wrote: Hi, I read a few other threads related to this issue, but saw only technical means of freeing ourselves of the injection-is-only-for-Components limitation. Context After refactoring my code to make it so that the Guice injection no more happens on our Components but on our Models instead, I was surprised to find out that Injection is only supported on Components. I thought it would make more sense to inject the models, but I may be misunderstanding some Wicket principle. Questions Was my approach of having injection on Models instead of Components sound? And are there foreseeable issues with this approach? Or would it be better that I only use injection on Components? -- View this message in context: http://www.nabble.com/Is-it-a-wrong-idea-to-implement-injection-on-Models--tp19998823p19998823.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Highlight some words in the markup content
If you are displaying search results dynamically, and it's not part of your static markup, you can also do something like this: class HighlightingModel extends LoadableDetachableModelString { private transient IModelString text; private transient IModelString searchWord; HighlightingModel(IModelString text, IModelString searchWord) { this.text = text; this.searchWord = searchWord; } @Override protected String load() { return text.getObject().replaceAll(searchWord.getObject(), span class=\search\ + searchWord.getObject() + /span); } @Override protected void onDetach() { super.onDetach(); text = null; searchWord = null; } } IModelString resultDescription = new HighlightingModel(new PropertyModel(someObject, someProperty), new PropertyModel(searchQuery, searchTerm)); -- Jeremy Thomerson http://www.wickettraining.com On Wed, Oct 15, 2008 at 12:07 PM, Thomas Singer [EMAIL PROTECTED] wrote: Thanks. But how the filter should know about the request which contains the information about what to highlight? -- Cheers, Tom Igor Vaynberg wrote: iresponsefilter -igor On Wed, Oct 15, 2008 at 8:22 AM, Thomas Singer [EMAIL PROTECTED] wrote: OK, this looks trivial, but were should I place this code to replace all content, no matter whether it comes from a page template, border or fragment? -- Cheers, Tom Martijn Dashorst wrote: tekst.replaceAll(searchword, span class=search + searchword + /span); label.setEscapeModelStrings(false); Martijn On Wed, Oct 15, 2008 at 3:56 PM, Thomas Singer [EMAIL PROTECTED] wrote: We are using Wicket as base for our website (www.syntevo.com). We have a simple search feature on the website, but want to extend it like it is known to work in forums: the searched words should be highlighted. Does someone already has implemented such a feature to surround plain words in the markup by a special tag? -- Cheers, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
To be fair, I didn't find that second URL. I hand-crafted it. So, maybe Amazon doesn't let the search engines find those types of URLs by crawling. Wouldn't that help? On Wed, Oct 15, 2008 at 7:32 AM, Witold Czaplewski [EMAIL PROTECTED] wrote: Btw... amazon.com is a very bad example for a search engine friendly site. Duplicate content like the posted urls are more problematic than non-friendly urls. The perfect solution (unfortunately not always possible) is only one friendly or meaningful url for every unique page. Witold Am Wed, 15 Oct 2008 07:11:16 -0400 schrieb James Carman [EMAIL PROTECTED]: Right, I guess that's what I meant by friendly too. Friendly to search engines, not just our eyes. On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote: Keeping keywords in URLs also improves search engine rankings. Regards, Daan On 15 okt 2008, at 13:01, James Carman wrote: When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063 They just add in the text to make it more friendly I guess. On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: form components within an AccordionPanel
Yea, if it is having the problem in the javascript then it has nothing to do with wicket. I was just hoping you might be a javascript guru. :-) I have recently found some javascript that works for me and I've almost got a component in wicket created for it. It will work for now. However, it would be nice to have a component that is backed by a javascript library that is maintained and kept up to date like YUI. I don't know if I would worry about the wicket:container or fieldset stuff. It looks like the big problem is with the javascript and until that is fixed there is no use in tweaking anything else. Let me know if you update the component to use something like YUI. I would definately be interested in using it. I could even help out if you need. Thanks, Josh Nino.Martinez wrote: Great that you have done some extensive diagnostics.. jchappelle wrote: Thanks for the quick response. I am using wicket 1.3.4. I have been able to reproduce my problem with a very simplified example that is just an extension of the wicket-contrib-accordion-examples project. I have taken the AccordionPage and added another menu item that has a TextField inside of it. It works fine in Safari and Google Chrome, but not in IE7 or Mozilla 5. In IE7 the input is not rendered at all when the menu item is expanded. However when you close it, it shows up for a split second and then goes away again before the menu item fully closes. Also, the normal menu items seem to show up fine when clicked, but when I close them they reopen again and then go closed really quickly. I have run the code with just the barebones html, css and javascript that is available at http://www.hedgerwow.com/360/mwd/accordion/demo.php and I am getting the same problem with the form components but not with the other I mentioned. Hmm if you get the same problem here, it's not so great:( Then it's out of my hands. And I'd say that we should pick another js lib that does not have these issues. I could be convinced to do some YUI equalent.. Could it be the span tags that are in the wicket code? Is it upset because of form components being inside of a span tag maybe? Could be, if this is the problem then it's a really really easy fix.. I can go see if I can replace it with wicket:container or fieldset? WDYT? Thanks for your time, Josh Nino.Martinez wrote: I forgot to mention, that I do think dojo are being picked up at wicket 1.4, some guys talked about it on the dev list. I take it you are using the 1.3? Nino Saturnino Martinez Vazquez Wael wrote: jchappelle wrote: I am trying to render a form inside a Panel within an AccordionPanel. I have even reduced it to trying to only render a TextArea inside a Panel within it. However, when I click on the title of one of the items it expands with nothing but white space within it. Sounds a little wierd. What I would do would be to try to have a simple mock html that used the accordion js and see if I could replicate it there. Theres also a chance that the author of accordion.js has some hints on this. The examples for the AccordionPanel only have a Label inside a Panel as the content. Yeah that's what I needed at the time. Is this not possible? I even tried to use the DojoAccordionContainer but it gave some weird error debug messages that splattered all over my webpage(I'm not even sure how that happened unless it found a FeedbackPanel or something). Im not sure what state dojo are in. I'm starting to lose faith in many of these wicket-stuff projects. PLEASE HELP! Well some of the wicketstuff projects are not being maintained, AFAIK. People are always welcome to maintain them. I saw you wrote a direct mail to me i'll reply on the questions you had there. Thanks, Josh -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://www.nabble.com/file/p19996411/AccordionPage.html AccordionPage.html http://www.nabble.com/file/p19996411/AccordionPage.java AccordionPage.java http://www.nabble.com/file/p19996411/formcontent.html formcontent.html http://www.nabble.com/file/p19996411/formcontent.java formcontent.java http://www.nabble.com/file/p19996411/content.java content.java http://www.nabble.com/file/p19996411/content.html content.html -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context:
Re: WebPage constructor
Not because I want to hijact the thread.. But you could use a compound property model inorder to get rid of all the propertymodels.. jensiator wrote: Oh and to you that has read this thread looking for code examples. Here is my code for doing this. (Hope it's the right way of doing it) There is no form or repeater in the page. It only shows a persons data from the database. Even when hitting refresh in browser. In page constructor public MyConstuctor(UUID pSelectePersonIdKey) PersonDetachedModel personModel=new PersonMainDetachedModel(pSelectedPersonIdKey); add(new Label(numberLabel, new PropertyModel(personModel, personNumber))); add(new Label(firstnameLabel, new PropertyModel(personModel, firstName))); . PersonDetachedModel extends LoadableDetachableModelPerson. It holds the personIdkey as a member. In the load method you fetch the data from db,webservice, rest whatever. Jens Alenius -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Open Modal Dialog at specific position on screen (not center)
Hi! You have to set the parameter wmode=opaque in your flash-object tag. That will make it a part of normal z-ordering. http://www.communitymx.com/content/source/E5141/wmodeopaque.htm // Daniel jalbum.net On 2008-10-14, at 22:42, groffhibbitz wrote: Hi, I'm running into a problem where my modal dialog is popping up, but being covered by a flash component that is on the page. The z-index seems to have nothing to do with this, as I can set the z-index of my flash component to - and z-index of the modal to 20001. All I want to do to solve this is not pop up the modal dialog in the center of the page (which is where the flash component is) but instead pop it up right above where the button I click is that opens it. Can I call a javascript function to move the modal once it has been shown? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: form components within an AccordionPanel
Great that you have done some extensive diagnostics.. jchappelle wrote: Thanks for the quick response. I am using wicket 1.3.4. I have been able to reproduce my problem with a very simplified example that is just an extension of the wicket-contrib-accordion-examples project. I have taken the AccordionPage and added another menu item that has a TextField inside of it. It works fine in Safari and Google Chrome, but not in IE7 or Mozilla 5. In IE7 the input is not rendered at all when the menu item is expanded. However when you close it, it shows up for a split second and then goes away again before the menu item fully closes. Also, the normal menu items seem to show up fine when clicked, but when I close them they reopen again and then go closed really quickly. I have run the code with just the barebones html, css and javascript that is available at http://www.hedgerwow.com/360/mwd/accordion/demo.php and I am getting the same problem with the form components but not with the other I mentioned. Hmm if you get the same problem here, it's not so great:( Then it's out of my hands. And I'd say that we should pick another js lib that does not have these issues. I could be convinced to do some YUI equalent.. Could it be the span tags that are in the wicket code? Is it upset because of form components being inside of a span tag maybe? Could be, if this is the problem then it's a really really easy fix.. I can go see if I can replace it with wicket:container or fieldset? WDYT? Thanks for your time, Josh Nino.Martinez wrote: I forgot to mention, that I do think dojo are being picked up at wicket 1.4, some guys talked about it on the dev list. I take it you are using the 1.3? Nino Saturnino Martinez Vazquez Wael wrote: jchappelle wrote: I am trying to render a form inside a Panel within an AccordionPanel. I have even reduced it to trying to only render a TextArea inside a Panel within it. However, when I click on the title of one of the items it expands with nothing but white space within it. Sounds a little wierd. What I would do would be to try to have a simple mock html that used the accordion js and see if I could replicate it there. Theres also a chance that the author of accordion.js has some hints on this. The examples for the AccordionPanel only have a Label inside a Panel as the content. Yeah that's what I needed at the time. Is this not possible? I even tried to use the DojoAccordionContainer but it gave some weird error debug messages that splattered all over my webpage(I'm not even sure how that happened unless it found a FeedbackPanel or something). Im not sure what state dojo are in. I'm starting to lose faith in many of these wicket-stuff projects. PLEASE HELP! Well some of the wicketstuff projects are not being maintained, AFAIK. People are always welcome to maintain them. I saw you wrote a direct mail to me i'll reply on the questions you had there. Thanks, Josh -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://www.nabble.com/file/p19996411/AccordionPage.html AccordionPage.html http://www.nabble.com/file/p19996411/AccordionPage.java AccordionPage.java http://www.nabble.com/file/p19996411/formcontent.html formcontent.html http://www.nabble.com/file/p19996411/formcontent.java formcontent.java http://www.nabble.com/file/p19996411/content.java content.java http://www.nabble.com/file/p19996411/content.html content.html -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Small question about URL rewriting
Btw... amazon.com is a very bad example for a search engine friendly site. Duplicate content like the posted urls are more problematic than non-friendly urls. The perfect solution (unfortunately not always possible) is only one friendly or meaningful url for every unique page. Witold Am Wed, 15 Oct 2008 07:11:16 -0400 schrieb James Carman [EMAIL PROTECTED]: Right, I guess that's what I meant by friendly too. Friendly to search engines, not just our eyes. On Wed, Oct 15, 2008 at 7:08 AM, Daan van Etten [EMAIL PROTECTED] wrote: Keeping keywords in URLs also improves search engine rankings. Regards, Daan On 15 okt 2008, at 13:01, James Carman wrote: When Amazon.com does something like this, they still use an id on the URL. Check out these two URLs (which are equivalent and happen to be for a book I was suggesting to someone): http://www.amazon.com/Pragmatic-Version-Control-Using-Subversion/dp/0974514063 http://www.amazon.com/dp/0974514063 They just add in the text to make it more friendly I guess. On Wed, Oct 15, 2008 at 6:09 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, I don't know of an existing working solution. A while ago some people where working on this, according to the mailing list: http://mail-archives.apache.org/mod_mbox/wicket-dev/200802.mbox/[EMAIL PROTECTED] You can prefix the article title with the date (as I did on my blog), so you have less chance on name clashes. Regards, Daan On 15 okt 2008, at 11:58, Azzeddine Daddah wrote: Hi Daan, Thanks for your quick response :). It's a really interesting article to read. I don't really want to set the ID's of my product in the URL. I was thinking to do something like this :) : http://stuq.nl/weblog/articles/create-restful-urls-with-wickethttp://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket in stead of http://stuq.nl/weblog/articles/12345http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket The problem is that you cannot be sure that the article title is unique. Kind regards, Hbiloo http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket On Wed, Oct 15, 2008 at 11:31 AM, Daan van Etten [EMAIL PROTECTED] wrote: Hi Hbiloo, Check out the various UrlCodingStrategies. See http://cwiki.apache.org/WICKET/url-coding-strategies.html I wrote something about RESTful urls here: http://stuq.nl/weblog/2008-06-20/create-restful-urls-with-wicket Regards, Daan On 15 okt 2008, at 11:19, Azzeddine Daddah wrote: Hi, I wanna just know if there is a way to rewrite URLs. For example to do something like this: From: http://mydomain.com/product/productNumber/12345 To: http://mydomain.com/product/this-is-my-product Regards, Hbiloo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple RadioGroups in an Table....
tada https://issues.apache.org/jira/browse/WICKET-1055 -igor On Wed, Oct 15, 2008 at 8:49 AM, Igor Vaynberg [EMAIL PROTECTED]wrote: there is an issue in jira which provides a patch for this so you can lookat that. the change is pretty simple. i will try to roll it into 1.4 soon if i have time. -igor On Wed, Oct 15, 2008 at 3:00 AM, Joel Halbert [EMAIL PROTECTED]wrote: Hi, In follow up to the following thread: http://wicket.markmail.org/search/?q=multiple%20radiogroup%20in%20table#query:multiple%20radiogroup%20in%20table+page:1+mid:4mgyvni2ggbffkfq+state:results Can anyone offer any suggestions as to how one might roll their own component, as suggested, to achieve the desired behaviour? Thx, Joel -- SU3 Analytics Ltd 61b Oxford Gardens W10 5UJ London Tel: +44 20 8960 2634 Mob: +44 75 2501 0825 www.su3analytics.com SU3 Analytics Ltd is a company registered in England and Wales under company number 06639473 at registered address 61b Oxford Gardens, London W10 5UJ, United Kingdom. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: right click popup context menu
Hi Doug, thank you very much for your time and patience. I try it again using only the dependencies from the contrib-yui-examples AND IT'S WORKING. Unfortunately we strongly use the generic concept from java and the current context2menu is at the moment only supported by wicket1.3, which is not jdk1.5 compatible (at least concerning the generics concept). Any idea about the scheduling planing of context2menu in wicket 1.4? Thanks, mkamneng. Doug Leeper wrote: I just updated from SVN for projects wicketstuff-yui-examples and wicket-contrib-yui. Did a mvn eclipse:eclipse on both. in the wicketstuff-yui-examples, i did a mvn jetty:run There were no errors and I was able to access the web app and subsequently the menu2 examples. As far as your error...not sure. There has to be some other error that you are not mentioning. What other errors are you seeing in eclipse? -- View this message in context: http://www.nabble.com/right-click-popup-context-menu-tp15876468p2233.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GuiceInjectorHolder inside WebApplication
But I only need to keep a reference to a Guice injector in my WebApplication to use it across some methods in it, I don't need it inside my wicket components... I think the wicket-guice integration serves a different purpose, correct me if I'm wrong. Edgar Merino richardwilko escribió: Have you looked at the wicket guice integration? I think that does it already. Richard Edgar Merino wrote: Let me correct that last response: the problem is not solved yet. I thought it was but after redeploying my application again I got a serialization exception, why didn't the previously supplied solution didn't work? can anyone give me a hand on this? thanks in advance. Edgar Merino Edgar Merino escribió: Ok I re-read the javadoc for the GuiceInjectorHolder and found out I had to use it as a MetaDataKey, so I did that in my application: public void init() { //initialization code Injector injector = Guice.createInjector(); setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new GuiceInjectorHolder(injector)); } public void someMethod() { Injector injector = ((GuiceInjectorHolder) getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.getInstance(SomeClass.class); } I was thinking about adding a GuiceComponentInjector to my application, but I'm not using guice with wicket so I don't think I need that, any suggestion? Edgar Merino Edgar Merino escribió: Hello, I need to hold a reference to a Guice injector inside my WebApplication, however since the injector is not serializable I tried using a GuiceInjectorHolder and keeping a reference to it in my WebApplication, but I'm still getting serialization exceptions when redeploying my application. Why didn't it work? what should I do in this case to keep a reference to my Guice injector? Thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange exception when trying to use wicketstuff-annotation library
On Wed, 15 Oct 2008, Azzeddine Daddah wrote: When trying to use the wicketstuff-annotation library I got a very strange Exception: *log4j:ERROR Error occured while converting date.*. This causes that my application couldn't be started up. When removing this jar and his dependencies from the lib and just use the normal Wicket mounting strategies everything works fine again. Does someone already got the same problem and knowd what the cause is? Nope, but you could check slf4j and log4j versions. Having them messed up has caused strange problems before. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GuiceInjectorHolder inside WebApplication
the application class is not serialized, so there should be no serializatoin problems. can you post the stack trace? -igor On Wed, Oct 15, 2008 at 12:57 PM, Edgar Merino [EMAIL PROTECTED] wrote: But I only need to keep a reference to a Guice injector in my WebApplication to use it across some methods in it, I don't need it inside my wicket components... I think the wicket-guice integration serves a different purpose, correct me if I'm wrong. Edgar Merino richardwilko escribió: Have you looked at the wicket guice integration? I think that does it already. Richard Edgar Merino wrote: Let me correct that last response: the problem is not solved yet. I thought it was but after redeploying my application again I got a serialization exception, why didn't the previously supplied solution didn't work? can anyone give me a hand on this? thanks in advance. Edgar Merino Edgar Merino escribió: Ok I re-read the javadoc for the GuiceInjectorHolder and found out I had to use it as a MetaDataKey, so I did that in my application: public void init() { //initialization code Injector injector = Guice.createInjector(); setMetaData(GuiceInjectorHolder.INJECTOR_KEY, new GuiceInjectorHolder(injector)); } public void someMethod() { Injector injector = ((GuiceInjectorHolder) getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.getInstance(SomeClass.class); } I was thinking about adding a GuiceComponentInjector to my application, but I'm not using guice with wicket so I don't think I need that, any suggestion? Edgar Merino Edgar Merino escribió: Hello, I need to hold a reference to a Guice injector inside my WebApplication, however since the injector is not serializable I tried using a GuiceInjectorHolder and keeping a reference to it in my WebApplication, but I'm still getting serialization exceptions when redeploying my application. Why didn't it work? what should I do in this case to keep a reference to my Guice injector? Thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GuiceInjectorHolder inside WebApplication
This is happening when using a WebPage, but I'm not using an injector there... I have a class that receives a service as a parameter, that service is being fetch by the guice injector and passed to the component in the WebApplication: public class MyApp extends WebApplication { private Injector injector; ... public ListWidget getWidgets() { ListWidget widgets = new ArrayListWidget(); //the service needs some resources injected, so is handled by the injector Service service = injector.getInstance(Service.class); widgets.add(new Widget(service)); ... return widgets; } } class Widget { private Service service; Widget(Service service) { this.service = service; } public Panel getPanel() { return SomePanel(service); } } The above is similar to what I'm doing in my real application, below is the stack trace. Any help is greatly appreciated. Edgar Merino org.apache.wicket.WicketRuntimeException: Failed to serialize [Page class = org.devpower.wicket.cms.core.page.AdminPage, id = 0, version = 0] at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.writeObject(SecondLevelCacheSessionStore.java:392) 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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1939) 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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:624) at org.apache.catalina.session.StandardManager.unload(StandardManager.java:538) at org.apache.catalina.session.StandardManager.stop(StandardManager.java:794) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5325) at com.sun.enterprise.web.WebModule.stop(WebModule.java:357) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1102) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2207) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2137) at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:226) at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:313) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:976) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176) at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308) at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226) at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStopEvent(ServerDeploymentTarget.java:332) at com.sun.enterprise.deployment.phasing.ApplicationStopPhase.runPhase(ApplicationStopPhase.java:136) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919) at com.sun.enterprise.deployment.phasing.PEDeploymentService.stop(PEDeploymentService.java:652)
Re: GuiceInjectorHolder inside WebApplication
right. you are not keeping a reference to the injector itself, but you are giving webpage a reference to a service that is not serializable...thus your problem. i suggest using wicket-guice, it has provisions to make serialization work seamlessly when you pass instances of guice services into components/pages, even if they are not serializable. you can read the spring page on our wiki which explains serialization issues. wicket-guice uses an identical way of fixing this as the spring integration. -igor On Wed, Oct 15, 2008 at 3:02 PM, Edgar Merino [EMAIL PROTECTED] wrote: This is happening when using a WebPage, but I'm not using an injector there... I have a class that receives a service as a parameter, that service is being fetch by the guice injector and passed to the component in the WebApplication: public class MyApp extends WebApplication { private Injector injector; ... public ListWidget getWidgets() { ListWidget widgets = new ArrayListWidget(); //the service needs some resources injected, so is handled by the injector Service service = injector.getInstance(Service.class); widgets.add(new Widget(service)); ... return widgets; } } class Widget { private Service service; Widget(Service service) { this.service = service; } public Panel getPanel() { return SomePanel(service); } } The above is similar to what I'm doing in my real application, below is the stack trace. Any help is greatly appreciated. Edgar Merino org.apache.wicket.WicketRuntimeException: Failed to serialize [Page class = org.devpower.wicket.cms.core.page.AdminPage, id = 0, version = 0] at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.writeObject(SecondLevelCacheSessionStore.java:392) 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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1939) 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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:624) at org.apache.catalina.session.StandardManager.unload(StandardManager.java:538) at org.apache.catalina.session.StandardManager.stop(StandardManager.java:794) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5325) at com.sun.enterprise.web.WebModule.stop(WebModule.java:357) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1102) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2207) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2137) at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:226) at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:313) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:976) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176) at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308) at
Re: GuiceInjectorHolder inside WebApplication
Ok, using wicket-guice now, problem solved... I didn't want to depend on guice inside my wicket components, but integration is perfect, so I guess I'll just leave it like that, thank you Igor. Edgar Merino Igor Vaynberg escribió: right. you are not keeping a reference to the injector itself, but you are giving webpage a reference to a service that is not serializable...thus your problem. i suggest using wicket-guice, it has provisions to make serialization work seamlessly when you pass instances of guice services into components/pages, even if they are not serializable. you can read the spring page on our wiki which explains serialization issues. wicket-guice uses an identical way of fixing this as the spring integration. -igor On Wed, Oct 15, 2008 at 3:02 PM, Edgar Merino [EMAIL PROTECTED] wrote: This is happening when using a WebPage, but I'm not using an injector there... I have a class that receives a service as a parameter, that service is being fetch by the guice injector and passed to the component in the WebApplication: public class MyApp extends WebApplication { private Injector injector; ... public ListWidget getWidgets() { ListWidget widgets = new ArrayListWidget(); //the service needs some resources injected, so is handled by the injector Service service = injector.getInstance(Service.class); widgets.add(new Widget(service)); ... return widgets; } } class Widget { private Service service; Widget(Service service) { this.service = service; } public Panel getPanel() { return SomePanel(service); } } The above is similar to what I'm doing in my real application, below is the stack trace. Any help is greatly appreciated. Edgar Merino org.apache.wicket.WicketRuntimeException: Failed to serialize [Page class = org.devpower.wicket.cms.core.page.AdminPage, id = 0, version = 0] at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.writeObject(SecondLevelCacheSessionStore.java:392) 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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1939) 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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:624) at org.apache.catalina.session.StandardManager.unload(StandardManager.java:538) at org.apache.catalina.session.StandardManager.stop(StandardManager.java:794) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5325) at com.sun.enterprise.web.WebModule.stop(WebModule.java:357) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1102) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2207) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2137) at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:226) at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:313) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:976) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176) at
Re: ModalWindow slow in Firefox3
I'm using FF3 on Mac and haven't noticed any speed problems. -Matej 2008/10/15 xiefei [EMAIL PROTECTED]: Anyone else suffer the problem that wicket ModalWindow run slow in Firefox3? This never happens in IE6, and Firefox2, as I remember. We are using 1.4m2 _ 一边聊天一边快速搜索,并把结果共享给好友,立刻试试! http://im.live.cn/Share/18.htm
Guice: injection outside Component
Hello again, using guice's @Inject inside any component works perfect, however I've got some objects (not components) that reside inside a component and need an injected service, since wicket-guice handles only injection inside components, I'm getting null services: public class Instantiator { @Inject Service service; public Panel getPanel(String id) { Author author = service.findAuthor(me); return new SomePanel(id, author); } } I need to fetch the Author outside the panel, the panel is not able to fetch it. One approach might be to get the service from the Application, but I do not want to do this since I don't want the application to know about my Instantiator class, is there a better approach to accomplish what I need? thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Guice: injection outside Component
Try adding a constructor and putting this line in it: *InjectorHolder*.*getInjector*().*inject*(*this*); Works with Spring - haven't used Guice personally. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Oct 15, 2008 at 6:42 PM, Edgar Merino [EMAIL PROTECTED] wrote: Hello again, using guice's @Inject inside any component works perfect, however I've got some objects (not components) that reside inside a component and need an injected service, since wicket-guice handles only injection inside components, I'm getting null services: public class Instantiator { @Inject Service service; public Panel getPanel(String id) { Author author = service.findAuthor(me); return new SomePanel(id, author); } } I need to fetch the Author outside the panel, the panel is not able to fetch it. One approach might be to get the service from the Application, but I do not want to do this since I don't want the application to know about my Instantiator class, is there a better approach to accomplish what I need? thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Guice: injection outside Component
or use salve.googlecode.com and live headache-free :) -igor On Wed, Oct 15, 2008 at 4:53 PM, Jeremy Thomerson [EMAIL PROTECTED] wrote: Try adding a constructor and putting this line in it: *InjectorHolder*.*getInjector*().*inject*(*this*); Works with Spring - haven't used Guice personally. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Oct 15, 2008 at 6:42 PM, Edgar Merino [EMAIL PROTECTED] wrote: Hello again, using guice's @Inject inside any component works perfect, however I've got some objects (not components) that reside inside a component and need an injected service, since wicket-guice handles only injection inside components, I'm getting null services: public class Instantiator { @Inject Service service; public Panel getPanel(String id) { Author author = service.findAuthor(me); return new SomePanel(id, author); } } I need to fetch the Author outside the panel, the panel is not able to fetch it. One approach might be to get the service from the Application, but I do not want to do this since I don't want the application to know about my Instantiator class, is there a better approach to accomplish what I need? thanks in advance. Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Guice: injection outside Component
Thank you Jeremy, I've tried that but it did not work: public class Instantiator { public Instantiator() { Injector injector = ( (GuiceInjectorHolder) CmsApplication.get() .getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.injectMembers(this); } ... } maybe I'm doing something wrong? any other solution? thank you Edgar Merino Jeremy Thomerson escribió: Try adding a constructor and putting this line in it: *InjectorHolder*.*getInjector*().*inject*(*this*); Works with Spring - haven't used Guice personally. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Guice: injection outside Component
Let me correct that last post, I forgot to add the @Inject annotation to the service... it's working... thank you! Edgar Merino Edgar Merino escribió: Thank you Jeremy, I've tried that but it did not work: public class Instantiator { public Instantiator() { Injector injector = ( (GuiceInjectorHolder) CmsApplication.get() .getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector(); injector.injectMembers(this); } ... } maybe I'm doing something wrong? any other solution? thank you Edgar Merino Jeremy Thomerson escribió: Try adding a constructor and putting this line in it: *InjectorHolder*.*getInjector*().*inject*(*this*); Works with Spring - haven't used Guice personally. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there a way to get stateless DDC with onchange notification?
Anyone? Ritesh Trivedi wrote: Hi, Is there a way to get stateless DDC with onchange notifications? Also would be helpful if someone could explain why the wantOnChangeNotification makes DDC stateful even if its enclosed within stateless form and in the stateless bookmarkable page? -- View this message in context: http://www.nabble.com/Is-there-a-way-to-get-stateless-DDC-with-onchange-notification--tp19985764p20004882.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Domain Model as interfaces
Hello, I couldn't find any other place to post this, so I'm doing it here, (it's related to java web development anyway). I've been working on a project where wicket has access to the domain layer through interfaces because I didn't want my project to depend on any dbms, however I've been thinking and the main problem here lies with db4o, since it cannot make use of JPA annotations on entities (domain models). I would like to get rid of those interfaces and use concrete implementations to handle business code inside the entities, but then the above problem arises. So what recommendations can you give to have a fully implemented domain model (using jpa annotations) but still be able to use any dbms (or orm/dmbs) without having to map those the domain model at the service layer? I hope I can get some feedback on this, as it has been the main problem I've been facing when coding scalable web applications. Regards, Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Empty PageParametyers when using HybridUrlCodingStrategy
That combination is wrong. If you use the IndexedHybridUrlCodingStrategy the first parameter is called 0. Secondly the AttributeModifier probably overwrites the generated src attribute. This should work (not tested): PageParameters params = new PageParameters(); params.put(0, myUrl);// changed to put, just to be sure InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(), MyFrame.class, params); add(myFrame); public MyFrame(PageParameters params){ String url = params.getString(0); // changed to getString doSomething(url); } mount(new IndexedHybridUrlCodingStrategy(iframe/MyFrame, MyFrame.class)); // removed leading / Good luck! Erik. itayh wrote: Creating the InlineFrame component: PageParameters params = new PageParameters(); params.add(url, myUrl); InlineFrame myFrame = new InlineFrame(MyFrame, this.getPageMap(), MyFrame.class, params); myFrame.add(new AttributeModifier(src, new Model(/myapp/app/iframe/MyFrame))); add(myFrame); Creating MyFrame: public MyFrame(PageParameters params ){ String url = params.get(url); //the problem is that this params are empty doSomething(url); } Url mounting: mount(new IndexedHybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)); I tried also for the url mounting: mount(new HybridUrlCodingStrategy(/iframe/MyFrame, MyFrame.class)); In all cases the params inside the constructor of MyFrame class has no values in them (size = 0) Thanks, Itay -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: form components within an AccordionPanel
jchappelle wrote: Yea, if it is having the problem in the javascript then it has nothing to do with wicket. I was just hoping you might be a javascript guru. :-) I only change stuff, if it's really needed. You could break a dozen things when correcting stuff.. I have recently found some javascript that works for me and I've almost got a component in wicket created for it. It will work for now. Okay great. However, it would be nice to have a component that is backed by a javascript library that is maintained and kept up to date like YUI. Yeah, thats my thought too. What ever 3rd party javascript api wicket changes it ajax to, i'll probably start doing components for.. I don't know if I would worry about the wicket:container or fieldset stuff. It looks like the big problem is with the javascript and until that is fixed there is no use in tweaking anything else. Yeah my thought too..:( Let me know if you update the component to use something like YUI. I would definately be interested in using it. I could even help out if you need. Okay.. I'll ponder over it.. Thanks, Josh Nino.Martinez wrote: Great that you have done some extensive diagnostics.. jchappelle wrote: Thanks for the quick response. I am using wicket 1.3.4. I have been able to reproduce my problem with a very simplified example that is just an extension of the wicket-contrib-accordion-examples project. I have taken the AccordionPage and added another menu item that has a TextField inside of it. It works fine in Safari and Google Chrome, but not in IE7 or Mozilla 5. In IE7 the input is not rendered at all when the menu item is expanded. However when you close it, it shows up for a split second and then goes away again before the menu item fully closes. Also, the normal menu items seem to show up fine when clicked, but when I close them they reopen again and then go closed really quickly. I have run the code with just the barebones html, css and javascript that is available at http://www.hedgerwow.com/360/mwd/accordion/demo.php and I am getting the same problem with the form components but not with the other I mentioned. Hmm if you get the same problem here, it's not so great:( Then it's out of my hands. And I'd say that we should pick another js lib that does not have these issues. I could be convinced to do some YUI equalent.. Could it be the span tags that are in the wicket code? Is it upset because of form components being inside of a span tag maybe? Could be, if this is the problem then it's a really really easy fix.. I can go see if I can replace it with wicket:container or fieldset? WDYT? Thanks for your time, Josh Nino.Martinez wrote: I forgot to mention, that I do think dojo are being picked up at wicket 1.4, some guys talked about it on the dev list. I take it you are using the 1.3? Nino Saturnino Martinez Vazquez Wael wrote: jchappelle wrote: I am trying to render a form inside a Panel within an AccordionPanel. I have even reduced it to trying to only render a TextArea inside a Panel within it. However, when I click on the title of one of the items it expands with nothing but white space within it. Sounds a little wierd. What I would do would be to try to have a simple mock html that used the accordion js and see if I could replicate it there. Theres also a chance that the author of accordion.js has some hints on this. The examples for the AccordionPanel only have a Label inside a Panel as the content. Yeah that's what I needed at the time. Is this not possible? I even tried to use the DojoAccordionContainer but it gave some weird error debug messages that splattered all over my webpage(I'm not even sure how that happened unless it found a FeedbackPanel or something). Im not sure what state dojo are in. I'm starting to lose faith in many of these wicket-stuff projects. PLEASE HELP! Well some of the wicketstuff projects are not being maintained, AFAIK. People are always welcome to maintain them. I saw you wrote a direct mail to me i'll reply on the questions you had there. Thanks, Josh -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://www.nabble.com/file/p19996411/AccordionPage.html AccordionPage.html http://www.nabble.com/file/p19996411/AccordionPage.java AccordionPage.java http://www.nabble.com/file/p19996411/formcontent.html formcontent.html http://www.nabble.com/file/p19996411/formcontent.java formcontent.java