Re: field values
Hi, On Thu, Apr 5, 2012 at 9:01 PM, mnish tosh wrote: > Hi, > > This is the situation: > > I have a page with two tabs, on each of these tabs there are form fields. > Some of the fields are the same on both the tabs. What I want to be able to > do is when I click on the tabs back and forth the values of the fields be > automatically taken to the other tab. Is this possible to do in wicket or > is it too much to ask :). Share the same model/model object for those form components. > > Thank you. -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDownChoice - filtering and pagination
On Thu, Apr 5, 2012 at 4:32 PM, Michal Wegrzyn wrote: > Hi, > > What is the best way to create option components with Wicket for large > datasets? > DropDownChoice renders all contained items. Do you maybe know any wicket > implementation of drop down choice which allows pagination? > > Other thing is filtering. I look for something similar to Dojo's > FilteringSelect: http://livedocs.dojotoolkit.org/dijit/form/FilteringSelect Igor is working on http://ivaynberg.github.com/select2. He said that soon he will create a Wicket component for it. I guess he wont mind github Pull requests. > > Best regards, > Michal Wegrzyn > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Session existence not working
Fire the debugger and see what happens. On Fri, Apr 6, 2012 at 11:26 AM, kshitiz wrote: > I am able to solve my problem by checking whether session object is pointing > to null or not but i am not able to understand why session.exists() is not > able to verify session existence if I am using session.invalidate() during > logout??. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Session-existence-not-working-tp4536914p4536994.html > Sent from the Users forum 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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: reloading of HTML and classes
On Sun, Apr 8, 2012 at 5:38 AM, Bernard wrote: > Hi, > > The HTML part is covered if your IDE copies HTML files to the > deployment directory when you save them. Wicket will then pick up this > change and reload the corresponding pages. This works for existing > markup but not for new markup that was missing. https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/wicketstuff-wicket7 provides an extension of Wicket's default ModificationWatcher that uses JDK7 NIO2 WatchService. This should help for this problem. > > The Java classes part can only be handled with debugging, JRebel or a > complete re-deployment. There is no hot-deployment of individual > classes in GlassFish (I don't know whether any other server supports > this). However GlassFish has session preservation so the re-deploy > process is seamless. To further speed up the deployment, one can copy > most libraries (including Wicket) into the GlassFish domain's lib dir > instead of copying them on every deployment. > > The "Deploy on Save" feature is only useful for mini applications - it > is too slow. > > Bernard > > > On Fri, 06 Apr 2012 16:48:11 +0200, you wrote: > >> >>I've been fighting this for the past two days, but I'm not succeeding. I'm >>using Wicket 1.5.5 on GlassFish 3.1.2 and that runs without a problem. I have >>configured >> >>org.apache.wicket.protocol.http.ReloadingWicketFilter >> >>to reload the classes, but that is not working. The only way to reload the >>class file is by using JRebel. >> >>Also Wicket reports that it runs in DEVELOPMENT mode, but it is not reloading >>the HTML files. In an attempting to resolve that I explicitely configured >> >> getResourceSettings().setDefaultCacheDuration(Duration.ONE_SECOND); >> >>but that does not make a difference. The only way I can get it to work >>somewhat, is to add my own ResourceFinder directly on the src folder: >> >> getResourceSettings().setResourceFinder(new IResourceFinder() >> { >> @Override >> public IResourceStream find(Class clazz, String pathname) >> { >> File f = new File("C:/Documents and Settings/User/My >> Documents/s2m/sources/components/service/src/main/java/" + pathname); >> if (f.exists()) >> { >> return new FileResourceStream( f ); >> } >> return null; >> } >> }); >> getResourceSettings().setUseDefaultOnMissingResource(true); >> >>But still the source are not reloaded reliably. I figure if the cache >>expires, a new call to the resource finder should be done, correct? >> >>Is there any debugging of these autoreload features, so I can see what Wicket >>is doing? >> >>Tom >> >> >> >> >> >>- >>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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and Menu support
On Sun, Apr 8, 2012 at 8:04 PM, Tom Eugelink wrote: > > Is there any documentation on this jquery support in wicket 6? I'm setting > up a new project ARM and instead of including all kinds of side kick > projects, core support is preferable. https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+6.0#MigrationtoWicket6.0-Ajax > > Tom > > > > > > On 2012-04-08 19:55, msalman wrote: >> >> Thanks to every one for all of your comments and suggestions. >> >> Great to know that wicket core will include jquery. >> >> Alle, I would appreciate very much if you can please share your code for >> using jquery tree. It would give me a good start. >> >> Thanks. >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Menu-support-tp4540516p4541287.html >> Sent from the Users forum 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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 markup id for a reused TextField is the same
On Tue, Apr 10, 2012 at 7:38 AM, Wilhelmsen Tor Iver wrote: >> In 1.4 version of wicket there was no impact, but in 1.5.5 the id is not >> overwritten by wicket. > > Presumably they changed it so that it would work as a markup equivalent to > setMarkupId(), though I haven't checked the changes list to verify that. :) Yes, this is a new feature in 1.5. > > - Tor Iver > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: How to embedded CheckBox in the DropDownChoice Options
> I want to embedded CheckBox in the DropDownChoice Options so that I can > select multi options in the page. Browsers render multiple-select controls differently, adding checkboxes to a DropDownChoice (single-select) makes no sense since the browser will be sending one value anyway. Look into using ListMultipleChoice or CheckBoxMultipleChoice when you need more than onle select value. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Wicket 1.5 markup id for a reused TextField is the same
> In 1.4 version of wicket there was no impact, but in 1.5.5 the id is not > overwritten by wicket. Presumably they changed it so that it would work as a markup equivalent to setMarkupId(), though I haven't checked the changes list to verify that. :) - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: a model for passing data between pages
You can get type safety and loose-coupling with o.a.w.Session's metadata support. This is our constructor for such a model: SessionMetaDataModel(T defaultObject, MetaDataKey key) The implementation just uses Session#setMetaData() and Session#getMetaData(). On Mon, Apr 9, 2012 at 5:34 PM, Carl-Eric Menzel wrote: > On Mon, 9 Apr 2012 16:23:38 -0700 (PDT) > armhold wrote: > > > SessionModel model = new SessionModel(MyDTO.KEY, new > > MyDTO()); > > > > Not typesafe, as you pointed out, but fairly concise. > > If you have a lot of different types where you use that, this map-like > approach is probably better, yes. > > > > Alternatively you might want to look at the wicket-seam integration > > > and use Seam conversations. > > > > Actually we started out using Wicket-CDI + Seam, expressly because of > > the conversation support, but ran into issues making it work on > > WebSphere... a topic for another day. :-) > > Heh. WebSphere, a fountain of constant joy :-) > > Carl-Eric > www.wicketbuch.de > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: a model for passing data between pages
On Mon, 9 Apr 2012 16:23:38 -0700 (PDT) armhold wrote: > SessionModel model = new SessionModel(MyDTO.KEY, new > MyDTO()); > > Not typesafe, as you pointed out, but fairly concise. If you have a lot of different types where you use that, this map-like approach is probably better, yes. > > Alternatively you might want to look at the wicket-seam integration > > and use Seam conversations. > > Actually we started out using Wicket-CDI + Seam, expressly because of > the conversation support, but ran into issues making it work on > WebSphere... a topic for another day. :-) Heh. WebSphere, a fountain of constant joy :-) Carl-Eric www.wicketbuch.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: a model for passing data between pages
Hi duesenklipper. > I'd rather use a custom Session subclass with typesafe getters and > setters: > class MySession extends WebSession { > private MyDTO dtoForFlow; > public MyDTO getDtoForFlow() { > return dtoForFlow; > } Typesafety via custom sessions is nice, but I think that would require custom model classes for each kind of DTO in order to reach into the session, like: public class MyDTOModel implements IModel { public MyDTO getObject() { return ((MySession) Session.get()).getDtoForFlow(); } public void setObject(MyDTO object) { ((MySession) Session.get()).setDtoForFlow(object); } // ... } vs: SessionModel model = new SessionModel(MyDTO.KEY, new MyDTO()); Not typesafe, as you pointed out, but fairly concise. > Alternatively you might want to look at the wicket-seam integration > and use Seam conversations. Actually we started out using Wicket-CDI + Seam, expressly because of the conversation support, but ran into issues making it work on WebSphere... a topic for another day. :-) Thanks for your help. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/a-model-for-passing-data-between-pages-tp4542878p4544145.html Sent from the Users forum 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: PageableListView without Ajax call
use PagingNavigator instead of AjaxPagingNavigator. -igor 2012/4/9 Andre Schütz : > Hello, > > I use the PageableListView with an AjaxPagingNavigator. The > PageableListView replaces the elements with an Ajax call. My > customer wants a complete page rebuild without the Ajax call > when a link is clicked in the AjaxPagingNavigator. > > Is it possible to use the PageableListView without this > Ajax replacement of the elements? > I disabled the Javascript in my browser and the PageableListView > works like my customer would exepct it. Can I overwrite any > function to stop the default Ajax replacement? > > Thanks in advance, > Andre > > -- > Andre Schütz > > - > 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
PageableListView without Ajax call
Hello, I use the PageableListView with an AjaxPagingNavigator. The PageableListView replaces the elements with an Ajax call. My customer wants a complete page rebuild without the Ajax call when a link is clicked in the AjaxPagingNavigator. Is it possible to use the PageableListView without this Ajax replacement of the elements? I disabled the Javascript in my browser and the PageableListView works like my customer would exepct it. Can I overwrite any function to stop the default Ajax replacement? Thanks in advance, Andre -- Andre Schütz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page Expired with Google Analytics Tracking Code
Hello, I tried your approach and could find one mistake in my code. After the stepwise adding of the components to my results page, I found an error in two of my classes that are used on that page. These two classes did not implement the Serializable interface. I added the interface to these two classes and the PageExpired error was gone. But there is still another error. My PageableListView does not display the results when I click on one of the links in the AjaxPagingNavigator. The first page is displayed but the other pages in the list are nearly empty. They are not completely empty. I have 3 elements in an item of the PageableListView populateItem Method that must be filled in the html page. The elements are title, description and time. My code looks as follows: /*** * Code */ private void displayResults(Vector results, int entriesPerPage) { WebMarkupContainer datacontainer = new WebMarkupContainer("listviewContainer"); datacontainer.setOutputMarkupId(true); add(datacontainer); PageableListView listview = new PageableListView("listview", results, entriesPerPage) { StringBuilder sb; @Override protected void populateItem(ListItem item) { if (item != null) { LoadableListingEntryModel model = (LoadableListingEntryModel)item.getModelObject(); DefaultSearchResult s = model.getObject().getResult(); String description = s.getDescription(); String title = s.getTitle(); item.add(new ExternalLink("title", title)); item.add(new Label("description", description)); item.add(new Label("time", s.getTime()).setEscapeModelStrings(false)); } } }; listview.setReuseItems(true); datacontainer.add(listview); AjaxPagingNavigator apn = new AjaxPagingNavigator("navigator", listview){ @Override protected void onAjaxEvent(AjaxRequestTarget target) { super.onAjaxEvent(target); target.appendJavaScript("scrollTo(0,0)"); } }; datacontainer.add(apn); datacontainer.setVersioned(false); } /*** * Code */ The LoadableListingEntryModel was one of the two classes that got the Serializable interface. When I click on one of the links of the AjaxPagingNavigator, the title and the description fields are emtpy. The time field is filled. I checked the items and have e.g. 60 items with title, description and time content. But only the time content is displayed, when I click on one of the AjaxPagingNavigator links. This error only occurs, if the Google Adsense Code is in the site. Could it be possible, that the Ajax call of the PageableListView has a problem? Thanks, Andre On Sat, 07 Apr 2012 21:46:53 +0200 Bas Gooren wrote: > Yes. > > Op 7-4-2012 20:37, schreef Andre Schütz: > > Thank you for the answer, I will try your 4 steps. > > > > Just as information. When you say, that I can make the form > > stateless, do you talk about the StatelessForm class? > > > > Andre > > > > On Sat, 07 Apr 2012 16:06:15 +0200 > > Bas Gooren wrote: > > > >> Hi, > >> > >> I would suggest the following: > >> 1) add a very simple test page: TestPage extends WebPage, which only has > >> the search form on it (nothing else!) > >> 2) see if that works multiple times in a row > >> 3) if that works, add your google analytics code > >> 4) repeat steps 1-2 > >> > >> In other words: eliminitate all other dependencies, so you can test (in > >> isolation) if the google analytics code (or the component you've wrapped > >> it in) is really the issue you are facing. > >> > >> You say that everything works ok when you add the query parameter for > >> the search. Having that parameter means you have a form with > >> method="get"? That, to me, would indicate you can make the form > >> stateless, which should prevent your search from redirecting to a > >> stateful url. (The /wicket/page start of the url indicates a stateful > >> page). > >> > >> But please start with steps 1-4 above to make sure you are looking in > >> the right place for the cause of your PageExpiredException. > >> > >> Bas > >> > >> Op 7-4-2012 14:04, schreef Andre Schütz: > >>> Hi, > >>> > >>> I tested the page and could localize the following error: > >>> > >>> page expired: > >>> > >>> http://localhost:8080/wicket/page?7-1.IFormSubmitListener-resultsContent-searchPanel-searchForm > >>> > >>> This means. The error occurs, when I make another search via my > >>> search form which is a normal Form with a textfield and a submit > >>> button. But, when I change the keyword in the URL (represented as > >>> q=KEYWORD parameter), the search works without the error. > >>> It seems, th
dynamic wizard - update model
Hello I have implement wicket wizard, but i have a small problem, i have an ajaxbutton and i want update the model, but only have success with this when i call processInput() inside the onclick event, there is another solution for this? i don´t want to call processInput() for all components inside the form. my code: public ClientStep(IDynamicWizardStep step,String label) { super(step); IModel model= new Model(client); setSummaryModel(new StringResourceModel("client.summary", this, model)); . final TextField field= new TextField("client.field",new PropertyModel(client, "field"){ @Override public String getObject() { return client.getField(); } @Override public void setObject(String object) { client.setField(object); } }); clientContainer.add(nif); AjaxButton fieldSearch=new AjaxButton("fieldSearch"){ @Override protected void onSubmit(AjaxRequestTarget art, Form form) { // field.processInput(); Client=... art.add(clientContainer); } @Override protected void onError(AjaxRequestTarget art, Form form) { } }; fieldSearch.setDefaultFormProcessing(false); clientContainer.add(fieldSearch); . public NewContract(String id) { super(id); setDefaultModel(new CompoundPropertyModel(this)); DynamicWizardModel model = new DynamicWizardModel(new ClientStep(null,"client")); // initialize the wizard with the wizard model we just built init(model); } thanks Frederico Rodrigues - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: a model for passing data between pages
On Mon, 9 Apr 2012 07:24:34 -0700 (PDT) armhold wrote: > I'm thinking of storing the DTO in the user's session as a detached > entity, and using a model like the following on the various pages: That is perfectly valid approach, and one that we've been using for some usecases. However, instead of this: > return (T) Session.get().getAttribute(key); I'd rather use a custom Session subclass with typesafe getters and setters: class MySession extends WebSession { private MyDTO dtoForFlow; public MyDTO getDtoForFlow() { return dtoForFlow; } // ...setter too... public static MySession get() { return (MySession) Session.get(); } } Alternatively you might want to look at the wicket-seam integration and use Seam conversations. Carl-Eric www.wicketbuch.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
a model for passing data between pages
I have a use case where several pages of a flow need to edit a DTO. Changes to the DTO (which may be an existing JPA Entity, or a not-yet-persisted one) are saved at the end of the flow (assuming the user clicks "save"). The user is allowed to navigate back-and-forth among the pages, so the obvious trick of passing the modified DTO to the next page via its constructor won't work- the back button will lead to a page with a potentially stale DTO. I'm thinking of storing the DTO in the user's session as a detached entity, and using a model like the following on the various pages: public class SessionModel implements IModel { protected String key; public SessionModel(String key) { this.key = key; } public SessionModel(String key, T object) { this.key = key; setObject(object); } public T getObject() { return (T) Session.get().getAttribute(key); } public void setObject(T object) { Session.get().setAttribute(key, object); } public void detach() { // no-op } } Does this seem like a reasonable approach? Is there an existing model that I've overlooked that does this already? Is there a better way to accomplish the multi-page flow without stuffing objects into the session? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/a-model-for-passing-data-between-pages-tp4542878p4542878.html Sent from the Users forum 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: Wicket 1.5 Wizard and AjaxFormComponentUpdatingBehavior for a DropDownChoice
The problem was also the id inside html components. When we have both wicket:id and id, in 1.5.5 id is not overwritten and no events are triggered for that component. I wonder why this was not put inside the migration guide to 1.5. Could be possible to get some warning in case we have something like this: [] and tell user that it's choice component in this case would not receive any events? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-Wizard-and-AjaxFormComponentUpdatingBehavior-for-a-DropDownChoice-tp4542617p4542703.html Sent from the Users forum 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: Wicket 1.5 markup id for a reused TextField is the same
I found the problem. Inside html I also had the id like: In 1.4 version of wicket there was no impact, but in 1.5.5 the id is not overwritten by wicket. So I removed it, and everything is ok. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-markup-id-for-a-reused-TextField-is-the-same-tp4542607p4542657.html Sent from the Users forum 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: Wicket 1.5 Wizard and AjaxFormComponentUpdatingBehavior for a DropDownChoice
Did anyone see this? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-Wizard-and-AjaxFormComponentUpdatingBehavior-for-a-DropDownChoice-tp4542617p4542632.html Sent from the Users forum 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
Wicket 1.5 Wizard and AjaxFormComponentUpdatingBehavior for a DropDownChoice
I have an application in wicket 1.4 with a wizard. Inside a WizardStep I have a simple DropDownChoice with an AjaxFormComponentUpdatingBehavior where inside onUpdate method i get the model object protected void onUpdate(AjaxRequestTarget target) { String type = choice.getModelObject(); ... } This works well. But migrating to 1.5.5 makes this not working. The method is entered but the model is always null. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-Wizard-and-AjaxFormComponentUpdatingBehavior-for-a-DropDownChoice-tp4542617p4542617.html Sent from the Users forum 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
Wicket 1.5 markup id for a reused TextField is the same
I have a panel like : public class IntervalFieldPanel extends Panel { private TextField intervalText; public IntervalFieldPanel(String id, final IModel model) { super(id, model); ... intervalText = new TextField("intervalText", model); ... } } and I use it inside another panel like : public class DailyJobPanel extends Panel { private IntervalFieldPanel hoursPanel; private IntervalFieldPanel daysPanel; } In wicket 1.4 generated markup ids for my text field are like: But in wicket 1.5.5 generated markup ids for my text field are the same (it is the wicket:id): which generates selections and submits problems. Is there a known bug? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-markup-id-for-a-reused-TextField-is-the-same-tp4542607p4542607.html Sent from the Users forum 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