Re: adding the wicket project for debugging etc
You have to have added the projects to your workspace before you can make it work. Martijn On Wed, Feb 10, 2010 at 9:07 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Didn't work for me - I had a workspace that had a secular project in it, Wicket 1.4.x and Brix trunk (1.0.1-snapshot), and it didn't auto-discover anything outside of each individual project. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Feb 10, 2010 at 2:01 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Nope. If it finds the source for a dependency in your workspace then the project is added instead. It even discovers wrong versions and logs them :) Martijn On Wed, Feb 10, 2010 at 8:13 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: mvn eclipse:eclipse only work across the modules of the same project, but not across projects -igor On Wed, Feb 10, 2010 at 11:10 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: mvn eclipse:eclipse already does that for you (2.7) Martijn On Wed, Feb 10, 2010 at 7:20 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: you can check out wicket from svn, mvn eclipse:eclipse and import the projects into your workspace. then use something like mvnlink.googlecode.com to make your projects use the imported wicket projects as dependencies instead of jars. -igor On Wed, Feb 10, 2010 at 9:44 AM, Jeroen Dijkmeijer jer...@dijkmeijer.com wrote: Yeah seen it done it been there. But that doesn't give me the wicket source, which I can debug, or modify. On Feb 10, 2010, at 5:13 PM, Ernesto Reinaldo Barreiro wrote: Do you know [1]? It is very easy to develop using that approach. Regards, Ernesto [1]-http://wicket.apache.org/quickstart.html On Wed, Feb 10, 2010 at 5:05 PM, Jeroen Dijkmeijer jer...@dijkmeijer.comwrote: Hi, I think this is more of a maven question, so its also posted at the maven user list. I'm trying to understand wicket a bit more, and I would like it to add it as source tree to my project, but for for some reason I cant make it happen. I have myproject-web, myproject-domain and myproject-parent. The latter specifying the former 2 as modules. I'm running myproject-web in tomcat which is configured in eclipse wtp. Myproject-web holds a reference to wicket as a dependency and I can see the myproject-domain project. Now I would like to add wicket with the proper release tag as a source tree to the project, so I can set debug breakpoints, add log stmts, take short cuts, break code fix it. All to get a better understanding what's happening under the hood. Wicket in itself has many subprojects which i don't need all in the source tree (but I guess it would not be a disaster if they were). So I checked out the wicket source from svn to some directory (The wicket project has a parent pom in the root, and all the other projects are its siblings) Imported that directory into eclipse, and added the sub-project wicket as a module to myproject-parent, but that does not work for me. Also eclipse does not recognize the added wicket source tree, when opening the declaration it goes straight to the Wicket-Object.class and shows the attached source code instead of the code from the newly added source tree. I tried a few other things but that didnot show the source at best (often I could not even get tomcat start up) I'm pretty sure its al very simple but somehow i cant get it to work. regards, Jeroen. - 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 -- 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.4 - 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.4
Wicket MashUpContainer
Hi folks! In web development, a mashup is a web page or application that combines data or functionality from two or more independent components or sources to create a new view or service. The term mashup implies easy, fast, snap-on integration. If the mashup sources are from independent applications, integration can be done via open APIs or data sources. However, if the mashup sources are native to the development framework, native interfaces can be used. Mashups are used to allow producing results that extend the original purpose of producing the source component, service or data. The actual ”mashign up” can occur at runtime or at compile time. However, the more flexible it is the moer ”mashup style” it is. One well known example of mashups is Google Maps: the map is an independent source and one can mash-it-up with various labels, pins, position indicators, route indicators, etc. Few mashup articles on the web: * http://en.wikipedia.org/wiki/Mashup_%28web_application_hybrid%29 * http://www.esri.com/software/mapping_for_everyone/api/mashup.html * http://code.google.com/intl/fi-FI/gme/ As a simple example of creating a mashup using wicket, I will use simple web page layout. As sources we will have components such as header, menu, footer, and content. The mashup will be introduced onto a page that aggregates these contents on-demand. Here goes the example, and ofcourse discussion about the pros and cons of the approach is welcome! In addition to the snipplet posted here, full source code is available at http://code.google.com/p/wicket-mashup/ ::: public class HomePage extends MashupWebPage implements IHeaderContributor { /** */ private static final long serialVersionUID = 1L; public void renderHead(IHeaderResponse headerResponse) { headerResponse.renderString(style type=\text/css\ div.content { margin: 20px; height: 250px; }/style); } public HomePage() { add((Panel) new HeaderPanel(GID)); set(1, (Panel) new StyledMenuPanel(GID) { @Override public void setSelectedTabPanelContent(Panel newInstance) { HomePage.this.set(2, newInstance); } }); add((Panel) new FooterPanel(GID)); } } ::: Awaiting for feedback, discussion, and suggestions for improvement, Martin :) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicketstuff versions
I'm a little confused about the versioning for Wicketstuff. I am currently using inmethod-grid, jquery, and yui. All three projects now have a 1.4-SNAPSHOT and a 1.4.2-SNAPSHOT version and (inmethod-grid and yui both have a 1.4.1 release version). What is the difference between the two SNAPSHOT versions? I tried searching on it and looking at the Wicketstuff Wiki, but could not find an explanation. Which should we be using?
TextArea in repeater doesn't update it's model
I have an AjaxFallBackLink that executes an update in a service, but i need the textArea of the same row to be updated. I have wasted all morning but i can't still make it work. I reached this point: DataView dv = new DataView(dataView,ldp) { private static final long serialVersionUID = -3315693391867601086L; @Override protected void populateItem(Item arg0) { Label pagina; final Label codi; final TextArea valor; AjaxFallbackLink link; final StringBuffer vBuffer = new StringBuffer(); final AccTextosWrapper tWrapper = (AccTextosWrapper)arg0.getModelObject(); pagina = new Label(pagina, tWrapper.getPagina()); codi = new Label(codi,tWrapper.getCodi()); codi.setOutputMarkupId(true); valor = new TextArea(valor, new PropertyModel(tWrapper,descripcio)); valor.add(new AjaxEventBehavior(onblur) { @Override protected void onEvent(AjaxRequestTarget arg0) { String val = valor.getModelObjectAsString(); vBuffer.delete(0, vBuffer.length()); vBuffer.append((val == null)?:val); } }); valor.setOutputMarkupId(true); link = new AjaxFallbackLink(link) { private static final long serialVersionUID = 3439293533625966929L; @Override public void onClick(AjaxRequestTarget arg0) { String c = codi.getModelObjectAsString(); adminService.updateTextDescripcio(c,vBuffer.toString()); } }; link.setOutputMarkupId(true); arg0.add(pagina); arg0.add(codi); arg0.add(valor); arg0.add(link); } }; If i don't use validate() and updateModel() i get the same string i had at the start otherwise i get null. All works fine but the TextArea model. Thank you very much for your help
jdbc
Hello! I can't understand how to populate data from a resultset object into datatable. Anyone have an example? Thank you! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem with RadioGroup / Ajax
I'm having the same problem when using two RadioGroup with AjaxFormChoiceComponentUpdatingBehavior in the same page. On Thu, Jul 2, 2009 at 6:07 AM, Mathias Nilsson wicket.program...@gmail.com wrote: I've made a sample page. public class HomePage extends WebPage { private static final long serialVersionUID = 1L; public HomePage(final PageParameters parameters) { String[] choices = new String[]{ Wicket, Spring, DB4O }; final RadioGroupString group = new RadioGroupString(group, new ModelString()); ListViewString groupView = new ListViewString( groupView , Arrays.asList( choices )){ private static final long serialVersionUID = 1L; �...@override protected void populateItem(ListItemString item) { item.add( new RadioString( radio, new ModelString() )); } }; group.setOutputMarkupId( true ); group.add( new AjaxFormChoiceComponentUpdatingBehavior(){ private static final long serialVersionUID = 1L; �...@override protected void onUpdate(AjaxRequestTarget target) { // TODO: Check this System.out.println( Here ); } }); group.add( groupView ); FormVoid form = new FormVoid( form ); form.add( group ); add( form ); } } -- View this message in context: http://www.nabble.com/Problem-with-RadioGroup---Ajax-tp24300010p24302858.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: jdbc
You need to create a provider for your data. Look at what the constructor takes and then implement the interface. On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote: Hello! I can't understand how to populate data from a resultset object into datatable. Anyone have an example? Thank you! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Form validation without a form component
for the archive-searchers :) simply override onValidate in the Form class, check your listsize there call error() when applicable Antoine On Fri, Apr 3, 2009 at 12:25 PM, triswork tristan.k...@gmail.com wrote: Thanks for the suggestion Martijn. I tried return new FormComponent[0]; and got exactly the same error. I think my use-case is quite fringe, so I have resigned myself to using the hidden field that you previously suggested. - Tristan Martijn Dashorst wrote: You might try to return an empty array.. Martijn -- View this message in context: http://www.nabble.com/Form-validation-without-a-form-component-tp22682572p22866535.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: jdbc
I already have method that return my data from db as arraylist. And i use this in iterator() method of dataprovider. But which object (i think model) i must return? 2010/2/11 James Carman jcar...@carmanconsulting.com: You need to create a provider for your data. Look at what the constructor takes and then implement the interface. On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote: Hello! I can't understand how to populate data from a resultset object into datatable. Anyone have an example? Thank you! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
expecting different behavior from form validation - potential bug?
hi, In a nested form the onValidate() is overridden. It sets an error message on a component inside this form - so not on the form itself. However the submit on the form itself is executed as if no error exists. What I see when debugging is that hasErrorMessages on the inside nested form returns false. Is this correct? Should I explicitly set an error on the form, or something else to indicate the form itself has an error? ..using 1.4.6 Antoine. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: jdbc
http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html -Ursprüngliche Nachricht- Von: Ivan Dudko [mailto:ivan.du...@gmail.com] Gesendet: Donnerstag, 11. Februar 2010 15:47 An: users@wicket.apache.org Betreff: Re: jdbc I already have method that return my data from db as arraylist. And i use this in iterator() method of dataprovider. But which object (i think model) i must return? 2010/2/11 James Carman jcar...@carmanconsulting.com: You need to create a provider for your data. Look at what the constructor takes and then implement the interface. On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote: Hello! I can't understand how to populate data from a resultset object into datatable. Anyone have an example? Thank you! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using email in SignInPanel Username
Hi as suggested I made my own signinpanel and cookiepersister which encodes and decodeswhen saving and retrieving cookies. jthomerson wrote: May be a bug. Please file a JIRA. In the meantime, the signinpanel is pretty generic and not meant for every usecase. You can easily create your own - even copying the code and modifying it. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 29, 2009 at 1:43 AM, wicketnewuser swarn...@hotmail.com wrote: Any one know what the solution for this is wicketnewuser wrote: I'm trying to use wicket signinpanel . When and choose remember me checkbox and use email address in username (eg@ttt.com , next time when i come it it just remembers abc as user name instead of a...@ttt.com ). It seems when storing and retreving value from cookies we need to encode and decode the value . It doesn't look like wicket is doing this by default which is why this is happening. Does any one know what is the solution for this. html head titleSign In/title link rel=stylesheet type=text/css href=style.css/ style body { background-image: none; } /style /head body h2Sign In/h2 /body /html thank you -- View this message in context: http://www.nabble.com/Using-email-in-SignInPanel-Username-tp26085468p26107531.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 -- View this message in context: http://old.nabble.com/Using-email-in-SignInPanel-Username-tp26085468p27547261.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: jdbc
Yeah, but this doesn't give them an example of how to get the results out of a JDBC result set. This is based on a static, in-memory list of Contact objects. What I would recommend is to look at a Hibernate-based example and come up with the JDBC analog. Here's an example from my Advanced Wicket talk I gave a while back: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java At the bottom, there's a data provider which talks to a repository to get its data. On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html -Ursprüngliche Nachricht- Von: Ivan Dudko [mailto:ivan.du...@gmail.com] Gesendet: Donnerstag, 11. Februar 2010 15:47 An: users@wicket.apache.org Betreff: Re: jdbc I already have method that return my data from db as arraylist. And i use this in iterator() method of dataprovider. But which object (i think model) i must return? 2010/2/11 James Carman jcar...@carmanconsulting.com: You need to create a provider for your data. Look at what the constructor takes and then implement the interface. On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote: Hello! I can't understand how to populate data from a resultset object into datatable. Anyone have an example? Thank you! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jdbc
Thank you. I already do simple things with hibernate and spring ioc. Now i want to use plain old jdbc. I already get the datatable wich works with one pojo (table). Now i am in trouble.. how i can get table for two joined tables, for example? 2010/2/11 James Carman jcar...@carmanconsulting.com: Yeah, but this doesn't give them an example of how to get the results out of a JDBC result set. This is based on a static, in-memory list of Contact objects. What I would recommend is to look at a Hibernate-based example and come up with the JDBC analog. Here's an example from my Advanced Wicket talk I gave a while back: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java At the bottom, there's a data provider which talks to a repository to get its data. On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html -Ursprüngliche Nachricht- Von: Ivan Dudko [mailto:ivan.du...@gmail.com] Gesendet: Donnerstag, 11. Februar 2010 15:47 An: users@wicket.apache.org Betreff: Re: jdbc I already have method that return my data from db as arraylist. And i use this in iterator() method of dataprovider. But which object (i think model) i must return? 2010/2/11 James Carman jcar...@carmanconsulting.com: You need to create a provider for your data. Look at what the constructor takes and then implement the interface. On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote: Hello! I can't understand how to populate data from a resultset object into datatable. Anyone have an example? Thank you! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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: jdbc
Well, what sort of object do you want to display? Are you going to just create an Object[] for each row in the table? Or, are you creating a DTO of some sort? On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com wrote: Thank you. I already do simple things with hibernate and spring ioc. Now i want to use plain old jdbc. I already get the datatable wich works with one pojo (table). Now i am in trouble.. how i can get table for two joined tables, for example? 2010/2/11 James Carman jcar...@carmanconsulting.com: Yeah, but this doesn't give them an example of how to get the results out of a JDBC result set. This is based on a static, in-memory list of Contact objects. What I would recommend is to look at a Hibernate-based example and come up with the JDBC analog. Here's an example from my Advanced Wicket talk I gave a while back: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/main/java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.java At the bottom, there's a data provider which talks to a repository to get its data. On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html -Ursprüngliche Nachricht- Von: Ivan Dudko [mailto:ivan.du...@gmail.com] Gesendet: Donnerstag, 11. Februar 2010 15:47 An: users@wicket.apache.org Betreff: Re: jdbc I already have method that return my data from db as arraylist. And i use this in iterator() method of dataprovider. But which object (i think model) i must return? 2010/2/11 James Carman jcar...@carmanconsulting.com: You need to create a provider for your data. Look at what the constructor takes and then implement the interface. On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko ivan.du...@gmail.com wrote: Hello! I can't understand how to populate data from a resultset object into datatable. Anyone have an example? Thank you! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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: Wicketstuff versions
Wicket stuff is a free-for-all with little documentation. I think 1.4.2-SNAPSHOT was accidentally left in the pom after one of the versioned builds (because that's what maven defaults to). But the idea is that wicketstuff-core modules should match Wicket - so 1.4-SNAPSHOT **should** be what it's set to right now. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Feb 11, 2010 at 6:54 AM, Charles Deal chuckdea...@gmail.com wrote: I'm a little confused about the versioning for Wicketstuff. I am currently using inmethod-grid, jquery, and yui. All three projects now have a 1.4-SNAPSHOT and a 1.4.2-SNAPSHOT version and (inmethod-grid and yui both have a 1.4.1 release version). What is the difference between the two SNAPSHOT versions? I tried searching on it and looking at the Wicketstuff Wiki, but could not find an explanation. Which should we be using?
Re: images not under the context root directory
Hi. I am facing the same problem: user upload images and I want to access from wicket. Of course, user resources are not going to stay under the webapp context. I would prefer also to put this images wherever I want in the file system, not under the container folder as well. I have taken some more decisions: 1. user upload in a user subfolder. So I have a main pictures folder and then pictures/user1, pictures/user2 and so on. 2. I do not want to use an external servlet or ask apache. Maybe there are good reason to to that, but I can just think at performance reasons. Too get images from a custom folder in wicket I found only one way: to subclass DynamiImagerResource. I override: protected byte[] getImageData() {} and there I can access any folder I want on my filesystem with standard java API. I would write almost the same code in a custom servlet. But with a servlet that serve and image if called, say, to: localhost:9090/myApp/pictures/user1/pic1 would expose an interface to directly access the image, while all resource access code stay in wicket so I have a security issue. This is also the reason I can't use the solution François Meillet expose, even if I find a very nice one if one does not have my privacy issue. My only problem now is that I can't figure out how to get a nice URL with DynamicWebResource but is the less important of all requirment. What is your opinion about that? What are potential problems in using DynamicImageResource to serve an image that is not dynamic, is just stored in a user related folder? -- Daniele Dellafiore http://danieledellafiore.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
add form components via ajax
I'm trying to add form components to a form using ajax. i've set setMarkupId(true); on the form but when I run it, i get an error saying cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = realTimeForm... So basically when someone moves 1 or more selections from the available to the selected side of the palette, i want it to add another palette to the form. Code Snippet: List valueList = new ArrayList(); // this actually has values IChoiceRenderer renderer = new ChoiceRenderer(); Palette palette = new Palette(palette, new Model(new ArrayList()), new Model(valueList), renderer, 5, false){ @Override protected Recorder newRecorderComponent() { Recorder rec = super.newRecorderComponent(); rec.setRequired(true); rec.add(new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { Palette newPalette = new Palette(newPalette,new Model(new ArrayList()),new Model(new ArrayList()),renderer,5,false); target.addComponent(newPalette); } }); return rec; } }; public Constructor(){ Form form = new Form(realTimeForm); form.setOutputMarkupId(true); //enable ajax on the form form.add(palette); add(form); } myhosting.com - Premium Microsoft® Windows® and Linux web and application hosting - http://link.myhosting.com/myhosting - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TextArea in repeater doesn't update it's model
you need to use a submit link if you want the values to be submitted back to the server -igor 2010/2/11 Rubén khanser khan...@gmail.com: I have an AjaxFallBackLink that executes an update in a service, but i need the textArea of the same row to be updated. I have wasted all morning but i can't still make it work. I reached this point: DataView dv = new DataView(dataView,ldp) { private static final long serialVersionUID = -3315693391867601086L; @Override protected void populateItem(Item arg0) { Label pagina; final Label codi; final TextArea valor; AjaxFallbackLink link; final StringBuffer vBuffer = new StringBuffer(); final AccTextosWrapper tWrapper = (AccTextosWrapper)arg0.getModelObject(); pagina = new Label(pagina, tWrapper.getPagina()); codi = new Label(codi,tWrapper.getCodi()); codi.setOutputMarkupId(true); valor = new TextArea(valor, new PropertyModel(tWrapper,descripcio)); valor.add(new AjaxEventBehavior(onblur) { �...@override protected void onEvent(AjaxRequestTarget arg0) { String val = valor.getModelObjectAsString(); vBuffer.delete(0, vBuffer.length()); vBuffer.append((val == null)?:val); } }); valor.setOutputMarkupId(true); link = new AjaxFallbackLink(link) { private static final long serialVersionUID = 3439293533625966929L; @Override public void onClick(AjaxRequestTarget arg0) { String c = codi.getModelObjectAsString(); adminService.updateTextDescripcio(c,vBuffer.toString()); } }; link.setOutputMarkupId(true); arg0.add(pagina); arg0.add(codi); arg0.add(valor); arg0.add(link); } }; If i don't use validate() and updateModel() i get the same string i had at the start otherwise i get null. All works fine but the TextArea model. Thank you very much for your help - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: expecting different behavior from form validation - potential bug?
please create a quickstart and attach it to jira -igor On Thu, Feb 11, 2010 at 6:53 AM, Antoine van Wel antoine.van@gmail.com wrote: hi, In a nested form the onValidate() is overridden. It sets an error message on a component inside this form - so not on the form itself. However the submit on the form itself is executed as if no error exists. What I see when debugging is that hasErrorMessages on the inside nested form returns false. Is this correct? Should I explicitly set an error on the form, or something else to indicate the form itself has an error? ..using 1.4.6 Antoine. - 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: TextArea in repeater doesn't update it's model
Then should I use nestedforms better than this? 2010/2/11 Igor Vaynberg igor.vaynb...@gmail.com you need to use a submit link if you want the values to be submitted back to the server -igor 2010/2/11 Rubén khanser khan...@gmail.com: I have an AjaxFallBackLink that executes an update in a service, but i need the textArea of the same row to be updated. I have wasted all morning but i can't still make it work. I reached this point: DataView dv = new DataView(dataView,ldp) { private static final long serialVersionUID = -3315693391867601086L; @Override protected void populateItem(Item arg0) { Label pagina; final Label codi; final TextArea valor; AjaxFallbackLink link; final StringBuffer vBuffer = new StringBuffer(); final AccTextosWrapper tWrapper = (AccTextosWrapper)arg0.getModelObject(); pagina = new Label(pagina, tWrapper.getPagina()); codi = new Label(codi,tWrapper.getCodi()); codi.setOutputMarkupId(true); valor = new TextArea(valor, new PropertyModel(tWrapper,descripcio)); valor.add(new AjaxEventBehavior(onblur) { @Override protected void onEvent(AjaxRequestTarget arg0) { String val = valor.getModelObjectAsString(); vBuffer.delete(0, vBuffer.length()); vBuffer.append((val == null)?:val); } }); valor.setOutputMarkupId(true); link = new AjaxFallbackLink(link) { private static final long serialVersionUID = 3439293533625966929L; @Override public void onClick(AjaxRequestTarget arg0) { String c = codi.getModelObjectAsString(); adminService.updateTextDescripcio(c,vBuffer.toString()); } }; link.setOutputMarkupId(true); arg0.add(pagina); arg0.add(codi); arg0.add(valor); arg0.add(link); } }; If i don't use validate() and updateModel() i get the same string i had at the start otherwise i get null. All works fine but the TextArea model. Thank you very much for your help - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Hook Before Form Validation on a Button
For form submission I can override onSubmit to do my own processing, but is there anything I can override that happens BEFORE the form validation? I need to for example, based on which Button they press, .setRequired(false) on some components before the form processing kicks in. I tried @Override validate() to temporarily do nothing, but the form validation still kicks in. And validateValidators() is final so can't be overwritten. Any ideas?
Re: TextArea in repeater doesn't update it's model
it has nothing to do with nested forms. regular links do not submit forms, that is how html works. you can either use a button or a submitlink. -igor 2010/2/11 Rubén khanser khan...@gmail.com: Then should I use nestedforms better than this? 2010/2/11 Igor Vaynberg igor.vaynb...@gmail.com you need to use a submit link if you want the values to be submitted back to the server -igor 2010/2/11 Rubén khanser khan...@gmail.com: I have an AjaxFallBackLink that executes an update in a service, but i need the textArea of the same row to be updated. I have wasted all morning but i can't still make it work. I reached this point: DataView dv = new DataView(dataView,ldp) { private static final long serialVersionUID = -3315693391867601086L; @Override protected void populateItem(Item arg0) { Label pagina; final Label codi; final TextArea valor; AjaxFallbackLink link; final StringBuffer vBuffer = new StringBuffer(); final AccTextosWrapper tWrapper = (AccTextosWrapper)arg0.getModelObject(); pagina = new Label(pagina, tWrapper.getPagina()); codi = new Label(codi,tWrapper.getCodi()); codi.setOutputMarkupId(true); valor = new TextArea(valor, new PropertyModel(tWrapper,descripcio)); valor.add(new AjaxEventBehavior(onblur) { �...@override protected void onEvent(AjaxRequestTarget arg0) { String val = valor.getModelObjectAsString(); vBuffer.delete(0, vBuffer.length()); vBuffer.append((val == null)?:val); } }); valor.setOutputMarkupId(true); link = new AjaxFallbackLink(link) { private static final long serialVersionUID = 3439293533625966929L; @Override public void onClick(AjaxRequestTarget arg0) { String c = codi.getModelObjectAsString(); adminService.updateTextDescripcio(c,vBuffer.toString()); } }; link.setOutputMarkupId(true); arg0.add(pagina); arg0.add(codi); arg0.add(valor); arg0.add(link); } }; If i don't use validate() and updateModel() i get the same string i had at the start otherwise i get null. All works fine but the TextArea model. Thank you very much for your help - 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: Hook Before Form Validation on a Button
make your button setusedefaultformprocessing(false) and trigger validation of the form yourself. -igor On Thu, Feb 11, 2010 at 10:28 AM, Tony Wu e90t...@gmail.com wrote: For form submission I can override onSubmit to do my own processing, but is there anything I can override that happens BEFORE the form validation? I need to for example, based on which Button they press, .setRequired(false) on some components before the form processing kicks in. I tried @Override validate() to temporarily do nothing, but the form validation still kicks in. And validateValidators() is final so can't be overwritten. Any ideas? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
quickstart POM has wrong artifactId for jetty maven plugin
I'm using the quickstart maven command generated by http://wicket.apache.org/quickstart.html, and then running 'mvn eclipse:eclipse -DdownloadSources=true'. I have the wicket version set to 1.4.5. The build fails: Unable to find resource 'org.mortbay.jetty:maven-jetty-plugin:maven-plugin:7.0.0.pre5'. Consulting my local .m2 repository, I figured out that the artifactId is 'jetty-maven-plugin'; the quickstart pom says 'maven-jetty-plugin', and I had to change it manually in the POM to make it build successfully. RUSSELL E. MORRISEY Programmer Analyst Professional Mission Solutions Engineering, LLC | p: 856.252.5084 | f: 856.778.7342 | russell.morri...@missionse.com | www.missionse.comhttp://www.missionse.com/ 304 West Route 38, Moorestown, NJ 08057 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
AjaxCallThrottlingDecorator breaks the precondition of AjaxFormSubmitBehavior
I ran into a problem with wicket's ajax call throttling in wicket 1.4.5. It seems like the AjaxFormSubmitBehavior's precondition script isn't working the way it's intended when a throttling call decorator is supplied. It's causing a one-off side effect problem in my application in IE7. I created a JIRA issue, with a quickstart to demonstrate the bug in FireFox (where the symptoms of the problem are easier to understand and debug), and a suggestion on what I think the fix should be. https://issues.apache.org/jira/browse/WICKET-2739 RUSSELL E. MORRISEY Programmer Analyst Professional Mission Solutions Engineering, LLC | russell.morri...@missionse.com | www.missionse.comhttp://www.missionse.com/ 304 West Route 38, Moorestown, NJ 08057 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
Resource authorisation scenario: dealing with non-application wide permissions
Hi. Imagine this scenario: a webapp that allows creation of groups of people. There is the owner, the administrator and the normal user for every group. Like google groups, yahoo groups, facebook groups, a chat... a lot of examples :) If we define permission as string concatenation, I can have group:delete as permission. In this scenario the permission is not application wide, but group specific. Is related to the entity of my domain: Group. Unfortunately I have no idea how to solve my problem in AuthStrategy, where I can just access the user, not his particular Role in the specific group of my webapp, I do not have enough information. I can't know in isActionAuthorized method what is the group to ask authorization access for group.delete permission. If I know which is the group (domain entity) I can ask the user for the role he has in the group, and see if it's role has group.delete permission. Or any similar implementation, the point is that I miss an information. What can be a nice way to solve this problem with Wicket AuthorizationStrategy? I have just read a recent article about how to integrate shiro and wicket: http://blog.tauren.com/2010/01/using-wicket-with-shiro-for.html My point with that solution is that as far as I know, overriding isVisible() is a discouraged practice. More over, the visibility control for authorisation access has better room in the AuthorizationStrategy and if I remember fine, what change is the isVisibilityAllowed(). I can just figure out to to put that information (the role of the subject in the group) in the Action, but I have to learn how. Do you think should be a nice idea? Or maybe I am making my life harder for nothing and setting visibilityAllowed (or even override that method) would be fine enough? I think I can save a lot of ifs or a lot of override if I Can figure out a way to implement it the way I described. I will sleep on this :) -- Daniele Dellafiore http://danieledellafiore.net
Re: Resource authorisation scenario: dealing with non-application wide permissions
your components are the ones that carry context, so... boolean isActionAuthorized(Component component, Action action) { if (component instanceof GroupAware) { Group group=((GroupAware)component).getGroup(); ... -igor On Thu, Feb 11, 2010 at 5:50 PM, Daniele Dellafiore ilde...@gmail.com wrote: Hi. Imagine this scenario: a webapp that allows creation of groups of people. There is the owner, the administrator and the normal user for every group. Like google groups, yahoo groups, facebook groups, a chat... a lot of examples :) If we define permission as string concatenation, I can have group:delete as permission. In this scenario the permission is not application wide, but group specific. Is related to the entity of my domain: Group. Unfortunately I have no idea how to solve my problem in AuthStrategy, where I can just access the user, not his particular Role in the specific group of my webapp, I do not have enough information. I can't know in isActionAuthorized method what is the group to ask authorization access for group.delete permission. If I know which is the group (domain entity) I can ask the user for the role he has in the group, and see if it's role has group.delete permission. Or any similar implementation, the point is that I miss an information. What can be a nice way to solve this problem with Wicket AuthorizationStrategy? I have just read a recent article about how to integrate shiro and wicket: http://blog.tauren.com/2010/01/using-wicket-with-shiro-for.html My point with that solution is that as far as I know, overriding isVisible() is a discouraged practice. More over, the visibility control for authorisation access has better room in the AuthorizationStrategy and if I remember fine, what change is the isVisibilityAllowed(). I can just figure out to to put that information (the role of the subject in the group) in the Action, but I have to learn how. Do you think should be a nice idea? Or maybe I am making my life harder for nothing and setting visibilityAllowed (or even override that method) would be fine enough? I think I can save a lot of ifs or a lot of override if I Can figure out a way to implement it the way I described. I will sleep on this :) -- Daniele Dellafiore http://danieledellafiore.net - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: expecting different behavior from form validation - potential bug?
Antoine, I think this was discussed 3 days ago in the thread titled Form#anyComponentError change in 1.4 breaks validation (Russel Morrisey), basically noting that in a recent release of Wicket, the form onError behavior was changed to checking for errors on ANY component in the form, to just Form-based components. Related JIRA Issues: http://issues.apache.org/jira/browse/WICKET-2202 http://issues.apache.org/jira/browse/WICKET-2026 And eventually this issue created: https://issues.apache.org/jira/browse/WICKET-2734 Hope that helps incase you wanted to jump in on any of that. -R On Thu, Feb 11, 2010 at 10:02 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: please create a quickstart and attach it to jira -igor On Thu, Feb 11, 2010 at 6:53 AM, Antoine van Wel antoine.van@gmail.com wrote: hi, In a nested form the onValidate() is overridden. It sets an error message on a component inside this form - so not on the form itself. However the submit on the form itself is executed as if no error exists. What I see when debugging is that hasErrorMessages on the inside nested form returns false. Is this correct? Should I explicitly set an error on the form, or something else to indicate the form itself has an error? ..using 1.4.6 Antoine. - 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: add form components via ajax
setMarkupId(true) is used to ensure there is a placeholder generated in the HTML where the addition of the div (or whatever) will take place. You don't set this typically on the form itself, but on a placeholder inside the form that you probably replace with a MarkupContainer of some kind with the same name that contained the new form elements that you wanted to inject. On Thu, Feb 11, 2010 at 9:56 AM, wic...@geofflancaster.com wic...@geofflancaster.com wrote: I'm trying to add form components to a form using ajax. i've set setMarkupId(true); on the form but when I run it, i get an error saying cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = realTimeForm... So basically when someone moves 1 or more selections from the available to the selected side of the palette, i want it to add another palette to the form. Code Snippet: List valueList = new ArrayList(); // this actually has values IChoiceRenderer renderer = new ChoiceRenderer(); Palette palette = new Palette(palette, new Model(new ArrayList()), new Model(valueList), renderer, 5, false){ �...@override protected Recorder newRecorderComponent() { Recorder rec = super.newRecorderComponent(); rec.setRequired(true); rec.add(new AjaxFormComponentUpdatingBehavior(onchange) { �...@override protected void onUpdate(AjaxRequestTarget target) { Palette newPalette = new Palette(newPalette,new Model(new ArrayList()),new Model(new ArrayList()),renderer,5,false); target.addComponent(newPalette); } }); return rec; } }; public Constructor(){ Form form = new Form(realTimeForm); form.setOutputMarkupId(true); //enable ajax on the form form.add(palette); add(form); } myhosting.com - Premium Microsoft® Windows® and Linux web and application hosting - http://link.myhosting.com/myhosting - 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