SV: How to handle Runtime Exception in wicket?
how to redirect to external url say www.google.com in case runtimeexception occurs You need to drill down to the HttpServletResponse and call sendRedirect(). - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax based filling of form
Well the model doesn't update. (Not that I'd expect it to.) Here's some pieces of my code I deem relevant to the problem. if (key == null || key.getIsbn() == null) { book = new Book(); } else { book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId()); } setDefaultModel(new CompoundPropertyModelBook(book)); // ... isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(final AjaxRequestTarget target) { try { book = bookRetriever.getBook(isbnField.getInput()); modelChanged(); target.addComponent(titleField); //... target.addComponent(genrefield); } catch (SQLException e) { //... } } }); John Krasnay wrote: Sounds like you're on the right track. What's the problem? jk On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote: I have a panel with a form. This form has several fields, one of which is the ISBN of a book. The fields are filled by a CompoundPropertyModel if the user is editing his previous entry, and they are empty if the user is adding a new book. Simply entering data or updating it and then submitting already works. But now I want to fetch the data for the other fields if the ISBN is already in the database. It is a multi-user system, so it is in fact possible that the ISBN is already in there. I was thinking of achieving this with AJAX, but I'm not really sure how to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, where all the related fields are added to the target. But as the ISBN is part of the model, I don't really now how to get this working. Any hints on what direction I should be searching in? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to add Random number to URL ?
Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Thanks...
Re: How to add Random number to URL ?
FaRHaN wrote: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Why don't you just adjust your cache headers? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DefaultDataTable gets no CSS styling
Are you sure? Other components, such as ModalWindow, comes with styling included. You just add the component and it adds the appropriate CSS itself. I can see in the markup produced for the DefaultDataTable that the table rows have the classes odd and even, am I supposed to define these classes in my own CSS? igor.vaynberg wrote: you are supposed to provide your own css -igor On Tue, Aug 11, 2009 at 1:35 AM, Lukas Wilczeklukas.wilc...@gmail.com wrote: Hi, I'm trying to use a DefaultDataTable and it shows with correct data but it has no styling at all. When I view source in the browser I can't see any CSS file that has been added to the markup (apart from my own and the one for ModalWindow). I've looked through the source folders for Wicket Extensions and I can't see any suitable CSS file there either. I've probably missunderstood how this works, please help me understand :) I'm using wicket 1.4.0 Thanx - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/DefaultDataTable-gets-no-CSS-styling-tp24913804p24950509.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
Take a look at NonCachingImage. Witold Am Thu, 13 Aug 2009 00:44:07 -0700 (PDT) schrieb FaRHaN farhan.ba...@ymail.com: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Thanks... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
I have used all of the Cache Headers but they didn't work for me. Only 'Refresh' Meta tag works, but all other Tags (Cache-Control, Expires, etc.) not working in IE or FF. I don't know why... That's why i want to access page from Server rather than stored from the browser. ??? From: burnstone burnst...@burnstone.ch To: users@wicket.apache.org Sent: Thursday, August 13, 2009 12:46:50 PM Subject: Re: How to add Random number to URL ? FaRHaN wrote: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Why don't you just adjust your cache headers? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
How can i use this for every request ? As i want to generate a unique URL for every page (not for images), any examples ??? From: Witold Czaplewski witold-mail...@cts-media.eu To: users@wicket.apache.org Sent: Thursday, August 13, 2009 2:58:18 PM Subject: Re: How to add Random number to URL ? Take a look at NonCachingImage. Witold Am Thu, 13 Aug 2009 00:44:07 -0700 (PDT) schrieb FaRHaN farhan.ba...@ymail.com: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Thanks... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Random number to URL ?
This class modifies the src attribute of the img tag: ... protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String url = tag.getAttributes().getString(src); url = url + ((url.indexOf(?) = 0) ? : ?); url = url + wicket:antiCache= + System.currentTimeMillis(); tag.put(src, url); } ... Maybe you can do something similar with your links. Am Thu, 13 Aug 2009 01:15:48 -0700 (PDT) schrieb FaRHaN farhan.ba...@ymail.com: How can i use this for every request ? As i want to generate a unique URL for every page (not for images), any examples ??? From: Witold Czaplewski witold-mail...@cts-media.eu To: users@wicket.apache.org Sent: Thursday, August 13, 2009 2:58:18 PM Subject: Re: How to add Random number to URL ? Take a look at NonCachingImage. Witold Am Thu, 13 Aug 2009 00:44:07 -0700 (PDT) schrieb FaRHaN farhan.ba...@ymail.com: Hi, I want to add a random number to my requested URL, so that each request to my page go to server and not load from the cache. How can i add a random number to each requested URL ? Some examples acheiving this behaviour will be appreciated... Thanks... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff releases?
Yeah I think too that 1.4.1.X is the best. I'd be happy to volunteer but am swamped with work. Thanks for the good work so far.. regards Nino 2009/8/13 Jeremy Thomerson jer...@wickettraining.com: The idea behind the matching release numbers was so that Wicket newbs could more easily adopt the most commonly used and supported wicketstuff projects into their projects. I would like to be able to still have that. No compatibility matrix needed - if you are using Wicket 1.4.1 - use WS 1.4.1. That being said, I think that the best solution is that we have 1.4.1.X where X is our release number. The biggest problem is still what a hassle it is to build a release. When I built rc8, it took a couple days because people had broken junk in trunk, not followed pom conventions, etc. Plus, syncing the build artifacts to the repo was a pain because it's not documented, and I'm no maven guru. I haven't even had time to build 1.4.0 to match Wicket yet, and that is arguably the most important one since we started WS Core. If someone would like to help by building 1.4.0 and documenting a streamlined process, I would love it. I have been running a Continuum server that was doing continuous builds as well. I think that we could see about using the release process on Continuum to run mvn release:deploy and automating releases. I just don't have time this week, and probably won't next week. So - anyone volunteering? -- Jeremy Thomerson http://www.wickettraining.com On Wed, Aug 12, 2009 at 1:01 PM, nino martinez waelnino.martinez.w...@gmail.com wrote: Hmm I believe with may way it should be possible todo both.. However I don't much care what the releases are named its the quality that matters to me. No matter what the customer will blame me if something does not work, they don't care if its a 1.4, 1.4.1.1 release snapshot or snafu:) Jeremy are doing a fine job. However feedback are always nice, I like to get that too from my wicketstuffings. -my two cents.. 2009/8/12 Martijn Dashorst martijn.dasho...@gmail.com: Given the lackluster release history of Wicket Stuff, I'd suggest going with whatever the only person able *AND* willing to cut releases wants. In this case, that is Jeremy. If you don't want to follow the general Wicket Stuff release processes, you're welcome to maintain your own projects and release them at your own schedule. It doesn't make sense to me to go back on a decision that was made, just because 2 folks think it is better. IMO having a release following Wicket's releases is better than not having a release. The problem with Wicket Stuff is not that they follow the Wicket release cycle, it is that nobody gives a damn to cut releases. Jeremy fixed that. If you think you can do better, don't put your project in the Wicket Stuff parent group, but release the software on your own. Martijn On Wed, Aug 12, 2009 at 3:36 PM, Reinhard Nägelereinhard.naeg...@mgm-tp.com wrote: I'd like to second Maartens point. Identical releases to Wicket itself would mean that it always depends on Wicket. Independent releases would not be possible. Bugs could not be fixed and new features could not be added without a new Wicket release. This doesn't really make sense to me. Reinhard Jeremy Thomerson schrieb: Now that Wicket 1.4.0 is out, I wonder which wicketstuff core version is compatible. There is no 1.4.0 version of wicketstuff core (yet?). Should I use 1.4-rc8-SNAPSHOT? It should be just 1.4-SNAPSHOT. 1.4-rc8-SNAPSHOT was an accidental relic of after I built rc8 Side note: I don't see the version of wicket-stuff has to match exactly with version of wicket ? Suppose someone releases wicketstuff-core-1.4.0 today, and tomorrow some bugs are fixed in wicketstuff-core, then we can't release these bug-fixes until wicket 1.4.1 is out ? IMO, wicket is just a dependency of wicketstuff-code (as defoined in the pom) and both projects should use their own unrelated version numbers. wdyt ? When I setup wicketstuff-core, I proposed that we structure it to have identical releases to Wicket. The community agreed. I still think this should be the case. -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
Portlet and ... 2.0 (How to pass parameters?)
Hi all!, I have some questions about parameter passing in portal environment. I saw that WebPage class can have access to the Application class but not the portlet class. This makes a little tricky to handle requests because: We can set session paramaters. And can call functions inside Application (WicketExamplesMenuApplication.getExamples()). @Override public void onClick() { int index = ((LoopItem)getParent()).getIteration(); ExampleApplication ea = WicketExamplesMenuApplication.getExamples().get( index + 1); PortletSession session = ((PortletRequestContext)RequestContext.get()).getPortletRequest() .getPortletSession(); session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR, ea); } But it will be the portlet class the responsible for handling processing. So the only way to pass information from the onClick function to the portlet application for rendering (for example) is using the portlet session. But I suppose that's not the preferred way. What's the best way to pass information to the portlet class? Is there any way to use the portlet class like we use the application class (WicketExamplesMenuApplication.getExamples() - WicketExamplesMenuPortlet.getExamples()) I also saw that in the portlet example, the examples structure is initialized by the WicketExamplesMenuPortlet and sent to the WicketExamplesMenuApplication using the servlet context. But this will overbloat the servlet attributes storage space. Also this should be solved if webpages could access to the portlet class directly. Why to do this way? I want to know all this because I want to use shared render parameters (I put there a user id and all the portlets update accordingly). To do this I will do: 1.- Onclick: Put the Id on the session like above. 2.- Portlet.DoView: Recover id from session and store it in shared render params. 3.- Delete it from session. Is this the correct way to do it? Thank you very much in advance...
Re: How to add Random number to URL ?
You request puzzles me. By default Wicket adds headers to every page that will make any decent browser written since 1996 not cache the page. What is your intention? Regards, Erik. FaRHaN wrote: How can i use this for every request ? As i want to generate a unique URL for every page (not for images), any examples ??? -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wiki link
Hi Russel Thanks for the documentation! But im not sure what it describes. Does your document describe howto make a wicket application as a facebook application or just to use facebook as authentication provider? By facebook application I mean the little apps that are passed around in facebook? 2009/8/13 Russell Simpkins russellsimpk...@hotmail.com: Sorry, the link should be http://cwiki.apache.org/WICKET/adding-facebook-connect.html From: russellsimpk...@hotmail.com To: users@wicket.apache.org Subject: RE: Ajax based filling of form Date: Wed, 12 Aug 2009 21:12:38 -0400 All, I'm still green with Wicket and even greener on Facebook, so I had a hard time adding Facebook connect to my wicket app. I think this is due in large part to Facebook changing so often. Any ways, I have written up a new page for anyone else trying to do Facebook connect with Wicket. If I get some more time I would like to come up with a quick start, for now the wiki entry is all I had time to squeeze in. http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect Russ _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009 _ Get free photo software from Windows Live http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
StringResourceModel ignores Converters?
Hi I need to use a StringResourceModel to compile a string with multiple parameter substitutions. I have a lot of converters active which should take care of all these values and which do work when using for example a PropertyModel elsewhere. Unfortunately it seems the converters are completely ignored for StringResourceModels when doing the parameter substitution? I always get the data in its raw (.toString) form instead of the converted?! Is this a bug or a feature? Thanks Matt smime.p7s Description: S/MIME Cryptographic Signature
multilangual dropdown
Hello all, I have a dropdown which is generated from Java code. Currently my code reads a property file, sets the values in an object and places all the objects in an arraylist. Each object has a toString method, so the value is correctly shown in the dropdown. Now I want to show a value dependant on the language. I already have implemented multilingual text in the site with (wicket:message) and MessageLabel, but I think thats not possible for this dropdown. Does anyone know whether this is possible? Thank you, Sjoerd - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: StringResourceModel ignores Converters?
Hi Matt, Converters are only used during form submission. So to answer your question: this seems like a feature. Regards, Erik. Matthias Keller wrote: Hi I need to use a StringResourceModel to compile a string with multiple parameter substitutions. I have a lot of converters active which should take care of all these values and which do work when using for example a PropertyModel elsewhere. Unfortunately it seems the converters are completely ignored for StringResourceModels when doing the parameter substitution? I always get the data in its raw (.toString) form instead of the converted?! Is this a bug or a feature? Thanks Matt -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Creating components in onBeforeRender() method
Hello, I am working on a library based on wicket framework and I couldnt find some suitable solution when creating component hierarchies. For example I have a base class AbstractLink for links (DownloadLink, LabelLink, IconLink, SubmitLink, ...): public abstract class AbstractLink extends Panel { private ILinkComponent linkComponent; private boolean attached= false; protected void onBeforeRender() { if(!attached) { removeAll(); linkComponent = createLinkComponent(); linkComponent.setWidht(150, Unit.PX); add(linkComponent); attached = true; } } protected abstract ILinkComponent createLinkComponent(String id); // PROBLEM METHOD - NOT SURE that linkComponent exists public void setTooltip(IModel tooltip) { linkComponent.setTooltip(tootlip); } } public abstract class LabelLink extends AbstractLink { private IModel labelModel; public LabelLink(IModel labelModel) { this.labelModel= labelModel; } protected ILinkComponent createLinkComponent(String id) { Link linkComponent = new Link(id); linkComponent.add(new Label(labelModel)); return linkComponent; } } Subclassing panels are responsible for creating linkComponent. Overriden method createLinkComponent() usually uses attribute from subclass (labelModel in LabelLink). For this reason I couldnt call createLinkComponent in AbstractLink's constructor (LabelLink attribute labelModel is null). So I use the trick with onBeforeRender method. The problem is that I couldnt write methods (setTooltip) delegating to linkComponent in AbstractLink, because i cannot be sure that linkComponent exists. Is there someone who solved this sort of problem? Or how do you handle similar situations? Thanks, michal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax based filling of form
The problem is the CompoundPropertyModel continues to point to the original Book object. You would have to get rid of the CompoundPropertyModel and give each FormComponent its own model that is tolerant to changes to the book member. Something like this would work: add(new TextField(title, new PropertyModel(this, book.title))); jk On Thu, Aug 13, 2009 at 09:15:50AM +0200, Linda van der Pal wrote: Well the model doesn't update. (Not that I'd expect it to.) Here's some pieces of my code I deem relevant to the problem. if (key == null || key.getIsbn() == null) { book = new Book(); } else { book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId()); } setDefaultModel(new CompoundPropertyModelBook(book)); // ... isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(final AjaxRequestTarget target) { try { book = bookRetriever.getBook(isbnField.getInput()); modelChanged(); target.addComponent(titleField); //... target.addComponent(genrefield); } catch (SQLException e) { //... } } }); John Krasnay wrote: Sounds like you're on the right track. What's the problem? jk On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote: I have a panel with a form. This form has several fields, one of which is the ISBN of a book. The fields are filled by a CompoundPropertyModel if the user is editing his previous entry, and they are empty if the user is adding a new book. Simply entering data or updating it and then submitting already works. But now I want to fetch the data for the other fields if the ISBN is already in the database. It is a multi-user system, so it is in fact possible that the ISBN is already in there. I was thinking of achieving this with AJAX, but I'm not really sure how to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, where all the related fields are added to the target. But as the ISBN is part of the model, I don't really now how to get this working. Any hints on what direction I should be searching in? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: Portlet and ... 2.0 (How to pass parameters?)
But it will be the portlet class the responsible for handling processing. So the only way to pass information from the onClick function to the portlet application for rendering (for example) is using the portlet session. But why would you want to go via the Application? The WicketPortlet is mostly just the front controller responsible for mapping between the portlet world and the Wicket world: Either use a custom WebSession for the portlet app, or pass the values you need in the PageParameters you send to the response page in your onClick()/onSubmit(). This assumes the onClick() is for a link on a Page that is part of the portlet application. Rendering is left to these Pages. I also saw that in the portlet example, the examples structure is initialized by the WicketExamplesMenuPortlet and sent to the WicketExamplesMenuApplication using the servlet context. But this will overbloat the servlet attributes storage space. Also this should be solved if webpages could access to the portlet class directly. Why to do this way? The Examples portlet is a bit strange compared to how you would normally do things it seems. 1.- Onclick: Put the Id on the session like above. 2.- Portlet.DoView: Recover id from session and store it in shared render params. 3.- Delete it from session. Is this the correct way to do it? You could try making normal PortletURLs instead of using Wicket Link elements; use setProperty()/addProperty() to set the portlet parameter. Presumably Wicket's Portlet API implementation will deal with the mapping just as it does today with mapping to and from PageParameters. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: multilangual dropdown
You can have all the objects have an getResourceKey method. Override the displayvalue of IChoiceRenderer and show the value. Example myproperties_sv.properties value1=ett test myProperties_en.properties value1=A test The Object class MyObject{ private String getResourceKey; .. getters and setters } new IChoiceRenderer(){ public Object getDisplayValue( Object obj ){ if( obj instanceof MyObject ){ // The this in getLocalizer must be a component class return getLocalizer().getString( ((MyObject)obj).getResourceKey() , this ); } return null; } } Set the local and you can display the value -- View this message in context: http://www.nabble.com/multilangual-dropdown-tp24954084p24954218.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff releases?
To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Aug 12, 2009 at 7:27 PM, Jeremy Thomersonjer...@wickettraining.com wrote: The idea behind the matching release numbers was so that Wicket newbs could more easily adopt the most commonly used and supported wicketstuff projects into their projects. I would like to be able to still have that. No compatibility matrix needed - if you are using Wicket 1.4.1 - use WS 1.4.1. That being said, I think that the best solution is that we have 1.4.1.X where X is our release number. The biggest problem is still what a hassle it is to build a release. When I built rc8, it took a couple days because people had broken junk in trunk, not followed pom conventions, etc. Plus, syncing the build artifacts to the repo was a pain because it's not documented, and I'm no maven guru. I haven't even had time to build 1.4.0 to match Wicket yet, and that is arguably the most important one since we started WS Core. If someone would like to help by building 1.4.0 and documenting a streamlined process, I would love it. I have been running a Continuum server that was doing continuous builds as well. I think that we could see about using the release process on Continuum to run mvn release:deploy and automating releases. I just don't have time this week, and probably won't next week. So - anyone volunteering? -- Jeremy Thomerson http://www.wickettraining.com On Wed, Aug 12, 2009 at 1:01 PM, nino martinez waelnino.martinez.w...@gmail.com wrote: Hmm I believe with may way it should be possible todo both.. However I don't much care what the releases are named its the quality that matters to me. No matter what the customer will blame me if something does not work, they don't care if its a 1.4, 1.4.1.1 release snapshot or snafu:) Jeremy are doing a fine job. However feedback are always nice, I like to get that too from my wicketstuffings. -my two cents.. 2009/8/12 Martijn Dashorst martijn.dasho...@gmail.com: Given the lackluster release history of Wicket Stuff, I'd suggest going with whatever the only person able *AND* willing to cut releases wants. In this case, that is Jeremy. If you don't want to follow the general Wicket Stuff release processes, you're welcome to maintain your own projects and release them at your own schedule. It doesn't make sense to me to go back on a decision that was made, just because 2 folks think it is better. IMO having a release following Wicket's releases is better than not having a release. The problem with Wicket Stuff is not that they follow the Wicket release cycle, it is that nobody gives a damn to cut releases. Jeremy fixed that. If you think you can do better, don't put your project in the Wicket Stuff parent group, but release the software on your own. Martijn On Wed, Aug 12, 2009 at 3:36 PM, Reinhard Nägelereinhard.naeg...@mgm-tp.com wrote: I'd like to second Maartens point. Identical releases to Wicket itself would mean that it always depends on Wicket. Independent releases would not be possible. Bugs could not be fixed and new features could not be added without a new Wicket release. This doesn't really make sense to me. Reinhard Jeremy Thomerson schrieb: Now that Wicket 1.4.0 is out, I wonder which wicketstuff core version is compatible. There is no 1.4.0 version of wicketstuff core (yet?). Should I use 1.4-rc8-SNAPSHOT? It should be just 1.4-SNAPSHOT. 1.4-rc8-SNAPSHOT was an accidental relic of after I built rc8 Side note: I don't see the version of wicket-stuff has to match exactly with version of wicket ? Suppose someone releases wicketstuff-core-1.4.0 today, and tomorrow some bugs are fixed in wicketstuff-core, then we can't release these bug-fixes until wicket 1.4.1 is out ? IMO, wicket is just a dependency of wicketstuff-code (as defoined in the pom) and both projects should use their own unrelated version numbers. wdyt ? When I setup wicketstuff-core, I proposed that we structure it to have identical releases to Wicket. The community agreed. I still think this should be the case. -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail:
RE: wiki link
It describes how to authenticate with Facebook using Facebook Connect. Once you have an authenticated user, you can get information about that user and display Facebook information in your application. Our app, pigspigot.com is a user generated greeting card site, so we want get your friends upcoming birthdays or other events and make it easier to send cards. I wrote this up because the example on the wicket does not work with the most recent api. Russ Date: Thu, 13 Aug 2009 14:10:46 +0200 Subject: Re: wiki link From: nino.martinez.w...@gmail.com To: users@wicket.apache.org Hi Russel Thanks for the documentation! But im not sure what it describes. Does your document describe howto make a wicket application as a facebook application or just to use facebook as authentication provider? By facebook application I mean the little apps that are passed around in facebook? 2009/8/13 Russell Simpkins russellsimpk...@hotmail.com: Sorry, the link should be http://cwiki.apache.org/WICKET/adding-facebook-connect.html From: russellsimpk...@hotmail.com To: users@wicket.apache.org Subject: RE: Ajax based filling of form Date: Wed, 12 Aug 2009 21:12:38 -0400 All, I'm still green with Wicket and even greener on Facebook, so I had a hard time adding Facebook connect to my wicket app. I think this is due in large part to Facebook changing so often. Any ways, I have written up a new page for anyone else trying to do Facebook connect with Wicket. If I get some more time I would like to come up with a quick start, for now the wiki entry is all I had time to squeeze in. http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect Russ _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009 _ Get free photo software from Windows Live http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009
Re: Ajax based filling of form
Awesome! Thanks for the help. Regards, Linda John Krasnay wrote: The problem is the CompoundPropertyModel continues to point to the original Book object. You would have to get rid of the CompoundPropertyModel and give each FormComponent its own model that is tolerant to changes to the book member. Something like this would work: add(new TextField(title, new PropertyModel(this, book.title))); jk On Thu, Aug 13, 2009 at 09:15:50AM +0200, Linda van der Pal wrote: Well the model doesn't update. (Not that I'd expect it to.) Here's some pieces of my code I deem relevant to the problem. if (key == null || key.getIsbn() == null) { book = new Book(); } else { book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId()); } setDefaultModel(new CompoundPropertyModelBook(book)); // ... isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(final AjaxRequestTarget target) { try { book = bookRetriever.getBook(isbnField.getInput()); modelChanged(); target.addComponent(titleField); //... target.addComponent(genrefield); } catch (SQLException e) { //... } } }); John Krasnay wrote: Sounds like you're on the right track. What's the problem? jk On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote: I have a panel with a form. This form has several fields, one of which is the ISBN of a book. The fields are filled by a CompoundPropertyModel if the user is editing his previous entry, and they are empty if the user is adding a new book. Simply entering data or updating it and then submitting already works. But now I want to fetch the data for the other fields if the ISBN is already in the database. It is a multi-user system, so it is in fact possible that the ISBN is already in there. I was thinking of achieving this with AJAX, but I'm not really sure how to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, where all the related fields are added to the target. But as the ISBN is part of the model, I don't really now how to get this working. Any hints on what direction I should be searching in? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.54/2300 - Release Date: 08/13/09 06:11:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: multilangual dropdown
Thank you for your quick response. It's working now! Thank you! On Thu, Aug 13, 2009 at 3:04 PM, Mathias Nilssonwicket.program...@gmail.com wrote: You can have all the objects have an getResourceKey method. Override the displayvalue of IChoiceRenderer and show the value. Example myproperties_sv.properties value1=ett test myProperties_en.properties value1=A test The Object class MyObject{ private String getResourceKey; .. getters and setters } new IChoiceRenderer(){ public Object getDisplayValue( Object obj ){ if( obj instanceof MyObject ){ // The this in getLocalizer must be a component class return getLocalizer().getString( ((MyObject)obj).getResourceKey() , this ); } return null; } } Set the local and you can display the value -- View this message in context: http://www.nabble.com/multilangual-dropdown-tp24954084p24954218.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Ajax based filling of form
I believe this is a variable reference issue. // instead of this isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) {...@override protected void onUpdate(final AjaxRequestTarget target) {try {book = bookRetriever.getBook(isbnField.getInput()); // try this@overrideprotected void onUpdate(final AjaxRequestTarget target) {try {book = bookRetriever.getBook(isbnField.getInput());setDefaultModel(new CompoundPropertyModelBook(book));modelChanged(); When you passed in book to the constructor, it now has a reference to your book object, when you execute this line: book = bookRetriever.getBook(isbnField.getInput()); you are only changing the value of the variable book, but not the reference stored in new CompoundPropertyModelBook(book). You should be able pull that off in C++ by changing the value of the pointer, but you can't do that in java. It is similar to this short code String y = example;java.util.HashMap h = new java.util.HashMap();h.put(y,y);// changing the value of y y=not you;// see that the value of y is not the same as the reference we stored in the hashmapSystem.out.println(h.get(y));System.out.println(y); I hope that helps. Russ Date: Thu, 13 Aug 2009 09:15:50 +0200 From: lvd...@heritageagenturen.nl To: users@wicket.apache.org Subject: Re: Ajax based filling of form Well the model doesn't update. (Not that I'd expect it to.) Here's some pieces of my code I deem relevant to the problem. if (key == null || key.getIsbn() == null) { book = new Book(); } else { book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId()); } setDefaultModel(new CompoundPropertyModelBook(book)); // ... isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(final AjaxRequestTarget target) { try { book = bookRetriever.getBook(isbnField.getInput()); modelChanged(); target.addComponent(titleField); //... target.addComponent(genrefield); } catch (SQLException e) { //... } } }); John Krasnay wrote: Sounds like you're on the right track. What's the problem? jk On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote: I have a panel with a form. This form has several fields, one of which is the ISBN of a book. The fields are filled by a CompoundPropertyModel if the user is editing his previous entry, and they are empty if the user is adding a new book. Simply entering data or updating it and then submitting already works. But now I want to fetch the data for the other fields if the ISBN is already in the database. It is a multi-user system, so it is in fact possible that the ISBN is already in there. I was thinking of achieving this with AJAX, but I'm not really sure how to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, where all the related fields are added to the target. But as the ISBN is part of the model, I don't really now how to get this working. Any hints on what direction I should be searching in? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org _ Get back to school stuff for them and cashback for you. http://www.bing.com/cashback?form=MSHYCBpubl=WLHMTAGcrea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1
Re: Wicketstuff releases?
Apparently my statements didn't provide the correct context. s/Wicket Stuff/Wicket Stuff Core/g I'm not talking about dropping code into sf.net's svn repository. I'm talking about cutting releases. This is and has been a problem for Wicket Stuff projects. Like it or not, Wicket Stuff as a whole is a code dumping ground. Unless you release your code, it isn't finished. I've yet to see consistent releases being performed by any of the projects. My observation may be Not constructive but it is a fact. The Wicket Stuff Core project is one of best things that happened to Wicket Stuff, and I give Jeremy my fullest support in organizing those projects in anyway he can. He has asked the community how to cut releases. The community answered and the answer was to follow Wicket releases. There's good reasoning behind this decision. There is little to support the notion that more releases are necessary or even warranted. Yes if your particular project inside Wicket Stuff Core has a bug fix and the release takes a while it is a drag. But consider the fact that if you have your code in good shape, you get releases *for free*! If you want to have your own release schedule, don't put your project inside the Wicket Stuff Core projects, and go ahead to perform your own releases. It's that simple. And if that is my way or the highway then so be it. Wicket Stuff Core is for projects that want to adhere to the Wicket Stuff Core rules, set forward by the guy that is actually doing the work. Respect the time of the guy performing the release, don't add unnecessary time or procedures to his schedule and ensure your code is in optimal shape *ALWAYS*. I find it much more constructive to enable Jeremy to have to jump through as few hoops as possible, than to add more hoops. I don't like to spend other people's free time. If you think that is Not Constructive so be it. Martijn On Wed, Aug 12, 2009 at 5:49 PM, Maarten Bosteelsmbosteels@gmail.com wrote: Martijn, First off: I do appreciate the time and work that Jeremy spends on wicketstuff On Wed, Aug 12, 2009 at 4:05 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Given the lackluster release history of Wicket Stuff, I'd suggest going with whatever the only person able *AND* willing to cut releases wants. In this case, that is Jeremy. If you don't want to follow the general Wicket Stuff release processes, you're welcome to maintain your own projects and release them at your own schedule. Your way or the highway ? I don't consider your reaction very community-friendly. There *are* other people contributing to wicket-stuff. It doesn't make sense to me to go back on a decision that was made, just because 2 folks think it is better. Until someone opens the discussion, we won't know how many people think it is better to have separate version numbers. But you seem to want to kill the discussion (and you will probably succeed, I am giving up already) IMO having a release following Wicket's releases is better than not having a release. true The problem with Wicket Stuff is not that they follow the Wicket release cycle, it is that nobody gives a damn to cut releases. Jeremy fixed that. If you think you can do better, don't put your project in the Wicket Stuff parent group, but release the software on your own. Not very constructive. Regards Maarten Martijn On Wed, Aug 12, 2009 at 3:36 PM, Reinhard Nägelereinhard.naeg...@mgm-tp.com wrote: I'd like to second Maartens point. Identical releases to Wicket itself would mean that it always depends on Wicket. Independent releases would not be possible. Bugs could not be fixed and new features could not be added without a new Wicket release. This doesn't really make sense to me. Reinhard Jeremy Thomerson schrieb: Now that Wicket 1.4.0 is out, I wonder which wicketstuff core version is compatible. There is no 1.4.0 version of wicketstuff core (yet?). Should I use 1.4-rc8-SNAPSHOT? It should be just 1.4-SNAPSHOT. 1.4-rc8-SNAPSHOT was an accidental relic of after I built rc8 Side note: I don't see the version of wicket-stuff has to match exactly with version of wicket ? Suppose someone releases wicketstuff-core-1.4.0 today, and tomorrow some bugs are fixed in wicketstuff-core, then we can't release these bug-fixes until wicket 1.4.1 is out ? IMO, wicket is just a dependency of wicketstuff-code (as defoined in the pom) and both projects should use their own unrelated version numbers. wdyt ? When I setup wicketstuff-core, I proposed that we structure it to have identical releases to Wicket. The community agreed. I still think this should be the case. -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:
JS libraries with Wicket
There was once a nice explanation on how to create a module in wicket that uses a JS library (like JQuery). I checked out wicketstuf core to look into it. I want to try to create my own module of wicket and JS library (and of course to contribute it). Does anyone remember any post / blog / article about it? Or can someone give some pin points on how to do it? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
redirect parent page on submit modal window
I have a page called Review Page with a form with a submit button Return.When user clicks on return I want user to enter comments for return ,for which I want to use a modalwindow when user enters comments and submit the form in modal window , I want to close the modal window and redirect the Review page to some other page , pelase tell me how can I do this?
RE: JS libraries with Wicket
Eyal, There was a post just today to this url: http://www.dzone.com/links/wicket_tutorial_yui_autocomplete_using_json_and_a.html Russ From: egola...@gmail.com Date: Thu, 13 Aug 2009 17:22:48 +0300 Subject: JS libraries with Wicket To: users@wicket.apache.org There was once a nice explanation on how to create a module in wicket that uses a JS library (like JQuery). I checked out wicketstuf core to look into it. I want to try to create my own module of wicket and JS library (and of course to contribute it). Does anyone remember any post / blog / article about it? Or can someone give some pin points on how to do it? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary _ Get free photo software from Windows Live http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009
Re: JS libraries with Wicket
Yea use the JSLibraies that jeremy created its in the wicktstuff core project.. You can see openlayers or the input events for reference... Hmm artwork's probably better.. 2009/8/13 Eyal Golan egola...@gmail.com: There was once a nice explanation on how to create a module in wicket that uses a JS library (like JQuery). I checked out wicketstuf core to look into it. I want to try to create my own module of wicket and JS library (and of course to contribute it). Does anyone remember any post / blog / article about it? Or can someone give some pin points on how to do it? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using Wicket in a Java EE 6 container
what happens if i dont have the filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter piece in my web.xml? will that lead to an error? -igor On Wed, Aug 12, 2009 at 8:22 PM, arunguptaarun.gu...@gmail.com wrote: The fragment can be easily split as: -- cut here -- filter filter-namewicket.Filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class /filter -- cut here -- in web-fragment.xml and -- cut here -- filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.Filter/filter-name url-pattern/*/url-pattern /filter-mapping -- cut here -- in web.xml. This keeps the Wicket registration in web-fragment.xml and the actual params in web.xml. -Arun igor.vaynberg wrote: dont think so because a) not everyone wants to name their application class org.glassfish.samples.WicketApplication b) not everyone wants to use /* mapping i havent read the spec yet but just from looking at the article this is a little troubling from security perspective. just because i add a jar to my app it can now register a servlet behind my back and create a backdoor into the server? -igor On Tue, Aug 11, 2009 at 5:46 AM, Arun Guptaarun.gu...@gmail.com wrote: I wrote a blog describing how to use Wicket with a Servlet 3.0/Java EE 6 container: http://blogs.sun.com/arungupta/entry/totd_91_applying_java_ee Any chance the changes can be integrated in the wicket-*.jar ? -Arun -- Need Application Server ? - Download glassfish.org Blog: http://blogs.sun.com/arungupta - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24948061.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JS libraries with Wicket
thanks guys. i looked into the jquery stuff, but i will also look to your suggestions. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Aug 13, 2009 at 5:46 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Yea use the JSLibraies that jeremy created its in the wicktstuff core project.. You can see openlayers or the input events for reference... Hmm artwork's probably better.. 2009/8/13 Eyal Golan egola...@gmail.com: There was once a nice explanation on how to create a module in wicket that uses a JS library (like JQuery). I checked out wicketstuf core to look into it. I want to try to create my own module of wicket and JS library (and of course to contribute it). Does anyone remember any post / blog / article about it? Or can someone give some pin points on how to do it? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Extending two panels with combined markup
Hi all, I have two panels, panel A B where panel B extends panel A. When using panel B but without giving it it's own markup file it defaults to using A's markup. Now I only want to define a different fragment for panel B but still reuse all of A's markup, is this possible? The findMarkupStream method is final and I didn't see any hooks on to provide a different lookup strategy. Thanks gr, Thies - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff releases?
Regarding step 2: only change the dependency to Wicket in the wicketstuff-core pom.xml, not the versions of wicketstuff poms themselfs (as I just did). Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Extending two panels with combined markup
create an abstract panel that contains A's markup with the exception of the fragment. where the fragment goes add a wicket:child tag. then have A and B extend this panel and have their markup look like: wicket:extend custom fragment /wicket:extend -igor On Thu, Aug 13, 2009 at 8:11 AM, Thies Edelingth...@rrm.net wrote: Hi all, I have two panels, panel A B where panel B extends panel A. When using panel B but without giving it it's own markup file it defaults to using A's markup. Now I only want to define a different fragment for panel B but still reuse all of A's markup, is this possible? The findMarkupStream method is final and I didn't see any hooks on to provide a different lookup strategy. Thanks gr, Thies - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Get all sessions and manipulate them
Hello, This is also a very interesting question that I wanna ask. I've googled and found a single Nabble Mail site about it: http://www.nabble.com/Get-all-sessions-users-for-a-web-application-td213 67229.html We can only get some session data from the RequestLogger, but not the session itself. So if we wanna manipulate all sessions, using the RequestLogger ist not the correct way. Implementing the HttpSessionListener should be work, but the same code will repeated by all projects, that wanna manipulate the sessions any common feature in wicket? Maybe 1.4.x? Regards! Jing -Original Message- From: uud ashr [mailto:uuda...@gmail.com] Sent: Dienstag, 11. August 2009 13:25 To: users@wicket.apache.org Subject: Re: Get all sessions and manipulate them I don't know. Asked many times but maybe not so popular. I can't find it easily. Do I have to save it manually all available session by creating class implementing ISession store? Or there is another way? Regards, uudashr On Tue, Aug 11, 2009 at 11:36 AM, Jeremy Thomerson jer...@wickettraining.com wrote: This question has been asked and answered many times on this mailing list. Please try searching the archives on Nabble. Then let us know if you have questions about one of those implementations. -- Jeremy Thomerson http://www.wickettraining.com On Mon, Aug 10, 2009 at 10:59 PM, uud ashruuda...@gmail.com wrote: Hi all, How to manipulate all existing sessions on wicket. I can get the SessionData trough getRequestLogger().getLiveSessions(), but I can't manipulate the SessionData. For examples, I have session class: public class MyAppSession extends WebSession { ... public void setLoggedUser(User user) { } public User getLoggedUser() { } } I want to kick all logged users because I want to do something like maintenance thing by using theSession.setLoggedUser(null) to all available sessions. Anyone knows? Regards, uudashr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicketstuff core 1.4.0 release preparations
Hi Jeremy, I am afraid I do not understand what to do. I set out to test the yui-parent module: I can confirm that /yui-parent/ builds fine (with +mvn install+). Yeah! However, +mvn release:prepare -DdryRun=true+ executed in the yui-parent sub-directory just downloads a yui snapshot instead of compiling it localy. Running it one directory up fails because prepare:release does not accept diffs with the SCM and I changed the wicketstuff-code pom (I commented out all modules except for yui-parent). What else can I do? Or must one do the whole thing at once? BTW, should wicketstuff-core not change from 1.4-SNAPSHOT to 1.4.0-SNAPSHOT? Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff core 1.4.0 release preparations
The release:prepare will also check if there are no SNAPSHOT dependencies IIRC, or turn them into timestamped dependencies. If mvn install works, then yui-parent is good to go I think. Martijn On Thu, Aug 13, 2009 at 5:33 PM, Erik van Oostene.vanoos...@grons.nl wrote: Hi Jeremy, I am afraid I do not understand what to do. I set out to test the yui-parent module: I can confirm that /yui-parent/ builds fine (with +mvn install+). Yeah! However, +mvn release:prepare -DdryRun=true+ executed in the yui-parent sub-directory just downloads a yui snapshot instead of compiling it localy. Running it one directory up fails because prepare:release does not accept diffs with the SCM and I changed the wicketstuff-code pom (I commented out all modules except for yui-parent). What else can I do? Or must one do the whole thing at once? BTW, should wicketstuff-core not change from 1.4-SNAPSHOT to 1.4.0-SNAPSHOT? Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff core 1.4.0 release preparations
mvn clean package release:prepare -DdryRun=true -igor On Thu, Aug 13, 2009 at 8:33 AM, Erik van Oostene.vanoos...@grons.nl wrote: Hi Jeremy, I am afraid I do not understand what to do. I set out to test the yui-parent module: I can confirm that /yui-parent/ builds fine (with +mvn install+). Yeah! However, +mvn release:prepare -DdryRun=true+ executed in the yui-parent sub-directory just downloads a yui snapshot instead of compiling it localy. Running it one directory up fails because prepare:release does not accept diffs with the SCM and I changed the wicketstuff-code pom (I commented out all modules except for yui-parent). What else can I do? Or must one do the whole thing at once? BTW, should wicketstuff-core not change from 1.4-SNAPSHOT to 1.4.0-SNAPSHOT? Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Performance Problem
Hi, We're working on a wicket/spring/hibernate webapp (research repository) and today i was working on an 'Add Publication Panel'. i added some validation today but whenever i click on the link that shows the panel in the main content area it takes like 10/15 seconds to show it. Tomcat doesn't show any errors and everything is working. here's my Add Publication Panel. i have no idea as to what could be causing this. here's my panel's .java public class AddPublicationPanel extends BasicPanel { @SpringBean private IBrowseService browseService; @SpringBean private IAddEditService addEditService; @SpringBean private IBook book; @SpringBean private IConferencePaper conferencePaper; @SpringBean private ITechnicalReport technicalReport; @SpringBean private IWorkshop workshop; @SpringBean private IArticle article; @SpringBean private IBookChapter bookChapter; @SpringBean(name = book) private IPublication publication; private ListShort year; private ListByte month; private Form form; private WebMarkupContainer detailsBook, detailsConferencePaper, detailsTechnicalReport, detailsWorkshop, detailsArticle, detailsBookChapter, detailsCurrent; private AjaxFallbackLink addAuthor, removeAuthor; private AutoCompleteTextFieldUser[] authors; public AddPublicationPanel() { super(block, Add Publication); initLists(); initCommon(); initDetails(); } private void initCommon() { add(new FeedbackPanel(feedback)); add(form = new Form(form, new CompoundPropertyModel( publication)) { protected void onSubmit() { switch (publication.getPublicationType()) { case BOOK: break; case BOOK_CHAPTER: break; case ARTICLE: break; case CONFERENCE_PAPER: break; case WORKSHOP: break; case TECHNICAL_REPORT: break; } } }); // title form.add(new TextField(title).setRequired(true).add( StringValidator.maximumLength(128))); // year form.add(new DropDownChoice(year, year)); // month form.add(new DropDownChoice(month, month, new ChoiceRenderer() { @Override public Object getDisplayValue(Object object) { return (new DateFormatSymbols().getMonths())[((Byte) object) .intValue()]; } })); // abstractText form.add(new TextArea(abstractText).add(StringValidator .maximumLength(2048))); // required?? // reproducible form.add(new CheckBox(reproducible)); // passwordProtected form.add(new CheckBox(passwordProtected)); // keywords form.add(new TextField(keywords).add( new PatternValidator((\\s*\\w+\\s*,*\\s*)*,*\\s*)).add( StringValidator.maximumLength(2048))); // authors (internal external) authors = new AutoCompleteTextFieldUser[10]; for (int i = 0; i 10; i++) // use model to set authors (internal external) // later* form.add((authors[i] = new AutoCompleteTextFieldUser(author + i)) .setVisible(false).setOutputMarkupId(true) .setOutputMarkupPlaceholderTag(true)); authors[0].setRequired(true).setVisible(true); form.add((addAuthor = (new AjaxFallbackLink(add) { @Override public void onClick(AjaxRequestTarget target) { int pointer; for (pointer = 0; pointer 10; pointer++) { if (!authors[pointer].isVisible()) { break; } } if (pointer 10) { authors[pointer].setVisible(true); if (pointer == 9) this.setVisible(false); if (pointer 0) removeAuthor.setVisible(true); if (target != null) { target.addComponent(authors[pointer]); target.addComponent(removeAuthor); target.addComponent(this); } } } })).setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true)); form.add((removeAuthor = (new AjaxFallbackLink(remove) { @Override public void onClick(AjaxRequestTarget target) { int pointer; for (pointer = 0; pointer 10; pointer++) { if (!authors[pointer].isVisible()) { break;
Re: Wicketstuff releases?
I followed your instructions. When I ran the mvn release:prepare, I was asked several dozen times about versions, to which I responded with whatever Maven's default choice was. Then there was a lot more output, and finally it failed with an OutOfMemoryError: PermGen space. I know that's not very helpful to you -- do you know what I can do to increase the memory available to Maven? On Thu, Aug 13, 2009 at 6:21 AM, Jeremy Thomerson jer...@wickettraining.com wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Aug 12, 2009 at 7:27 PM, Jeremy Thomersonjer...@wickettraining.com wrote: The idea behind the matching release numbers was so that Wicket newbs could more easily adopt the most commonly used and supported wicketstuff projects into their projects. I would like to be able to still have that. No compatibility matrix needed - if you are using Wicket 1.4.1 - use WS 1.4.1. That being said, I think that the best solution is that we have 1.4.1.X where X is our release number. The biggest problem is still what a hassle it is to build a release. When I built rc8, it took a couple days because people had broken junk in trunk, not followed pom conventions, etc. Plus, syncing the build artifacts to the repo was a pain because it's not documented, and I'm no maven guru. I haven't even had time to build 1.4.0 to match Wicket yet, and that is arguably the most important one since we started WS Core. If someone would like to help by building 1.4.0 and documenting a streamlined process, I would love it. I have been running a Continuum server that was doing continuous builds as well. I think that we could see about using the release process on Continuum to run mvn release:deploy and automating releases. I just don't have time this week, and probably won't next week. So - anyone volunteering? -- Jeremy Thomerson http://www.wickettraining.com On Wed, Aug 12, 2009 at 1:01 PM, nino martinez waelnino.martinez.w...@gmail.com wrote: Hmm I believe with may way it should be possible todo both.. However I don't much care what the releases are named its the quality that matters to me. No matter what the customer will blame me if something does not work, they don't care if its a 1.4, 1.4.1.1 release snapshot or snafu:) Jeremy are doing a fine job. However feedback are always nice, I like to get that too from my wicketstuffings. -my two cents.. 2009/8/12 Martijn Dashorst martijn.dasho...@gmail.com: Given the lackluster release history of Wicket Stuff, I'd suggest going with whatever the only person able *AND* willing to cut releases wants. In this case, that is Jeremy. If you don't want to follow the general Wicket Stuff release processes, you're welcome to maintain your own projects and release them at your own schedule. It doesn't make sense to me to go back on a decision that was made, just because 2 folks think it is better. IMO having a release following Wicket's releases is better than not having a release. The problem with Wicket Stuff is not that they follow the Wicket release cycle, it is that nobody gives a damn to cut releases. Jeremy fixed that. If you think you can do better, don't put your project in the Wicket Stuff parent group, but release the software on your own. Martijn On Wed, Aug 12, 2009 at 3:36 PM, Reinhard Nägelereinhard.naeg...@mgm-tp.com wrote: I'd like to second Maartens point. Identical releases to Wicket itself would mean that it always depends on Wicket. Independent releases would not be possible. Bugs could not be fixed and new features could not be added without a new Wicket release. This doesn't really make sense to me. Reinhard Jeremy Thomerson schrieb: Now that Wicket 1.4.0 is out, I wonder which wicketstuff core version is compatible. There is no 1.4.0 version of wicketstuff core (yet?). Should I use 1.4-rc8-SNAPSHOT? It should be just 1.4-SNAPSHOT. 1.4-rc8-SNAPSHOT was an accidental relic of after I built rc8 Side note: I don't see the version of wicket-stuff has to match exactly with version of wicket ? Suppose someone releases wicketstuff-core-1.4.0 today, and tomorrow some bugs are fixed in
Re: Performance Problem
use a profiler. -igor On Thu, Aug 13, 2009 at 9:10 AM, Mostafa Mohamedes.most...@gmail.com wrote: Hi, We're working on a wicket/spring/hibernate webapp (research repository) and today i was working on an 'Add Publication Panel'. i added some validation today but whenever i click on the link that shows the panel in the main content area it takes like 10/15 seconds to show it. Tomcat doesn't show any errors and everything is working. here's my Add Publication Panel. i have no idea as to what could be causing this. here's my panel's .java public class AddPublicationPanel extends BasicPanel { @SpringBean private IBrowseService browseService; @SpringBean private IAddEditService addEditService; @SpringBean private IBook book; @SpringBean private IConferencePaper conferencePaper; @SpringBean private ITechnicalReport technicalReport; @SpringBean private IWorkshop workshop; @SpringBean private IArticle article; @SpringBean private IBookChapter bookChapter; @SpringBean(name = book) private IPublication publication; private ListShort year; private ListByte month; private Form form; private WebMarkupContainer detailsBook, detailsConferencePaper, detailsTechnicalReport, detailsWorkshop, detailsArticle, detailsBookChapter, detailsCurrent; private AjaxFallbackLink addAuthor, removeAuthor; private AutoCompleteTextFieldUser[] authors; public AddPublicationPanel() { super(block, Add Publication); initLists(); initCommon(); initDetails(); } private void initCommon() { add(new FeedbackPanel(feedback)); add(form = new Form(form, new CompoundPropertyModel( publication)) { protected void onSubmit() { switch (publication.getPublicationType()) { case BOOK: break; case BOOK_CHAPTER: break; case ARTICLE: break; case CONFERENCE_PAPER: break; case WORKSHOP: break; case TECHNICAL_REPORT: break; } } }); // title form.add(new TextField(title).setRequired(true).add( StringValidator.maximumLength(128))); // year form.add(new DropDownChoice(year, year)); // month form.add(new DropDownChoice(month, month, new ChoiceRenderer() { @Override public Object getDisplayValue(Object object) { return (new DateFormatSymbols().getMonths())[((Byte) object) .intValue()]; } })); // abstractText form.add(new TextArea(abstractText).add(StringValidator .maximumLength(2048))); // required?? // reproducible form.add(new CheckBox(reproducible)); // passwordProtected form.add(new CheckBox(passwordProtected)); // keywords form.add(new TextField(keywords).add( new PatternValidator((\\s*\\w+\\s*,*\\s*)*,*\\s*)).add( StringValidator.maximumLength(2048))); // authors (internal external) authors = new AutoCompleteTextFieldUser[10]; for (int i = 0; i 10; i++) // use model to set authors (internal external) // later* form.add((authors[i] = new AutoCompleteTextFieldUser(author + i)) .setVisible(false).setOutputMarkupId(true) .setOutputMarkupPlaceholderTag(true)); authors[0].setRequired(true).setVisible(true); form.add((addAuthor = (new AjaxFallbackLink(add) { @Override public void onClick(AjaxRequestTarget target) { int pointer; for (pointer = 0; pointer 10; pointer++) { if (!authors[pointer].isVisible()) { break; } } if (pointer 10) { authors[pointer].setVisible(true); if (pointer == 9) this.setVisible(false); if (pointer 0) removeAuthor.setVisible(true); if (target != null) { target.addComponent(authors[pointer]); target.addComponent(removeAuthor); target.addComponent(this); } } } })).setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true)); form.add((removeAuthor = (new AjaxFallbackLink(remove) { @Override public void
Re: Wicketstuff releases?
Hi, Revision: 4896 After manually installing jazzyplugin from [1] into my local maven repo, I had the following results: mvn clean install = BUILD SUCCESSFUL mvn clean package release:prepare -DdryRun=true [ERROR] BUILD FAILURE [INFO] [INFO] Cannot prepare the release because you have local modifications : [pom.xml:modified] [multi-text-input-parent/pom.xml:modified] I will create a branch in sandbox, commit changes to wicket.version and try again [1] http://prdownloads.sourceforge.net/jedit-plugins/JazzyPlugin-0.2.1-bin.zip regards, Maarten On Thu, Aug 13, 2009 at 5:16 PM, Erik van Oosten e.vanoos...@grons.nlwrote: Regarding step 2: only change the dependency to Wicket in the wicketstuff-core pom.xml, not the versions of wicketstuff poms themselfs (as I just did). Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
1.4 ModalWindow closes on second submit attempt in FireFox
I have a ModelWindow with a Panel containing a Form as content. When I submit the Form with an AjaxButton the first time everything is OK. Now when I click the AjaxSubmit a second time, FireFox wants to close the ModalWindow Reloading this page will cause the modal window to disappear. I found some hits on Reloading this page will cause the modal window to disappear but none of thme adresses FireFox. The URL after the ModelWindow was closed is http://localhost:8080/VisioDesk/?id1a_hf_0=name=geplanterZeitpunktWoche=wochentag=dauerInMinuten%3AinputField=0dauerInMinuten%3AselectField=anfangUhrzeit=ressourcen%3Aselect1=ressourcen%3Aselect2=personal%3Aselect1=personal%3Aselect2=submitButton=speichern Any idea?
Re: Wicketstuff core 1.4.0 release preparations
Igor, release:prepare automatically also does clean and package. There is actually one more thing I could have tried: execute the release:prepare goals in de yui sub-sub modules. Regards, Erik. Igor Vaynberg wrote: mvn clean package release:prepare -DdryRun=true -igor On Thu, Aug 13, 2009 at 8:33 AM, Erik van Oostene.vanoos...@grons.nl wrote: Hi Jeremy, I am afraid I do not understand what to do. I set out to test the yui-parent module: I can confirm that /yui-parent/ builds fine (with +mvn install+). Yeah! However, +mvn release:prepare -DdryRun=true+ executed in the yui-parent sub-directory just downloads a yui snapshot instead of compiling it localy. Running it one directory up fails because prepare:release does not accept diffs with the SCM and I changed the wicketstuff-code pom (I commented out all modules except for yui-parent). What else can I do? Or must one do the whole thing at once? BTW, should wicketstuff-core not change from 1.4-SNAPSHOT to 1.4.0-SNAPSHOT? Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff releases?
Hi, svn co https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/sandbox/maarten/wicketstuff-core-1.4.0.0/ mvn clean package release:prepare -DdryRun=true -DreleaseVersion=1.4.0.0 -DdevelopmentVersion=1.4.0.1-SNAPSHOT = BUILD SUCCESSFUL Let me know if I can test something else. Maarten On Thu, Aug 13, 2009 at 7:18 PM, Maarten Bosteels mbosteels@gmail.comwrote: Hi, Revision: 4896 After manually installing jazzyplugin from [1] into my local maven repo, I had the following results: mvn clean install = BUILD SUCCESSFUL mvn clean package release:prepare -DdryRun=true [ERROR] BUILD FAILURE [INFO] [INFO] Cannot prepare the release because you have local modifications : [pom.xml:modified] [multi-text-input-parent/pom.xml:modified] I will create a branch in sandbox, commit changes to wicket.version and try again [1] http://prdownloads.sourceforge.net/jedit-plugins/JazzyPlugin-0.2.1-bin.zip regards, Maarten On Thu, Aug 13, 2009 at 5:16 PM, Erik van Oosten e.vanoos...@grons.nlwrote: Regarding step 2: only change the dependency to Wicket in the wicketstuff-core pom.xml, not the versions of wicketstuff poms themselfs (as I just did). Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff core 1.4.0 release preparations
Yes, that did it. Running the dryRun in wicket-stuff/wicketstuff-core/yui-parent/yui succeeds. I repeated this for yui-examples. yui-parent, yui and yui-examples are ready to go! Regards, Erik. Erik van Oosten wrote: There is actually one more thing I could have tried: execute the release:prepare goals in de yui sub-sub modules. Igor Vaynberg wrote: mvn clean package release:prepare -DdryRun=true -igor On Thu, Aug 13, 2009 at 8:33 AM, Erik van Oostene.vanoos...@grons.nl wrote: Hi Jeremy, I am afraid I do not understand what to do. I set out to test the yui-parent module: I can confirm that /yui-parent/ builds fine (with +mvn install+). Yeah! However, +mvn release:prepare -DdryRun=true+ executed in the yui-parent sub-directory just downloads a yui snapshot instead of compiling it localy. Running it one directory up fails because prepare:release does not accept diffs with the SCM and I changed the wicketstuff-code pom (I commented out all modules except for yui-parent). What else can I do? Or must one do the whole thing at once? BTW, should wicketstuff-core not change from 1.4-SNAPSHOT to 1.4.0-SNAPSHOT? Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicketstuff core 1.4.0 release preparations
Hi, Unfortunately tinymce does /not/ compile. It fails with a missing dependency to jazzyplugin:jazzyplugin:jar:0.2.1. Regards, Erik. Jeremy Thomerson wrote: To those who have written me volunteering to help: thank you. I will try to do the release this weekend. Here's what you can do to help before then. 1 - check out wicketstuff-core trunk 2 - change the wicket dependencies from snapshot to 1.4.0 (note: only do this locally - don't commit that change - since trunk should run on trunk) 3 - build it to make sure it all works 4 - test the release process by doing following: mvn release:prepare -DdryRun=true If all of that is working fine (no build errors, etc), then let the list know. That will make it much easier to do the release. And I'll try to document the process so that someone else can perform the next one easier. -- Jeremy Thomerson http://www.wickettraining.com -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff core 1.4.0 release preparations
Maarten, you just beated me to it. Is the jazzyplugin still needed after your changes? Regards, Erik. Erik van Oosten wrote: Hi, Unfortunately tinymce does /not/ compile. It fails with a missing dependency to jazzyplugin:jazzyplugin:jar:0.2.1. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: 1.4 ModalWindow closes on second submit attempt in FireFox
After a little bit more investigation: 1. Now I use AjaxSubmitLink instead of AjaxButton. -- same problem 2. I noticed that I have @Override protected void onError(final AjaxRequestTarget target, final Form? form) { form.visitFormComponents(myInputfieldMarkerForInvalidInput); target.addComponent(form); } -- If I don't call 'target.addComponent(form);' the problem disappears. Is this a known problem? Is it forbidden to add a Form in a ModalWindow to an AjaxRequestTargets Components? Stefan -Ursprüngliche Nachricht- Von: Stefan Lindner [mailto:lind...@visionet.de] Gesendet: Donnerstag, 13. August 2009 20:14 An: users@wicket.apache.org Betreff: 1.4 ModalWindow closes on second submit attempt in FireFox I have a ModelWindow with a Panel containing a Form as content. When I submit the Form with an AjaxButton the first time everything is OK. Now when I click the AjaxSubmit a second time, FireFox wants to close the ModalWindow Reloading this page will cause the modal window to disappear. I found some hits on Reloading this page will cause the modal window to disappear but none of thme adresses FireFox. The URL after the ModelWindow was closed is http://localhost:8080/VisioDesk/?id1a_hf_0=name=geplanterZeitpunktWoche=wochentag=dauerInMinuten%3AinputField=0dauerInMinuten%3AselectField=anfangUhrzeit=ressourcen%3Aselect1=ressourcen%3Aselect2=personal%3Aselect1=personal%3Aselect2=submitButton=speichern Any idea?
Re: Wicketstuff core 1.4.0 release preparations
On Thu, Aug 13, 2009 at 8:46 PM, Erik van Oosten e.vanoos...@grons.nlwrote: Maarten, you just beated me to it. Is the jazzyplugin still needed after your changes? Hi Erik, I did not try to remove the dependency, so it's still needed. I just downloaded the jar and installed in my local maven repo. Maarten Regards, Erik. Erik van Oosten wrote: Hi, Unfortunately tinymce does /not/ compile. It fails with a missing dependency to jazzyplugin:jazzyplugin:jar:0.2.1. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: 1.4 ModalWindow closes on second submit attempt in FireFox
When I add each individual child oft he Form to the AjaxRequestTarget's Components by Iterator? extends Component it = form.iterator(); while (it.hasNext()) Component c = it.next(); if (c.getOutputMarkupId() c.isVisible()) target.addComponent(c); Everything works too. So this could be a workaround for me. But is this the inteded way? -Ursprüngliche Nachricht- Von: Stefan Lindner [mailto:lind...@visionet.de] Gesendet: Donnerstag, 13. August 2009 20:47 An: users@wicket.apache.org Betreff: RE: 1.4 ModalWindow closes on second submit attempt in FireFox After a little bit more investigation: 1. Now I use AjaxSubmitLink instead of AjaxButton. -- same problem 2. I noticed that I have @Override protected void onError(final AjaxRequestTarget target, final Form? form) { form.visitFormComponents(myInputfieldMarkerForInvalidInput); target.addComponent(form); } -- If I don't call 'target.addComponent(form);' the problem disappears. Is this a known problem? Is it forbidden to add a Form in a ModalWindow to an AjaxRequestTargets Components? Stefan -Ursprüngliche Nachricht- Von: Stefan Lindner [mailto:lind...@visionet.de] Gesendet: Donnerstag, 13. August 2009 20:14 An: users@wicket.apache.org Betreff: 1.4 ModalWindow closes on second submit attempt in FireFox I have a ModelWindow with a Panel containing a Form as content. When I submit the Form with an AjaxButton the first time everything is OK. Now when I click the AjaxSubmit a second time, FireFox wants to close the ModalWindow Reloading this page will cause the modal window to disappear. I found some hits on Reloading this page will cause the modal window to disappear but none of thme adresses FireFox. The URL after the ModelWindow was closed is http://localhost:8080/VisioDesk/?id1a_hf_0=name=geplanterZeitpunktWoche=wochentag=dauerInMinuten%3AinputField=0dauerInMinuten%3AselectField=anfangUhrzeit=ressourcen%3Aselect1=ressourcen%3Aselect2=personal%3Aselect1=personal%3Aselect2=submitButton=speichern Any idea?
Re: Using Wicket in a Java EE 6 container
I think it should be fine (but checking internally). Does it not depend upon how WicketFilter class handles it ? How does it behave if this fragment is not there if it's not specified in web.xml per the current usage ? -Arun igor.vaynberg wrote: what happens if i dont have the filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter piece in my web.xml? will that lead to an error? -igor On Wed, Aug 12, 2009 at 8:22 PM, arunguptaarun.gu...@gmail.com wrote: The fragment can be easily split as: -- cut here -- filter filter-namewicket.Filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class /filter -- cut here -- in web-fragment.xml and -- cut here -- filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.Filter/filter-name url-pattern/*/url-pattern /filter-mapping -- cut here -- in web.xml. This keeps the Wicket registration in web-fragment.xml and the actual params in web.xml. -Arun igor.vaynberg wrote: dont think so because a) not everyone wants to name their application class org.glassfish.samples.WicketApplication b) not everyone wants to use /* mapping i havent read the spec yet but just from looking at the article this is a little troubling from security perspective. just because i add a jar to my app it can now register a servlet behind my back and create a backdoor into the server? -igor On Tue, Aug 11, 2009 at 5:46 AM, Arun Guptaarun.gu...@gmail.com wrote: I wrote a blog describing how to use Wicket with a Servlet 3.0/Java EE 6 container: http://blogs.sun.com/arungupta/entry/totd_91_applying_java_ee Any chance the changes can be integrated in the wicket-*.jar ? -Arun -- Need Application Server ? - Download glassfish.org Blog: http://blogs.sun.com/arungupta - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24948061.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24957004.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: redirect parent page on submit modal window
Couldn't you just call modalwindow.close( target ) in the submit and in the close call back call setResponsePage( page.class )? -- View this message in context: http://www.nabble.com/redirect-parent-page-on-submit-modal-window-tp24955953p24957565.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Portlet and ... 2.0 (How to pass parameters?)
Could you maybe explain why you need it? Do you want to pass data inside your portlet or to another portlet? Rob On 8/13/09 1:43 PM, Gonzalo Aguilar Delgado wrote: Hi all!, I have some questions about parameter passing in portal environment. I saw that WebPage class can have access to the Application class but not the portlet class. This makes a little tricky to handle requests because: We can set session paramaters. And can call functions inside Application (WicketExamplesMenuApplication.getExamples()). @Override public void onClick() { int index = ((LoopItem)getParent()).getIteration(); ExampleApplication ea = WicketExamplesMenuApplication.getExamples().get( index + 1); PortletSession session = ((PortletRequestContext)RequestContext.get()).getPortletRequest() .getPortletSession(); session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR, ea); } But it will be the portlet class the responsible for handling processing. So the only way to pass information from the onClick function to the portlet application for rendering (for example) is using the portlet session. But I suppose that's not the preferred way. What's the best way to pass information to the portlet class? Is there any way to use the portlet class like we use the application class (WicketExamplesMenuApplication.getExamples() - WicketExamplesMenuPortlet.getExamples()) I also saw that in the portlet example, the examples structure is initialized by the WicketExamplesMenuPortlet and sent to the WicketExamplesMenuApplication using the servlet context. But this will overbloat the servlet attributes storage space. Also this should be solved if webpages could access to the portlet class directly. Why to do this way? I want to know all this because I want to use shared render parameters (I put there a user id and all the portlets update accordingly). To do this I will do: 1.- Onclick: Put the Id on the session like above. 2.- Portlet.DoView: Recover id from session and store it in shared render params. 3.- Delete it from session. Is this the correct way to do it? Thank you very much in advance... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Performance problem when loading a panel
Hi, We're working on a wicket/spring/hibernate webapp (research repository) and today i was working on an 'Add Publication Panel'. i added some validation today but whenever i click on the link that shows the panel in the main content area it takes like 10/15 seconds to show it. Tomcat doesn't show any errors and everything is working. here's my Add Publication Panel. i have no idea as to what could be causing this. here's my panel's .java public class AddPublicationPanel extends BasicPanel { @SpringBean private IBrowseService browseService; @SpringBean private IAddEditService addEditService; @SpringBean private IBook book; @SpringBean private IConferencePaper conferencePaper; @SpringBean private ITechnicalReport technicalReport; @SpringBean private IWorkshop workshop; @SpringBean private IArticle article; @SpringBean private IBookChapter bookChapter; @SpringBean(name = book) private IPublication publication; private ListShort year; private ListByte month; private Form form; private WebMarkupContainer detailsBook, detailsConferencePaper, detailsTechnicalReport, detailsWorkshop, detailsArticle, detailsBookChapter, detailsCurrent; private AjaxFallbackLink addAuthor, removeAuthor; private AutoCompleteTextFieldUser[] authors; public AddPublicationPanel() { super(block, Add Publication); initLists(); initCommon(); initDetails(); } private void initCommon() { add(new FeedbackPanel(feedback)); add(form = new Form(form, new CompoundPropertyModel( publication)) { protected void onSubmit() { switch (publication.getPublicationType()) { case BOOK: break; case BOOK_CHAPTER: break; case ARTICLE: break; case CONFERENCE_PAPER: break; case WORKSHOP: break; case TECHNICAL_REPORT: break; } } }); // title form.add(new TextField(title).setRequired(true).add( StringValidator.maximumLength(128))); // year form.add(new DropDownChoice(year, year)); // month form.add(new DropDownChoice(month, month, new ChoiceRenderer() { @Override public Object getDisplayValue(Object object) { return (new DateFormatSymbols().getMonths())[((Byte) object) .intValue()]; } })); // abstractText form.add(new TextArea(abstractText).add(StringValidator .maximumLength(2048))); // required?? // reproducible form.add(new CheckBox(reproducible)); // passwordProtected form.add(new CheckBox(passwordProtected)); // keywords form.add(new TextField(keywords).add( new PatternValidator((\\s*\\w+\\s*,*\\s*)*,*\\s*)).add( StringValidator.maximumLength(2048))); // authors (internal external) authors = new AutoCompleteTextFieldUser[10]; for (int i = 0; i 10; i++) // use model to set authors (internal external) // later* form.add((authors[i] = new AutoCompleteTextFieldUser(author + i)) .setVisible(false).setOutputMarkupId(true) .setOutputMarkupPlaceholderTag(true)); authors[0].setRequired(true).setVisible(true); form.add((addAuthor = (new AjaxFallbackLink(add) { @Override public void onClick(AjaxRequestTarget target) { int pointer; for (pointer = 0; pointer 10; pointer++) { if (!authors[pointer].isVisible()) { break; } } if (pointer 10) { authors[pointer].setVisible(true); if (pointer == 9) this.setVisible(false); if (pointer 0) removeAuthor.setVisible(true); if (target != null) { target.addComponent(authors[pointer]); target.addComponent(removeAuthor); target.addComponent(this); } } } })).setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true)); form.add((removeAuthor = (new AjaxFallbackLink(remove) { @Override public void onClick(AjaxRequestTarget target) { int pointer; for (pointer = 0; pointer 10; pointer++) { if (!authors[pointer].isVisible()) { break;
Re: Performance problem when loading a panel
I suggest you use a profiler. Profiler4j or jProfiler. and find out the reason! ** Martin 2009/8/13 Mostafa Mohamed es.most...@gmail.com: Hi, We're working on a wicket/spring/hibernate webapp (research repository) and today i was working on an 'Add Publication Panel'. i added some validation today but whenever i click on the link that shows the panel in the main content area it takes like 10/15 seconds to show it. Tomcat doesn't show any errors and everything is working. here's my Add Publication Panel. i have no idea as to what could be causing this. here's my panel's .java public class AddPublicationPanel extends BasicPanel { �...@springbean private IBrowseService browseService; �...@springbean private IAddEditService addEditService; �...@springbean private IBook book; �...@springbean private IConferencePaper conferencePaper; �...@springbean private ITechnicalReport technicalReport; �...@springbean private IWorkshop workshop; �...@springbean private IArticle article; �...@springbean private IBookChapter bookChapter; �...@springbean(name = book) private IPublication publication; private ListShort year; private ListByte month; private Form form; private WebMarkupContainer detailsBook, detailsConferencePaper, detailsTechnicalReport, detailsWorkshop, detailsArticle, detailsBookChapter, detailsCurrent; private AjaxFallbackLink addAuthor, removeAuthor; private AutoCompleteTextFieldUser[] authors; public AddPublicationPanel() { super(block, Add Publication); initLists(); initCommon(); initDetails(); } private void initCommon() { add(new FeedbackPanel(feedback)); add(form = new Form(form, new CompoundPropertyModel( publication)) { protected void onSubmit() { switch (publication.getPublicationType()) { case BOOK: break; case BOOK_CHAPTER: break; case ARTICLE: break; case CONFERENCE_PAPER: break; case WORKSHOP: break; case TECHNICAL_REPORT: break; } } }); // title form.add(new TextField(title).setRequired(true).add( StringValidator.maximumLength(128))); // year form.add(new DropDownChoice(year, year)); // month form.add(new DropDownChoice(month, month, new ChoiceRenderer() { �...@override public Object getDisplayValue(Object object) { return (new DateFormatSymbols().getMonths())[((Byte) object) .intValue()]; } })); // abstractText form.add(new TextArea(abstractText).add(StringValidator .maximumLength(2048))); // required?? // reproducible form.add(new CheckBox(reproducible)); // passwordProtected form.add(new CheckBox(passwordProtected)); // keywords form.add(new TextField(keywords).add( new PatternValidator((\\s*\\w+\\s*,*\\s*)*,*\\s*)).add( StringValidator.maximumLength(2048))); // authors (internal external) authors = new AutoCompleteTextFieldUser[10]; for (int i = 0; i 10; i++) // use model to set authors (internal external) // later* form.add((authors[i] = new AutoCompleteTextFieldUser(author + i)) .setVisible(false).setOutputMarkupId(true) .setOutputMarkupPlaceholderTag(true)); authors[0].setRequired(true).setVisible(true); form.add((addAuthor = (new AjaxFallbackLink(add) { �...@override public void onClick(AjaxRequestTarget target) { int pointer; for (pointer = 0; pointer 10; pointer++) { if (!authors[pointer].isVisible()) { break; } } if (pointer 10) { authors[pointer].setVisible(true); if (pointer == 9) this.setVisible(false); if (pointer 0) removeAuthor.setVisible(true); if (target != null) { target.addComponent(authors[pointer]); target.addComponent(removeAuthor); target.addComponent(this); } } } })).setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true)); form.add((removeAuthor = (new AjaxFallbackLink(remove) { �...@override public void onClick(AjaxRequestTarget target) {
IndexOutOfBoundsException on ListView model add()
I'm going crazy over what should be a simple procedure. I want to add an element to a ListView's model, but when I try, it throws an IndexOutOfBoundsException. I have a form [1] which contains a ListView and an AjaxSubmitLink which adds items to the ListView. The only funny thing you might notice with the form is that ListView's model is employerInfoModel.contactPoints, while the AjaxSubmitLink is adding items to employerInfoModel.contactPointsSet. This is because employerInfo's collection of contactPoints is actually a set, but ListView needs them as a list. In order to get around this, I have two getters and setters, one that gets the set directly, and one that converts to and from a list [2]. [1] - public class ContactInfoForm extends FormEmployerInfo { WebMarkupContainer contactPointsContainer; public ContactInfoForm(String id, CompoundPropertyModelEmployerInfo model) { super(id, model); contactPointsContainer = new WebMarkupContainer(contactPointsContainer); ListViewContactPoint contactPointsListView = new ListViewContactPoint(contactPoints, new PropertyModelListContactPoint(employerInfoModel, contactPoints)) { @Override protected void populateItem(ListItemContactPoint item) { final ContactPoint cp = item.getModelObject(); item.add(new TextFieldString(contactInfo, new PropertyModelString(item.getModel(), contactInfo))); item.add(new ContactPointTypesDropDownChoice(contactPointTypeImpl, new PropertyModelContactPointType(item.getModel(), contactPointTypeImpl))); item.add(new IndicatingAjaxLinkContactPoint(deleteLink, new ModelContactPoint(cp)) { @Override public void onClick(AjaxRequestTarget target) { employerInfoModel.getObject().getContactPoints().remove(cp); target.addComponent(ContactInfoForm.this); } }); } }; contactPointsContainer.add(contactPointsListView); contactPointsContainer.setOutputMarkupId(true); add(contactPointsContainer); add(new AjaxSubmitLink(addContactPointLink, this) { @Override public void onSubmit(AjaxRequestTarget target, Form? form) { getModelObject().getContactPointsSet().add(new ContactPointImpl()); target.addComponent(contactPointsContainer); } }); } } [2] - public class EmployerInfo extends PersonInfoImpl { ... SetContactPoint contactPointsSet; public ListContactPoint getContactPoints() { ListContactPoint list = new ArrayListContactPoint(contactPointsSet); Collections.sort(list); return list; } public void setContactPoints(ListContactPoint contactPoints) { this.contactPointsSet = new HashSetContactPoint(contactPoints); } public SetContactPoint getContactPointsSet() { return contactPointsSet; } public void setContactPointsSet(SetContactPoint contactPointsSet) { this.contactPointsSet = contactPointsSet; } }
Re: Using Wicket in a Java EE 6 container
thats the problem, it will error out because applicationClassName param is required. i just dont think this new fragment feature matches very well with how wicket is used. -igor On Thu, Aug 13, 2009 at 12:08 PM, arunguptaarun.gu...@gmail.com wrote: I think it should be fine (but checking internally). Does it not depend upon how WicketFilter class handles it ? How does it behave if this fragment is not there if it's not specified in web.xml per the current usage ? -Arun igor.vaynberg wrote: what happens if i dont have the filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter piece in my web.xml? will that lead to an error? -igor On Wed, Aug 12, 2009 at 8:22 PM, arunguptaarun.gu...@gmail.com wrote: The fragment can be easily split as: -- cut here -- filter filter-namewicket.Filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class /filter -- cut here -- in web-fragment.xml and -- cut here -- filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.Filter/filter-name url-pattern/*/url-pattern /filter-mapping -- cut here -- in web.xml. This keeps the Wicket registration in web-fragment.xml and the actual params in web.xml. -Arun igor.vaynberg wrote: dont think so because a) not everyone wants to name their application class org.glassfish.samples.WicketApplication b) not everyone wants to use /* mapping i havent read the spec yet but just from looking at the article this is a little troubling from security perspective. just because i add a jar to my app it can now register a servlet behind my back and create a backdoor into the server? -igor On Tue, Aug 11, 2009 at 5:46 AM, Arun Guptaarun.gu...@gmail.com wrote: I wrote a blog describing how to use Wicket with a Servlet 3.0/Java EE 6 container: http://blogs.sun.com/arungupta/entry/totd_91_applying_java_ee Any chance the changes can be integrated in the wicket-*.jar ? -Arun -- Need Application Server ? - Download glassfish.org Blog: http://blogs.sun.com/arungupta - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24948061.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24957004.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Performance problem when loading a panel
i think you should post it again. if you are going to post it twice it is probably worth posting it thrice. -igor On Thu, Aug 13, 2009 at 1:05 PM, Mostafa Mohamedes.most...@gmail.com wrote: Hi, We're working on a wicket/spring/hibernate webapp (research repository) and today i was working on an 'Add Publication Panel'. i added some validation today but whenever i click on the link that shows the panel in the main content area it takes like 10/15 seconds to show it. Tomcat doesn't show any errors and everything is working. here's my Add Publication Panel. i have no idea as to what could be causing this. here's my panel's .java public class AddPublicationPanel extends BasicPanel { �...@springbean private IBrowseService browseService; �...@springbean private IAddEditService addEditService; �...@springbean private IBook book; �...@springbean private IConferencePaper conferencePaper; �...@springbean private ITechnicalReport technicalReport; �...@springbean private IWorkshop workshop; �...@springbean private IArticle article; �...@springbean private IBookChapter bookChapter; �...@springbean(name = book) private IPublication publication; private ListShort year; private ListByte month; private Form form; private WebMarkupContainer detailsBook, detailsConferencePaper, detailsTechnicalReport, detailsWorkshop, detailsArticle, detailsBookChapter, detailsCurrent; private AjaxFallbackLink addAuthor, removeAuthor; private AutoCompleteTextFieldUser[] authors; public AddPublicationPanel() { super(block, Add Publication); initLists(); initCommon(); initDetails(); } private void initCommon() { add(new FeedbackPanel(feedback)); add(form = new Form(form, new CompoundPropertyModel( publication)) { protected void onSubmit() { switch (publication.getPublicationType()) { case BOOK: break; case BOOK_CHAPTER: break; case ARTICLE: break; case CONFERENCE_PAPER: break; case WORKSHOP: break; case TECHNICAL_REPORT: break; } } }); // title form.add(new TextField(title).setRequired(true).add( StringValidator.maximumLength(128))); // year form.add(new DropDownChoice(year, year)); // month form.add(new DropDownChoice(month, month, new ChoiceRenderer() { �...@override public Object getDisplayValue(Object object) { return (new DateFormatSymbols().getMonths())[((Byte) object) .intValue()]; } })); // abstractText form.add(new TextArea(abstractText).add(StringValidator .maximumLength(2048))); // required?? // reproducible form.add(new CheckBox(reproducible)); // passwordProtected form.add(new CheckBox(passwordProtected)); // keywords form.add(new TextField(keywords).add( new PatternValidator((\\s*\\w+\\s*,*\\s*)*,*\\s*)).add( StringValidator.maximumLength(2048))); // authors (internal external) authors = new AutoCompleteTextFieldUser[10]; for (int i = 0; i 10; i++) // use model to set authors (internal external) // later* form.add((authors[i] = new AutoCompleteTextFieldUser(author + i)) .setVisible(false).setOutputMarkupId(true) .setOutputMarkupPlaceholderTag(true)); authors[0].setRequired(true).setVisible(true); form.add((addAuthor = (new AjaxFallbackLink(add) { �...@override public void onClick(AjaxRequestTarget target) { int pointer; for (pointer = 0; pointer 10; pointer++) { if (!authors[pointer].isVisible()) { break; } } if (pointer 10) { authors[pointer].setVisible(true); if (pointer == 9) this.setVisible(false); if (pointer 0) removeAuthor.setVisible(true); if (target != null) { target.addComponent(authors[pointer]); target.addComponent(removeAuthor); target.addComponent(this); } } } })).setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true)); form.add((removeAuthor = (new AjaxFallbackLink(remove) { �...@override
Removing an element from ListView with AjaxFallbackButton
Hi all, I have some problem with ListViews and AjaxFallbackButton: The main idea is, that I have a Listview and a NewEntry button outside the LV. If I press the new button I'm gonna have a new ddc and Textfield and a Remove button in the LV. So far it works as intended, until I'm trying to remove an entry from the list. First I tought the problem is around ArrayList#remove because it always remove the first occurrence of the object. That's why I created an UUID field with random id for every single listelement, and I also overrided the eguals function, so it would handle the uuid's. But, this is still not working, I checked the lists elements, and from the ArrayList the correct one is deleted, but on the page a wrong one makes dissappear, making the remove buttons worthless (because the removable item is already removed...) I tried this code: public HomePage(final PageParameters pageParameters) { final Person person = new Person(); final Form form = new Form(form) { @Override protected void onSubmit() { super.onSubmit(); } }; final WebMarkupContainer rowPanel = new WebMarkupContainer(rowPanel); final ListViewIMAccount listview = new ListViewIMAccount(ims, new PropertyModel(person, ImAccounts)) { @Override protected void populateItem(ListItemIMAccount item) { final IMAccount acc = item.getModelObject(); item.add(new DropDownChoice(imProtocol, new PropertyModel(acc, protocol), Arrays.asList(IMAccount.IMProtocol.values(; item.add(new TextField(imPresenceID, new PropertyModel(acc, presenceID))); item.add(new AjaxFallbackButton(imRemove, form) { @Override public void onSubmit(AjaxRequestTarget target, Form? form) { System.out.println(before removing the item:); for (IMAccount iMAccount : person.getImAccounts()) { System.out.println(iMAccount.getUuid()); } System.out.println(this should be removed: + acc.getUuid()); person.getImAccounts().remove(acc); System.out.println(after removing:); for (IMAccount iMAccount : person.getImAccounts()) { System.out.println(iMAccount.getUuid()); } if (target != null) { target.addComponent(rowPanel); } } }.setDefaultFormProcessing(false)); } }; listview.setReuseItems(true); rowPanel.add(listview); rowPanel.add(new AjaxFallbackButton(imAdd, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { final ListIMAccount list = listview.getModelObject(); list.add(new IMAccount(IMAccount.IMProtocol.icq, )); if (target != null) { target.addComponent(rowPanel); } } }.setDefaultFormProcessing(false)); rowPanel.setOutputMarkupId(true); form.add(rowPanel); add(form); } What am I doing wrong? I have created a quickstart for the problem, which is available here: http://users.hszk.bme.hu/~mp695/myproject.zip Should I create a JIRA issue, or did I made some terrible mistake? :) Thanks for any help Best Regards, Peter Major - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: IndexOutOfBoundsException on ListView model add()
In case anyone else ends up with a similar error, here's the solution I ended up using. (Yes, I'm sure it's an awful hack, but right now it works for me.) First, I swapped the Set/List implementation I was using in Employer Info [1], since I realized that the items affected in my previously generated List weren't getting passed back to the Set. Then I passed my ListView the list directly, rather than wrapped in a model [2]. The AjaxSubmitLink adds to that list, by way of the ListView's model [3]. Then, when the user wanted to save the updated List, I had to explicitly re-set it in the Form model [4]. That resolved my IndexOutOfBoundsException issue. However, when I tried to persist the list, I got an org.hibernate.NonUniqueObjectException. This is my first Hibernate/Wicket project, so I'm pretty clueless about that one. Searching the list, I found a post by Eelco [5] that mentioned using Hibernate's Session.evict(), so I implemented that in the persist function of the DAO [6]. Now it appears to be working! -- [1] - public class EmployerInfo extends PersonInfoImpl { ... ListContactPoint contactPointsList; public ListContactPoint getContactPoints() { return contactPointsList; } public void setContactPoints(ListContactPoint contactPointsList) { this.contactPointsList = contactPointsList; } public SetContactPoint getContactPointsSet() { return new HashSetContactPoint(contactPointsList); } public void setContactPointsSet(SetContactPoint contactPointsSet) { ListContactPoint list = new ArrayListContactPoint(contactPointsSet); Collections.sort(list); contactPointsList = list; } } [2] - final ListViewContactPoint contactPointsListView = new ListViewContactPoint(contactPoints, employerInfoModel.getObject().getContactPoints()) {...}; [3] - new AjaxSubmitLink(addContactLink, this) { @Override public void onSubmit(AjaxRequestTarget target, Form? form) { contactPointsListView.getModelObject().add(new ContactPointImpl()); target.addComponent(contactPointsContainer); } [4] - new SubmitLink(saveContactPoints) { @Override public void onSubmit() { super.onSubmit(); employerInfoModel.getObject().setContactPoints(contactPointsListView.getModelObject()); personInfoDao.persistOrMerge(employerInfoModel.getObject()); info(Your account has been updated.); } [5] - http://www.nabble.com/delete-onSubmit-td22839614.html#a22839614 [6] - public void persistOrMerge(PersonInfo personInfo) { getHibernateTemplate().evict(personInfo); try { getHibernateTemplate().saveOrUpdate(personInfo); } catch (Exception e) { getHibernateTemplate().merge(personInfo); } }
Re: Performance Problem
I'm sorry igor, i didn't mean to post it twice i thought this one wasn't posted as it took 5 hours to appear on the forum so i sent another one. I'm going to delete the other post. as to using a profiler, i'm not really familiar with such a tool but i'll see what i can do. igor.vaynberg wrote: use a profiler. -igor On Thu, Aug 13, 2009 at 9:10 AM, Mostafa Mohamedes.most...@gmail.com wrote: Hi, We're working on a wicket/spring/hibernate webapp (research repository) and today i was working on an 'Add Publication Panel'. i added some validation today but whenever i click on the link that shows the panel in the main content area it takes like 10/15 seconds to show it. Tomcat doesn't show any errors and everything is working. here's my Add Publication Panel. i have no idea as to what could be causing this. here's my panel's .java public class AddPublicationPanel extends BasicPanel { @SpringBean private IBrowseService browseService; @SpringBean private IAddEditService addEditService; @SpringBean private IBook book; @SpringBean private IConferencePaper conferencePaper; @SpringBean private ITechnicalReport technicalReport; @SpringBean private IWorkshop workshop; @SpringBean private IArticle article; @SpringBean private IBookChapter bookChapter; @SpringBean(name = book) private IPublication publication; private ListShort year; private ListByte month; private Form form; private WebMarkupContainer detailsBook, detailsConferencePaper, detailsTechnicalReport, detailsWorkshop, detailsArticle, detailsBookChapter, detailsCurrent; private AjaxFallbackLink addAuthor, removeAuthor; private AutoCompleteTextFieldUser[] authors; public AddPublicationPanel() { super(block, Add Publication); initLists(); initCommon(); initDetails(); } private void initCommon() { add(new FeedbackPanel(feedback)); add(form = new Form(form, new CompoundPropertyModel( publication)) { protected void onSubmit() { switch (publication.getPublicationType()) { case BOOK: break; case BOOK_CHAPTER: break; case ARTICLE: break; case CONFERENCE_PAPER: break; case WORKSHOP: break; case TECHNICAL_REPORT: break; } } }); // title form.add(new TextField(title).setRequired(true).add( StringValidator.maximumLength(128))); // year form.add(new DropDownChoice(year, year)); // month form.add(new DropDownChoice(month, month, new ChoiceRenderer() { @Override public Object getDisplayValue(Object object) { return (new DateFormatSymbols().getMonths())[((Byte) object) .intValue()]; } })); // abstractText form.add(new TextArea(abstractText).add(StringValidator .maximumLength(2048))); // required?? // reproducible form.add(new CheckBox(reproducible)); // passwordProtected form.add(new CheckBox(passwordProtected)); // keywords form.add(new TextField(keywords).add( new PatternValidator((\\s*\\w+\\s*,*\\s*)*,*\\s*)).add( StringValidator.maximumLength(2048))); // authors (internal external) authors = new AutoCompleteTextFieldUser[10]; for (int i = 0; i 10; i++) // use model to set authors (internal external) // later* form.add((authors[i] = new AutoCompleteTextFieldUser(author + i)) .setVisible(false).setOutputMarkupId(true) .setOutputMarkupPlaceholderTag(true)); authors[0].setRequired(true).setVisible(true); form.add((addAuthor = (new AjaxFallbackLink(add) { @Override public void onClick(AjaxRequestTarget target) { int pointer; for (pointer = 0; pointer 10; pointer++) { if (!authors[pointer].isVisible()) { break; } } if (pointer 10) { authors[pointer].setVisible(true); if (pointer == 9) this.setVisible(false); if (pointer 0) removeAuthor.setVisible(true); if (target != null) { target.addComponent(authors[pointer]);
Re: Using Wicket in a Java EE 6 container
I think the responsibilities are split. Wicket jar will provide the ServletFilter in web-fragment.xml and app will provide the filter parameter etc in web.xml. -Arun igor.vaynberg wrote: thats the problem, it will error out because applicationClassName param is required. i just dont think this new fragment feature matches very well with how wicket is used. -igor On Thu, Aug 13, 2009 at 12:08 PM, arunguptaarun.gu...@gmail.com wrote: I think it should be fine (but checking internally). Does it not depend upon how WicketFilter class handles it ? How does it behave if this fragment is not there if it's not specified in web.xml per the current usage ? -Arun igor.vaynberg wrote: what happens if i dont have the filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter piece in my web.xml? will that lead to an error? -igor On Wed, Aug 12, 2009 at 8:22 PM, arunguptaarun.gu...@gmail.com wrote: The fragment can be easily split as: -- cut here -- filter filter-namewicket.Filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class /filter -- cut here -- in web-fragment.xml and -- cut here -- filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.Filter/filter-name url-pattern/*/url-pattern /filter-mapping -- cut here -- in web.xml. This keeps the Wicket registration in web-fragment.xml and the actual params in web.xml. -Arun igor.vaynberg wrote: dont think so because a) not everyone wants to name their application class org.glassfish.samples.WicketApplication b) not everyone wants to use /* mapping i havent read the spec yet but just from looking at the article this is a little troubling from security perspective. just because i add a jar to my app it can now register a servlet behind my back and create a backdoor into the server? -igor On Tue, Aug 11, 2009 at 5:46 AM, Arun Guptaarun.gu...@gmail.com wrote: I wrote a blog describing how to use Wicket with a Servlet 3.0/Java EE 6 container: http://blogs.sun.com/arungupta/entry/totd_91_applying_java_ee Any chance the changes can be integrated in the wicket-*.jar ? -Arun -- Need Application Server ? - Download glassfish.org Blog: http://blogs.sun.com/arungupta - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24948061.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24957004.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24962144.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Portlet and ... 2.0 (How to pass parameters?)
Hi Rob, I want to do it because my application is composed of several portlets. If you click on one customer, for ex. you will want other portlets to show information relative to the customer you have just clicked. This is why you will need shared-parameters. That is inside portlet 2.0 spec. The other way to do it is with events. But this is not mature enough. El jue, 13-08-2009 a las 22:01 +0200, Rob Sonke escribió: Could you maybe explain why you need it? Do you want to pass data inside your portlet or to another portlet? Rob On 8/13/09 1:43 PM, Gonzalo Aguilar Delgado wrote: Hi all!, I have some questions about parameter passing in portal environment. I saw that WebPage class can have access to the Application class but not the portlet class. This makes a little tricky to handle requests because: We can set session paramaters. And can call functions inside Application (WicketExamplesMenuApplication.getExamples()). @Override public void onClick() { int index = ((LoopItem)getParent()).getIteration(); ExampleApplication ea = WicketExamplesMenuApplication.getExamples().get( index + 1); PortletSession session = ((PortletRequestContext)RequestContext.get()).getPortletRequest() .getPortletSession(); session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR, ea); } But it will be the portlet class the responsible for handling processing. So the only way to pass information from the onClick function to the portlet application for rendering (for example) is using the portlet session. But I suppose that's not the preferred way. What's the best way to pass information to the portlet class? Is there any way to use the portlet class like we use the application class (WicketExamplesMenuApplication.getExamples() - WicketExamplesMenuPortlet.getExamples()) I also saw that in the portlet example, the examples structure is initialized by the WicketExamplesMenuPortlet and sent to the WicketExamplesMenuApplication using the servlet context. But this will overbloat the servlet attributes storage space. Also this should be solved if webpages could access to the portlet class directly. Why to do this way? I want to know all this because I want to use shared render parameters (I put there a user id and all the portlets update accordingly). To do this I will do: 1.- Onclick: Put the Id on the session like above. 2.- Portlet.DoView: Recover id from session and store it in shared render params. 3.- Delete it from session. Is this the correct way to do it? Thank you very much in advance... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using Wicket in a Java EE 6 container
Wicket jar will provide the ServletFilter in web-fragment.xml and app will provide the filter parameter etc in web.xml. Small step for a man, one giant leap for someone else:). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using Wicket in a Java EE 6 container
And what if I'm wanna use WicketServlet instead of WicketFilter? I see that this web-fragment.xml could be very useful for other frameworks, but maybe it's not the best solution for Wicket. (It's just my opinion) Anyway, wicket needs ~20-25 line in web.xml, is it really that neccessary to pull apart these configurations? Best Regards, Peter Major 2009-08-14 01:30 keltezéssel, arungupta írta: I think the responsibilities are split. Wicket jar will provide the ServletFilter in web-fragment.xml and app will provide the filter parameter etc in web.xml. -Arun igor.vaynberg wrote: thats the problem, it will error out because applicationClassName param is required. i just dont think this new fragment feature matches very well with how wicket is used. -igor On Thu, Aug 13, 2009 at 12:08 PM, arunguptaarun.gu...@gmail.com wrote: I think it should be fine (but checking internally). Does it not depend upon how WicketFilter class handles it ? How does it behave if this fragment is not there if it's not specified in web.xml per the current usage ? -Arun igor.vaynberg wrote: what happens if i dont have the filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter piece in my web.xml? will that lead to an error? -igor On Wed, Aug 12, 2009 at 8:22 PM, arunguptaarun.gu...@gmail.com wrote: The fragment can be easily split as: -- cut here -- filter filter-namewicket.Filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class /filter -- cut here -- in web-fragment.xml and -- cut here -- filter filter-namewicket.Filter/filter-name init-param param-nameapplicationClassName/param-name param-valueorg.glassfish.samples.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.Filter/filter-name url-pattern/*/url-pattern /filter-mapping -- cut here -- in web.xml. This keeps the Wicket registration in web-fragment.xml and the actual params in web.xml. -Arun igor.vaynberg wrote: dont think so because a) not everyone wants to name their application class org.glassfish.samples.WicketApplication b) not everyone wants to use /* mapping i havent read the spec yet but just from looking at the article this is a little troubling from security perspective. just because i add a jar to my app it can now register a servlet behind my back and create a backdoor into the server? -igor On Tue, Aug 11, 2009 at 5:46 AM, Arun Guptaarun.gu...@gmail.com wrote: I wrote a blog describing how to use Wicket with a Servlet 3.0/Java EE 6 container: http://blogs.sun.com/arungupta/entry/totd_91_applying_java_ee Any chance the changes can be integrated in the wicket-*.jar ? -Arun -- Need Application Server ? - Download glassfish.org Blog: http://blogs.sun.com/arungupta - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24948061.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Using-Wicket-in-a-Java-EE-6-container-tp24916920p24957004.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: Portlet and ... 2.0 (How to pass parameters?)
El jue, 13-08-2009 a las 14:46 +0200, Wilhelmsen Tor Iver escribió: But it will be the portlet class the responsible for handling processing. So the only way to pass information from the onClick function to the portlet application for rendering (for example) is using the portlet session. But why would you want to go via the Application? The WicketPortlet is mostly just the front controller responsible for mapping between the portlet world and the Wicket world: Either use a custom WebSession for the portlet app, or pass the values you need in the PageParameters you send to the response page in your onClick()/onSubmit(). This assumes the onClick() is for a link on a Page that is part of the portlet application. Rendering is left to these Pages. I have no means to access my portlet from the page. How can you do it? I also saw that in the portlet example, the examples structure is initialized by the WicketExamplesMenuPortlet and sent to the WicketExamplesMenuApplication using the servlet context. But this will overbloat the servlet attributes storage space. Also this should be solved if webpages could access to the portlet class directly. Why to do this way? The Examples portlet is a bit strange compared to how you would normally do things it seems. Yep. I configured the application in 5 different ways. I have to mix Spring+ Wicket+Hibernate+Portlets... It's a mess. But now it works perfectly. And curiously is a way I've never seen before. You don't need portlet beans... Normally you do... 1.- Onclick: Put the Id on the session like above. 2.- Portlet.DoView: Recover id from session and store it in shared render params. 3.- Delete it from session. Is this the correct way to do it? You could try making normal PortletURLs instead of using Wicket Link elements; use setProperty()/addProperty() to set the portlet parameter. Presumably Wicket's Portlet API implementation will deal with the mapping just as it does today with mapping to and from PageParameters. Nope. With normal parameters the other portlets must not see them!!! If so it's a security error. Every portlet must be isolated. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Portlet and ... 2.0 (How to pass parameters?)
Hi all! I managed to do it with wicket 1.4. This is how: Define it in portlet.xml portlet-app ... public-render-parameter identifiercrmportal:userId/identifier qname xmlns:x=http://www.level2crm.com/params;x:userId/qname /public-render-parameter /portlet-app Every portlet that will use it must also be configured with: portlet ... supported-public-render-parametercrmportal:userId/supported-public-render-parameter /portlet After doing this the portlet must have access to this parameter. But as I have not access from Page processing to the Wicket Portlet class I should hold the variable in session for a while: Link link = new Link(id, new PropertyModelString(userObject, uuid.uuid)) { @Override public void onClick() { UUID uuid = (UUID) this.getModelObject(); PortletSession session = ((PortletRequestContext)RequestContext.get()).getPortletRequest() .getPortletSession(); session.setAttribute(CustomerListPortlet.CURRENT_UUID, uuid.toString()); } }; And after in the function processActionResponseState we can set the public parameter after we recover it from session. @Override protected void processActionResponseState(String wicketURL, String wicketFilterPath, String wicketFilterQuery, PortletRequest request, ActionResponse response, WicketResponseState responseState) throws PortletException, IOException { PortletSession session = request.getPortletSession(); String uuid = (String)session.getAttribute(CURRENT_UUID); if(uuid!=null) { response.setRenderParameter(crmportal:userId, uuid); } // TODO Auto-generated method stub super.processActionResponseState(wicketURL, wicketFilterPath, wicketFilterQuery, request, response, responseState); } The other portlets will see this public render parameter as normal parameter (NOTE: I don't know why not differentiate from the rest of parameters. Can it have security considerations?). This is accessible directly in the page (This is other portlet and other application inside the portal): IModel loadableUserModel = new LoadableDetachableModel() { @Override protected Object load(){ User selectedUser = null; String value = ((PortletRequestContext)RequestContext.get()).getPortletRequest().getParameter(crmportal:userId); if(value!=null) { UuidUserType uuid = UuidUserType.fromString(value); selectedUser = userDAO.find(uuid); if(!userDAO.isAttached(selectedUser)) { userDAO.save(selectedUser); //Attach it } SetContactBasicDetail setDetails = selectedUser.getContactBasicDetails(); setDetails.isEmpty(); return setDetails.toArray(); } return null; } }; It seems to work right. But means are subject of discussion... Tnx El jue, 13-08-2009 a las 13:43 +0200, Gonzalo Aguilar Delgado escribió: Hi all!, I have some questions about parameter passing in portal environment. I saw that WebPage class can have access to the Application class but not the portlet class. This makes a little tricky to handle requests because: We can set session paramaters. And can call functions inside Application (WicketExamplesMenuApplication.getExamples()). @Override public void onClick() { int index = ((LoopItem)getParent()).getIteration(); ExampleApplication ea = WicketExamplesMenuApplication.getExamples().get( index + 1); PortletSession session = ((PortletRequestContext)RequestContext.get()).getPortletRequest() .getPortletSession(); session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR,
Very basic question on AjaxLink
Hi all, I have a panel which has a AjaxLink. And, I have another panel, which is empty it just has a text. Both these panels are in a page. One on the left hand side and other on the right hand side. The panel in the left hand side is the one that has the AjaxLink. OnClick of the AjaxLink, I am creating a new of panel(on right hand side) and adding it in the target. I see nothing happening and my Ajax Response is blank. Whys this? I am able to sense I am making a simple mistake, I see something wrong when I map this to basic HTML but I am unable to narrow down on it. Could you please help? Thanks J
Re: Very basic question on AjaxLink
you also have to add the panel to the page, or in your case most likely replace the old panel with the new one. after you do that then add it to the ajax target. adding things to the target does not add them to the page, only marks them for update. -igor On Thu, Aug 13, 2009 at 6:49 PM, Jadejada...@gmail.com wrote: Hi all, I have a panel which has a AjaxLink. And, I have another panel, which is empty it just has a text. Both these panels are in a page. One on the left hand side and other on the right hand side. The panel in the left hand side is the one that has the AjaxLink. OnClick of the AjaxLink, I am creating a new of panel(on right hand side) and adding it in the target. I see nothing happening and my Ajax Response is blank. Whys this? I am able to sense I am making a simple mistake, I see something wrong when I map this to basic HTML but I am unable to narrow down on it. Could you please help? Thanks J - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: inmethod datagrid with a DropDownChoice cell
Will Jaynes-4 wrote: I have come up with a quickstart project that shows my problem with creating an EditableDropDownPropertyColumn for the inmethod datagrid. I'm sure I'm not understanding something fundamental. The classes in the edu.umich.med.irs.column package are my attempts. If anyone has time to look at this I'd certainly appreciate it. Thanks. Will The attached updated example fixes the problem: http://www.nabble.com/file/p24964981/irs-quickstart2.zip irs-quickstart2.zip . -- View this message in context: http://www.nabble.com/inmethod-datagrid-with-a-DropDownChoice-cell-tp22068863p24964981.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Removing an element from ListView with AjaxFallbackButton
Because of this: listview.setReuseItems(true); You should do a removeAll() in your onSubmit() method when you change the model (the list in this case). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Performance Problem
I figured out what the problem was and thought i'd share how it was solved in case someone else has the same problem, we had this in the html page wicket:head wicket:link link rel=stylesheet type=text/css href=link to css file / /wicket:link /wicket:head which i guess would cause wicket to spend some time looking for a css file that doesn't exist. -- View this message in context: http://www.nabble.com/Performance-Problem-tp24957835p24965566.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Get all sessions and manipulate them
It'd be easy to create this as an addon project. Wicketstuff? -- Jeremy Thomerson http://www.wickettraining.com On Thu, Aug 13, 2009 at 10:23 AM, Jing Ge (Besitec IT DEHAM)j...@besitec.com wrote: Hello, This is also a very interesting question that I wanna ask. I've googled and found a single Nabble Mail site about it: http://www.nabble.com/Get-all-sessions-users-for-a-web-application-td213 67229.html We can only get some session data from the RequestLogger, but not the session itself. So if we wanna manipulate all sessions, using the RequestLogger ist not the correct way. Implementing the HttpSessionListener should be work, but the same code will repeated by all projects, that wanna manipulate the sessions any common feature in wicket? Maybe 1.4.x? Regards! Jing -Original Message- From: uud ashr [mailto:uuda...@gmail.com] Sent: Dienstag, 11. August 2009 13:25 To: users@wicket.apache.org Subject: Re: Get all sessions and manipulate them I don't know. Asked many times but maybe not so popular. I can't find it easily. Do I have to save it manually all available session by creating class implementing ISession store? Or there is another way? Regards, uudashr On Tue, Aug 11, 2009 at 11:36 AM, Jeremy Thomerson jer...@wickettraining.com wrote: This question has been asked and answered many times on this mailing list. Please try searching the archives on Nabble. Then let us know if you have questions about one of those implementations. -- Jeremy Thomerson http://www.wickettraining.com On Mon, Aug 10, 2009 at 10:59 PM, uud ashruuda...@gmail.com wrote: Hi all, How to manipulate all existing sessions on wicket. I can get the SessionData trough getRequestLogger().getLiveSessions(), but I can't manipulate the SessionData. For examples, I have session class: public class MyAppSession extends WebSession { ... public void setLoggedUser(User user) { } public User getLoggedUser() { } } I want to kick all logged users because I want to do something like maintenance thing by using theSession.setLoggedUser(null) to all available sessions. Anyone knows? Regards, uudashr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Portlet and ... 2.0 (How to pass parameters?)
It's up to you but I think there is a more beautiful/easier way. Just configure the public render params the same in the portlet.xml. Use this to set params in e.g. an onClick: ActionResponse actionResponse = (ActionResponse) ((PortletRequestContext)PortletRequestContext.get()).getPortletResponse(); actionResponse.setRenderParameter(name.getValue(), value); And this to retrieve a parameter anywhere: PortletRequestContext prc = (PortletRequestContext)RequestContext.get(); MapString, String[] map = prc.getPortletRequest().getPublicParameterMap(); map.get(name.getValue()); But that's up to you :) Rob On 8/14/09 1:50 AM, Gonzalo Aguilar Delgado wrote: Hi all! I managed to do it with wicket 1.4. This is how: Define it in portlet.xml portlet-app ... public-render-parameter identifiercrmportal:userId/identifier qname xmlns:x=http://www.level2crm.com/params;x:userId/qname /public-render-parameter /portlet-app Every portlet that will use it must also be configured with: portlet ... supported-public-render-parametercrmportal:userId/supported-public-render-parameter /portlet After doing this the portlet must have access to this parameter. But as I have not access from Page processing to the Wicket Portlet class I should hold the variable in session for a while: Link link = new Link(id, new PropertyModelString(userObject, uuid.uuid)) { @Override public void onClick() { UUID uuid = (UUID) this.getModelObject(); PortletSession session = ((PortletRequestContext)RequestContext.get()).getPortletRequest() .getPortletSession(); session.setAttribute(CustomerListPortlet.CURRENT_UUID, uuid.toString()); } }; And after in the function processActionResponseState we can set the public parameter after we recover it from session. @Override protected void processActionResponseState(String wicketURL, String wicketFilterPath, String wicketFilterQuery, PortletRequest request, ActionResponse response, WicketResponseState responseState) throws PortletException, IOException { PortletSession session = request.getPortletSession(); String uuid = (String)session.getAttribute(CURRENT_UUID); if(uuid!=null) { response.setRenderParameter(crmportal:userId, uuid); } // TODO Auto-generated method stub super.processActionResponseState(wicketURL, wicketFilterPath, wicketFilterQuery, request, response, responseState); } The other portlets will see this public render parameter as normal parameter (NOTE: I don't know why not differentiate from the rest of parameters. Can it have security considerations?). This is accessible directly in the page (This is other portlet and other application inside the portal): IModel loadableUserModel = new LoadableDetachableModel() { @Override protected Object load(){ User selectedUser = null; String value = ((PortletRequestContext)RequestContext.get()).getPortletRequest().getParameter(crmportal:userId); if(value!=null) { UuidUserType uuid = UuidUserType.fromString(value); selectedUser = userDAO.find(uuid); if(!userDAO.isAttached(selectedUser)) { userDAO.save(selectedUser); //Attach it } SetContactBasicDetail setDetails = selectedUser.getContactBasicDetails(); setDetails.isEmpty(); return setDetails.toArray(); } return null; } }; It seems to work right. But means are subject of discussion... Tnx El jue, 13-08-2009 a las 13:43 +0200, Gonzalo Aguilar Delgado escribió: Hi all!, I have some questions about parameter passing in portal environment. I saw that WebPage class