Re: Seam Wicket integration and conversation scope
conversation scope is slightly different, for long running hibernate sessions it is an equivalent of doing: class conversationpage extends webpage { private org.hibernate.Session session; public conversationpage(Session session) { this.session=session; } protected Session getSession() { if (!session.isconnected()) { session.reconnect(); } return session; } protected void ondetach() { session.disconnect(); } } so in this case the conversation would be propogated so: setresponsepage(new edituserstep2page(getsession(), usermodel)); -igor On Sat, Mar 22, 2008 at 6:13 PM, brian.diekelman <[EMAIL PROTECTED]> wrote: > > I have only read up on Seam a few times, so help me out where I'm > incorrect... > > As far as I can tell Seam uses the conversation scope as a step between > request scope and session scope to persist values across a couple of > requests, for instance a user creation wizard, etc. > > I don't know what integration they've enabled or how it works, but passing > an object between requests is simple and straight forward in wicket. Say > that you want to pass a user object (or any other combination of objects) > from one page to another when the user clicks a link: > > public class SimplePage extends WebPage > { > public SimplePage(final User user) > { > add(new Link("link") > { > public void onClick() > { > setResponsePage(new SomeOtherPage(user)); > } > } > } > } > > You would pass it directly by reference. Like I said, I don't know how Seam > is integrating, but when you're using Wicket you don't really have a need > for something like a conversation scope. You can use whatever granularity > you'd like to pass objects between pages, not necessarily bound to any > particular scope. > > Please let me know if I'm just completely missing your point here. > > -- > View this message in context: > http://www.nabble.com/Seam-Wicket-integration-and-conversation-scope-tp16228793p16230158.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Seam Wicket integration and conversation scope
I have only read up on Seam a few times, so help me out where I'm incorrect... As far as I can tell Seam uses the conversation scope as a step between request scope and session scope to persist values across a couple of requests, for instance a user creation wizard, etc. I don't know what integration they've enabled or how it works, but passing an object between requests is simple and straight forward in wicket. Say that you want to pass a user object (or any other combination of objects) from one page to another when the user clicks a link: public class SimplePage extends WebPage { public SimplePage(final User user) { add(new Link("link") { public void onClick() { setResponsePage(new SomeOtherPage(user)); } } } } You would pass it directly by reference. Like I said, I don't know how Seam is integrating, but when you're using Wicket you don't really have a need for something like a conversation scope. You can use whatever granularity you'd like to pass objects between pages, not necessarily bound to any particular scope. Please let me know if I'm just completely missing your point here. -- View this message in context: http://www.nabble.com/Seam-Wicket-integration-and-conversation-scope-tp16228793p16230158.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generated IDs in deployment vs. development modes
I'll add two more approaches to that list: 1) Don't associate a wicket component with any html element whose id you need 2) Learn to use other attributes besides id (and praise the prototype developers for their DOM traversal API) ;) Thanks, Zach igor.vaynberg wrote: > > there are plenty of threads about this on the list if you are > interested. the gist of the thing is that wicket changes id so that it > can guarantee their uniquness since components are self contained and > isolated. there are a two basic ways to deal with this: call > setmarkupid(string) for components you want to control the id for, or > get the id with getmarkupid() and pass that to js code. > > -igor > > > On Sat, Mar 22, 2008 at 5:13 PM, Zach Cox <[EMAIL PROTECTED]> wrote: >> I've been running our app in development mode for quite a while now >> and noticed that Wicket likes to append digits to the end of id >> attributes specified in the html templates. I just switched to >> deployment mode and now Wicket is completely changing the id >> attributes. I'm using Prototype to do some JavaScript stuff, and >> while I could work around this id-changing in development mode, my >> entire app is broken in deployment mode. >> >> Is there any way to tell Wicket to use the development mode >> id-changing behavior in deployment mode? Better yet, is there a way >> to tell Wicket to leave the id attributes specified in html templates >> alone altogether? >> >> Thanks, >> Zach >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Generated-IDs-in-deployment-vs.-development-modes-tp16229462p16229975.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generated IDs in deployment vs. development modes
there are plenty of threads about this on the list if you are interested. the gist of the thing is that wicket changes id so that it can guarantee their uniquness since components are self contained and isolated. there are a two basic ways to deal with this: call setmarkupid(string) for components you want to control the id for, or get the id with getmarkupid() and pass that to js code. -igor On Sat, Mar 22, 2008 at 5:13 PM, Zach Cox <[EMAIL PROTECTED]> wrote: > I've been running our app in development mode for quite a while now > and noticed that Wicket likes to append digits to the end of id > attributes specified in the html templates. I just switched to > deployment mode and now Wicket is completely changing the id > attributes. I'm using Prototype to do some JavaScript stuff, and > while I could work around this id-changing in development mode, my > entire app is broken in deployment mode. > > Is there any way to tell Wicket to use the development mode > id-changing behavior in deployment mode? Better yet, is there a way > to tell Wicket to leave the id attributes specified in html templates > alone altogether? > > Thanks, > Zach > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Generated IDs in deployment vs. development modes
I've been running our app in development mode for quite a while now and noticed that Wicket likes to append digits to the end of id attributes specified in the html templates. I just switched to deployment mode and now Wicket is completely changing the id attributes. I'm using Prototype to do some JavaScript stuff, and while I could work around this id-changing in development mode, my entire app is broken in deployment mode. Is there any way to tell Wicket to use the development mode id-changing behavior in deployment mode? Better yet, is there a way to tell Wicket to leave the id attributes specified in html templates alone altogether? Thanks, Zach - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with clearing of filter form
dcastannon schrieb: Clear button of FilterForm is set as defaultFormProcessing false by default. Change it to true. This seems to solve my problem. Thanks a lot. Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Seam Wicket integration and conversation scope
I'm playing with the latest Seam release (2.1.0.A1) containing a really interesting integration of Apache Wicket. The current implementation appear to be really promising and I hope it will improved in next release. One of the most interesting feature already implemented is the conversation scope that enables conversation-scoped persistent context. I've noticed that the conversation between different wicket pages is maintained only navigating by a form submit action BUT it doesn't when moving between pages using other components i.e. Link, AjaxLink, Button, AjaxBehavior .. and so on. This makes it useless, in particular with Ajax interactions where it is expected to have the maximum benefits (no more LazyInitializationException .. ). Is this a know issue? It is planned in next release to maintained the conversation between Wicket pages navigating by Link and AjaxBehavior also? Thank you, // Paolo
Re: Wicket in Action - 1.4 pending release
On Sat, 2008-03-22 at 16:01 -0700, Ned Collyer wrote: > Hi, > > I'm just curious if the move to 1.4 will have an impact on Wicket in Action. > > It would be great if when it's released in paper form, that examples match > the current version version of wicket. I can imagine it would be a huge > effort to update it :( You must want Martijn or Eelco to really hurt you huh? ;) I just want to congratulate them on all the hard work thus far... ./C - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket in Action - 1.4 pending release
Hi, I'm just curious if the move to 1.4 will have an impact on Wicket in Action. It would be great if when it's released in paper form, that examples match the current version version of wicket. I can imagine it would be a huge effort to update it :( -- View this message in context: http://www.nabble.com/Wicket-in-Action---1.4-pending-release-tp16228144p16228144.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multipart-form with nested ajaxform throws exception in 1.3.1
it's fixed for 1.3.3 see https://issues.apache.org/jira/browse/WICKET-1442 Gerolf On Wed, Mar 12, 2008 at 11:14 PM, albert.brand <[EMAIL PROTECTED]> wrote: > > > > Michael Sparer wrote: > > > > I have a multipart-enabled form, inside this form there is a nested form > > with ajaxsubmitbehavior. to submit the nested form I'm using an > AjaxButton > > (as the "normal" button doesn't submit the form via ajax - contrary to > its > > behaviour if not used as nested form) > > > > all releases including 1.3.0 supported the submitting of the innerform > and > > sent all of the nested form's fields to the server and came back in a > neat > > ajax response. > > In 1.3.1 however the Exception "java.lang.IllegalStateException: > > ServletRequest does not contain multipart content" gets thrown. That > > indicates that the surrounding multipart form was submitted instead of > > just the nested form (and as multipart and ajax aren't close friends the > > exception gets thrown) > > > > isn't that supposed to work or is it, again, a hidden feature I was > using? > > :-) > > > > regards, > > Michael > > > > I've been bitten by this bug too. I haven't looked into the problem, > perhaps > it's an idea to open a ticket? > -- > View this message in context: > http://www.nabble.com/Multipart-form-with-nested-ajaxform-throws-exception-in-1.3.1-tp15975693p16013787.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Localization of DropDownChoice
On Sat, 22 Mar 2008, greeklinux wrote: > But I get a runtime exception. Because the expression "key" cannot be > applied on the class that is backing > my formModel. I thought that the "key" is applied on the List SelectChoise > class. > > Can someone give me a hint? A more complete or more reproducible source code bit and stack trace might be helpful, but just judging from your post I would try replacing the CompoundPropertyModel with more explicit models. For me, the CompoundPropertyModel magic turns black in all but the simplest of cases. And if you end up in a situation that you can rewrite cleaner with CPM, it tends to be apparent as well. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with clearing of filter form
Clear button of FilterForm is set as defaultFormProcessing false by default. Change it to true. Kai Mütz wrote: > > 2008/3/19, Martin Makundi <[EMAIL PROTECTED]>: >> >> Can you show any binding code related to your case? >> >> DocumentDataProvider dataProvider = new > DocumentDataProvider(documentService); > DefaultDataTable documentTable = new DefaultDataTable("document-table", > createColumns(), dataProvider, 10); > final FilterForm form = new FilterForm("filter-form", dataProvider) { > private static final long serialVersionUID = 1L; > > @Override > protected void onSubmit() { > documentTable.setCurrentPage(0); > } > }; > documentTable.addTopToolbar(new FilterToolbar(documentTable, form, > dataProvider)); > form.add(documentTable); > > private List createColumns() { > List columns = new ArrayList(); > columns.add(new TextFilteredPropertyColumn( > new ResourceModel("field.document.name"), "name", "name") { > public void populateItem(final Item cellItem, > final String componentId, final IModel docModel) { > cellItem.add(new EditDocumentNamePanel(componentId, > docModel)); > } > }); > columns.add(new TextFilteredPropertyColumn( > new ResourceModel("field.document.path"), "path", "path")); > columns.add(new ChoiceFilteredPropertyColumn( > new ResourceModel("field.document.mimetype"), "mimetype", > "mimetype", > new LoadableDetachableModel() { > @Override > protected Object load() { > List mimeTypes = documentService.getMimeTypes(); > mimeTypes.add(0, null); > return mimeTypes; > } > } > )); > columns.add(new FilteredAbstractColumn( > new ResourceModel("form.common.filter")) { > public Component getFilter(final String id, final FilterForm form) > { > return new GoAndClearFilter(id, form); > } > public void populateItem(final Item cellItem, > final String componentId, final IModel docModel) { > cellItem.add(new DocumentActionPanel(componentId, docModel)); > } > }); > return columns; > } > > > Markup: > > > > > [call to focus restore > script] > > > > Very similar to the phonebook example. > > Kai > > -- View this message in context: http://www.nabble.com/Problems-with-clearing-of-filter-form-tp16098239p16226893.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Localization of DropDownChoice
Hello, I want to localize a DropDownChoice component. I read the examples http://www.wicket-library.com/wicket-examples/compref/ and http://cwiki.apache.org/WICKET/dropdownchoice-examples.html. The displayed option value is a localized string and the value is a key that will be stored in DB. Now I want to get the value of a selected option and store this in a form CompoundPropertyModel. The Object backing the model will be stored in DB. -code private SelectChoise[] myList = { new SelectChoise("alglg", new ResourceModel("list.alglg")), new SelectChoise("algmd", new ResourceModel("list.algmd")) } DropDownChoice listInput = new DropDownChoice("listInput", formModel, Arrays.asList(myList), new ChoiceRenderer("value", "key")); -- But I get a runtime exception. Because the expression "key" cannot be applied on the class that is backing my formModel. I thought that the "key" is applied on the List SelectChoise class. Can someone give me a hint? Thanks a lot -- View this message in context: http://www.nabble.com/Localization-of-DropDownChoice-tp16224334p16224334.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Picnik components
Hi Ruediger, Rüdiger_Schulz wrote: > > I'm sure some of you heard about picnik.com, this awesome online image > editor. As I'm in the process of integrating this in my website via their > API, I wanted to implement this as a collection of reusable Wicket > components. Has anyone already started with this? If not - I'm going to, > and > I'd be very happy to release this under Apache License 2.0, e.g. as a > wicketstuff project. > I'm very interested in such components, so when you have something to look at, I would be happy to give it a try ... ...roland -- View this message in context: http://www.nabble.com/Picnik-components-tp16218381p16221631.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vote] Release 1.4 with only generics and stop support for 1.3
Time to call this vote... This thread has collected according to my best calculations the following statistics: -1 : 2 -0 : 1 +1 : 6 non-votes in 100 messages : 100 - 6 - 2 - 1 = 91 I think we can safely say that with the next release Wicket will finally be Java 5 based, will be generics only and that we will drop support for 1.3 shortly. The release after the generics release will include all the other stuff we want to do. We will start the discussion on how to proceed with the planning, branching and stuff on the dev@ list. If you have to stay on Java 1.4 for a while, please join the dev@ list and share your concerns, reasons why you can't move to Java 5 and we will see how our planning will affect your framework use. Thank you all for voting! Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to display modal windows
it was here. got it fixed though. i had a relative path that somehow stopped working in this version of wicket... anyway, fixed, so who cares? :) thanks. On Sat, Mar 22, 2008 at 11:46 AM, Johan Compagner <[EMAIL PROTECTED]> wrote: > where does this come from: > > http://localhost:9080/theworld/javascript/modal.js > > modal.js shouldn't be in there i think? Or did you extract it somehow? > > On Thu, Mar 20, 2008 at 12:18 PM, Cristi Manole <[EMAIL PROTECTED]> > wrote: > > > Hello, > > > > I just upgraded to 1.3.2 from 1.3.1. > > > > Also, i don't know if it makes a difference, spring from 2.0.6 to 2.5.2. > > > > Now, when i try to display a modal window just like I used to, it fails. > > > > All the code I modified is for the constructor of the authwebsess which > > got > > depricated > >public TheWorldWebSession(final AuthenticatedWebApplication > > application, > > Request request) { > > *super(request); //instead of super(application, request)* > >InjectorHolder.getInjector().inject(this); //don't get spring by > > default in sessions... > >} > > > > These are some strange warnings I get (didn't get them before) : > > > > WARN - AbstractTextComponent - Couldn't resolve model type of > > Model:classname=[org.apache.wicket.model.PropertyModel > > ]:nestedModel=[]:expression=[owner] > > for [MarkupContainer [Component id = owner, page = > > com.smd.mymedia.MyMediaMainPage, path = 1:mymediaPanel:searchForm: > > owner.MyMediaPanel$MyMediaPanelSearchForm$1, isVisible = true, > isVersioned > > = > > false]], please set the type yourself. > > WARN - AbstractTextComponent - Couldn't resolve model type of > > Model:classname=[org.apache.wicket.model.PropertyModel > > ]:nestedModel=[]:expression=[name] > > for [MarkupContainer [Component id = name, page = > > com.smd.mymedia.MyMediaMainPage, path = 1:mymediaPanel:searchForm: > > name.MyMediaPanel$MyMediaPanelSearchForm$2, isVisible = true, > isVersioned > > = > > false]], please set the type yourself. > > (etc) > > > > This is what I get in the ajax window : > > > > > > *INFO: *focus set on addnew115 > > *INFO: * > > *INFO: * > > Initiating Ajax GET request on > > > > > ../?wicket:interface=:1:mymediaPanel:addnew1::IBehaviorListener:0:1&random= > > 0.5540758623808608 > > *INFO: *Invoking pre-call handler(s)... > > *INFO: *Received ajax response (5403 characters) > > *INFO: * > > > " encoding="UTF-8"?> > encoding="wicket1" >
Picnik components
Hello everybody, I'm sure some of you heard about picnik.com, this awesome online image editor. As I'm in the process of integrating this in my website via their API, I wanted to implement this as a collection of reusable Wicket components. Has anyone already started with this? If not - I'm going to, and I'd be very happy to release this under Apache License 2.0, e.g. as a wicketstuff project. -- greetings from Berlin, Rüdiger Schulz www.2rue.de www.indyphone.de - Coole Handy Logos einfach selber bauen
Re: Unable to display modal windows
where does this come from: http://localhost:9080/theworld/javascript/modal.js modal.js shouldn't be in there i think? Or did you extract it somehow? On Thu, Mar 20, 2008 at 12:18 PM, Cristi Manole <[EMAIL PROTECTED]> wrote: > Hello, > > I just upgraded to 1.3.2 from 1.3.1. > > Also, i don't know if it makes a difference, spring from 2.0.6 to 2.5.2. > > Now, when i try to display a modal window just like I used to, it fails. > > All the code I modified is for the constructor of the authwebsess which > got > depricated >public TheWorldWebSession(final AuthenticatedWebApplication > application, > Request request) { > *super(request); //instead of super(application, request)* >InjectorHolder.getInjector().inject(this); //don't get spring by > default in sessions... >} > > These are some strange warnings I get (didn't get them before) : > > WARN - AbstractTextComponent - Couldn't resolve model type of > Model:classname=[org.apache.wicket.model.PropertyModel > ]:nestedModel=[]:expression=[owner] > for [MarkupContainer [Component id = owner, page = > com.smd.mymedia.MyMediaMainPage, path = 1:mymediaPanel:searchForm: > owner.MyMediaPanel$MyMediaPanelSearchForm$1, isVisible = true, isVersioned > = > false]], please set the type yourself. > WARN - AbstractTextComponent - Couldn't resolve model type of > Model:classname=[org.apache.wicket.model.PropertyModel > ]:nestedModel=[]:expression=[name] > for [MarkupContainer [Component id = name, page = > com.smd.mymedia.MyMediaMainPage, path = 1:mymediaPanel:searchForm: > name.MyMediaPanel$MyMediaPanelSearchForm$2, isVisible = true, isVersioned > = > false]], please set the type yourself. > (etc) > > This is what I get in the ajax window : > > > *INFO: *focus set on addnew115 > *INFO: * > *INFO: * > Initiating Ajax GET request on > > ../?wicket:interface=:1:mymediaPanel:addnew1::IBehaviorListener:0:1&random= > 0.5540758623808608 > *INFO: *Invoking pre-call handler(s)... > *INFO: *Received ajax response (5403 characters) > *INFO: * > " encoding="UTF-8"?> encoding="wicket1" >
Re: Dubble redirect?
throw RestartAtResponsePage() On Fri, Mar 21, 2008 at 8:12 AM, Martijn Lindhout <[EMAIL PROTECTED]> wrote: > Hi all, > > I use auth-roles and when somebody hits a secured page, he gets redirected > to the loginpage. When login succeeds, the user is redirected back to the > original page. > Now comes the problem: in the constructor of the original page, I want to > check the role or username of the user and redirect to another page, but > then Wicket complains about that it already is redirecting. I used > setReponsePage, RequestCycle.redirect, etc... > > How do I fix this? > > > > -- > Martijn Lindhout > JointEffort IT Services > http://www.jointeffort.nl > [EMAIL PROTECTED] > +31 (0)6 18 47 25 29 >