Re: Same versioned link opens different pages on different machines
@Bertrand Thank you for clarifying that ALL urls in this discussion are mapped to the same page class. @Igor The core of Wicket value proposition is that it manages the state of your pages correctly. So, verifying that the state that Wicket manages is consistent with user inputs (product id 123 vs 379) should not be necessary. I can add the checks that you recommended in onconfigure() but I would like to get your agreement that it's a workaround for a critical bug. Thanks, Alec On Fri, Apr 13, 2012 at 1:55 AM, Martin Grigorov wrote: > https://issues.apache.org/jira/browse/WICKET-4441 > now I'm convinced that this additional check is needed there > > On Fri, Apr 13, 2012 at 12:00 AM, Igor Vaynberg > wrote: >> in that case a bit of logic in the page that checks the product id in >> onconfigure() against one in the model, and if they are different >> redirects to the correct page... >> >> -igor >> >> On Thu, Apr 12, 2012 at 1:56 PM, Bertrand Guay-Paquet >> wrote: you simply need to check what page class is mounted, and if the page retrieved by id is not of that class then dont render it but redirect to the bookmarkable url instead. -igor >>> >>> Both pages actually use the same MyPage.java class in this case. The only >>> difference is the page parameter encoded in the URL which presumably drives >>> a model. >>> >>> >>> - >>> 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 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Manipulate a List into a Panel
For service or database calls you should use a LDM: final IModel> lesAdressesDeLaCommandeModel = new LoadableDetachableModel>() { @Override public List load() { return adresseService.getLesAdressesDeLaCommande(); } }; #onConfigure() is now the recommended location to alter component visibility: Panel ongletAdressePanel = new OngletAdressePanel("panelAdresse", lesAdressesDeLaCommandeModel, TYPE_VISION.CONSEILLER) { onConfigure() { setVisible(!lesAdressesDeLaCommandeModel.getObject().isEmpty()); } }; blocClientAdresse.add(ongletAdressePanel); blocClientAdresse.add(new WebMarkupContainer("tabAdresseClient") { onConfigure() { setVisible(!lesAdressesDeLaCommandeModel.getObject().isEmpty()); } }); This has the advantage that the visibility is always up-to-date when the panel is re-rendered. Sven On 04/13/2012 07:23 PM, myrz wrote: Hi ! I want to know what was the best practice with Wicket when I want to manipulate a Panel which need a List of object. Today i can do what i'm supposed to do but I think it's so easy to be lost and apply anti-patterns with Wicket. A concrete example: http://apache-wicket.1842946.n4.nabble.com/file/n4555471/OngletAdressePanel.java OngletAdressePanel.java and this is how I create my Panel IModel> lesAdressesDeLaCommandeModel = new AbstractReadOnlyModel>() { private static final long serialVersionUID = 1L; @Override public List getObject() { return adresseService.getLesAdressesDeLaCommande(); } }; final boolean tabAdresseVisible = !lesAdressesDeLaCommandeModel.getObject().isEmpty(); Panel ongletAdressePanel = new OngletAdressePanel("panelAdresse",lesAdressesDeLaCommandeModel, TYPE_VISION.CONSEILLER); ongletAdressePanel.setVisible(tabAdresseVisible); blocClientAdresse.add(ongletAdressePanel); blocClientAdresse.add(new WebMarkupContainer("tabAdresseClient").setVisible(tabAdresseVisible)); This code works, but I know it's pretty uggly. Do you have any ideas how could I improve my code. And another question do you know what should I do to manipulate the list into my Panel. Doing something like get the size of the list and decide to set visible or not a component ? I ask this question because we can't cast a List : List adresses = (List) getDefaultModelObject(); Is there a special model to use to manipulate a list into a Component different than a Repeater? Thank you for your help -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Manipulate-a-List-into-a-Panel-tp4555471p4555471.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
Manipulate a List into a Panel
Hi ! I want to know what was the best practice with Wicket when I want to manipulate a Panel which need a List of object. Today i can do what i'm supposed to do but I think it's so easy to be lost and apply anti-patterns with Wicket. A concrete example: http://apache-wicket.1842946.n4.nabble.com/file/n4555471/OngletAdressePanel.java OngletAdressePanel.java and this is how I create my Panel IModel> lesAdressesDeLaCommandeModel = new AbstractReadOnlyModel>() { private static final long serialVersionUID = 1L; @Override public List getObject() { return adresseService.getLesAdressesDeLaCommande(); } }; final boolean tabAdresseVisible = !lesAdressesDeLaCommandeModel.getObject().isEmpty(); Panel ongletAdressePanel = new OngletAdressePanel("panelAdresse",lesAdressesDeLaCommandeModel, TYPE_VISION.CONSEILLER); ongletAdressePanel.setVisible(tabAdresseVisible); blocClientAdresse.add(ongletAdressePanel); blocClientAdresse.add(new WebMarkupContainer("tabAdresseClient").setVisible(tabAdresseVisible)); This code works, but I know it's pretty uggly. Do you have any ideas how could I improve my code. And another question do you know what should I do to manipulate the list into my Panel. Doing something like get the size of the list and decide to set visible or not a component ? I ask this question because we can't cast a List : List adresses = (List) getDefaultModelObject(); Is there a special model to use to manipulate a list into a Component different than a Repeater? Thank you for your help -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Manipulate-a-List-into-a-Panel-tp4555471p4555471.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
Access Denied Page
Hello, I'm facing really strange behaviour and I can't find out what's causing this. Let me describe this scenario: 1. We have an external hosting and the wicket app is running out there. 2. There is a form to upload a file to FTP. 3. When I try to upload a file I get Access Denied Page. However I dont use any authorize strategies etc. My logs are clear and there are no exceptions in the logs. The interesting thing is that on my local machine it's working like a charm but on the external hosting sometimes it's working and sometimes it's not. So any idea what can cause such a problem ? Regards, Satrix -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Access-Denied-Page-tp4555096p4555096.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: focus locked in place
On 2012-04-13 11:58, Tom Eugelink wrote: The cursor can be placed in the date fields, but not in any of the textfield in the listview. To add some additional information; the cursor can be placed in the textfields by using the TAB key. A mouse click will always jump to the first field. So it seems to be a RefreshingView in combination with a mouse click problem. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: component.isAuto - was: Wicket 1.5: The component(s) below failed to render (revisited)
Hi Martin, hi list I guess I narrowed things down a bit. I was obviously looking at the wrong places. The problem is with the renderedComponents Set (and not with the isAuto flag as thought at first). In the Page class there is that check here: > // If component never rendered > if (renderedComponents == null || > !renderedComponents.contains(component)) and this method: > public final void componentRendered(final Component component) > { > // Inform the page that this component rendered > if (getApplication().getDebugSettings().getComponentUseCheck()) > { This method is obviously only run in the debug mode when the ComponentUseCheck is activated (which is by default). Which also means that said Set is only instantiated when ComponentUseCheck is activated. Which also means the check in the first copy above will not be run when ComponentUseCheck is false/deactivated. Now that I deactivated that check, my renderer works again. So there must be some problem with dynamic components. I looked through the render methods of 1.5x and 1.4x. While some things changed, the flow seems to be mostly the same. Nothing obvious. I'd love to do a minimal quickstart but that won't be very minimal. I'd have to add most of the renderer, or rewrite parts. I'll see if I find some time to put together something small. In the meantime. If somebody has an idea where to look at, I'd be happy to test things out on my codebase. Cheers, Adrian On 4/12/12 5:02 PM, Martin Grigorov wrote: Hi, On Thu, Apr 12, 2012 at 5:48 PM, Adrian Wiesmann wrote: Hi Me again with a follow up to my isAuto() problem. Setting component.setAuto(true) is quite bad, since Wicket will remove all components in the detachChildren() method which have the Auto Flag and which are not an instance of InlineEnclosure. Which all of my components obviously are not... While the isAuto(true) results in a nicely rendered component tree, when you try to click on - say a row in a list - then Wicket throws an error because the component in question was removed. Well here we are again. How can I port my renderer which adds components to the component tree on the fly as I was able to do in Wicket< 1.5? What was the intention to change the behaviour there? It is not clear to me which behavior exactly has changed and now causes you troubles. Create a minimal quickstart that works on 1.4 and attach it to a ticket in Jira. Regards, Adrian On 2/12/12 7:27 PM, Adrian Wiesmann wrote: Hello list Some while ago I posted a few messages to this list where I asked for help in finding a problem with Wicket 1.5. I was not able to find the bug back then. Now I downloaded the bleeding edge version 1.5.4 and tried again. And now I am a step further. I have that rendering engine where I take an XML file, build an object tree from that and have a renderer rendering a Wicket object tree and finally Wicket which renders the HTML UI from that. Now I noticed with version 1.5 of Wicket, that this line in the org.apache.wicket.Page.class are the key to my problem (lines 611, 612): // If not an auto component ... if (!component.isAuto()&& component.isVisibleInHierarchy()) I noticed that many of my components I add in my renderer on the fly are returning isAuto = false on that line (and of course they are visible, which adds them to unrenderedComponents and ultimately provokes the error). I then added this.setAuto(true); in one of my components. And voila, it was not in the list of components which failed to render. So here are my questions: - What did change from version 1.4.x to version 1.5.x that results in this error? - Is that a bug in Wicket or do I need to fix my renderer somehow? - What side effects does it have if I just add a setAuto(true) to all of my components? Thanks for your help! Cheers, Adrian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6.0
On Fri, Apr 13, 2012 at 4:17 PM, Francois Meillet wrote: > Hi, > > I use 6, everything is ok but I encounter a problem with DatePicker. > No event when there is an update. > https://issues.apache.org/jira/browse/WICKET-4496 This is a problem in 1.5.x too so it is not 6.x specific. > > François > > Le 13 avr. 2012 à 14:24, Martin Grigorov a écrit : > >> Hi, >> >> beta1 has been released at March 26 and so far there were 3 tickets >> for it. 2 of them made small API improvements. >> So it is either rock solid or there are not that many users of it. >> >> I think it is stable enough for RC but we wanted to receive more >> feedback about the changes because we'd like to avoid making API >> changes in the RCs. >> We release 1.5.x on monthly schedule and that is the plan for 6.0.x too. >> >> How many of you tried beta1 ? >> >> On Fri, Apr 13, 2012 at 3:07 PM, Paul Szulc wrote: >>> Any plans or schedule for releasing first RC? >> >> >> >> -- >> 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 >> > -- 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 6.0
Hi, I use 6, everything is ok but I encounter a problem with DatePicker. No event when there is an update. https://issues.apache.org/jira/browse/WICKET-4496 François Le 13 avr. 2012 à 14:24, Martin Grigorov a écrit : > Hi, > > beta1 has been released at March 26 and so far there were 3 tickets > for it. 2 of them made small API improvements. > So it is either rock solid or there are not that many users of it. > > I think it is stable enough for RC but we wanted to receive more > feedback about the changes because we'd like to avoid making API > changes in the RCs. > We release 1.5.x on monthly schedule and that is the plan for 6.0.x too. > > How many of you tried beta1 ? > > On Fri, Apr 13, 2012 at 3:07 PM, Paul Szulc wrote: >> Any plans or schedule for releasing first RC? > > > > -- > 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 6.0
Hi Tom On Fri, Apr 13, 2012 at 3:43 PM, Tom Eugelink wrote: > > On 2012-04-13 14:24, Martin Grigorov wrote: >> >> >> How many of you tried beta1 ? >> > > I started off with 6, but was afraid things like wiquery would conflict in > the usage of jquery, so I returned to safety using 1.5.5. Should that be a > problem? Otherwise I'll upgrade back to 6. You will need to build WiQuery yourself from its master branch g...@github.com:WiQuery/wiquery.git The problem is that some of the WiQuery components need to be ported to Wicket6. I'm not sure how many of them are currently broken. > > Tom > > > > - > 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 6.0
On 2012-04-13 14:24, Martin Grigorov wrote: How many of you tried beta1 ? I started off with 6, but was afraid things like wiquery would conflict in the usage of jquery, so I returned to safety using 1.5.5. Should that be a problem? Otherwise I'll upgrade back to 6. Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Built with Wicket: showcases for Wicket applications
Hey, great place. I went and added one of the sites we did (WRAP), however I forgot to put my companies name in the caption ..any way I can go edit it? :) thanks! - Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Built-with-Wicket-showcases-for-Wicket-applications-tp4551410p4554678.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 6.0
Hi, beta1 has been released at March 26 and so far there were 3 tickets for it. 2 of them made small API improvements. So it is either rock solid or there are not that many users of it. I think it is stable enough for RC but we wanted to receive more feedback about the changes because we'd like to avoid making API changes in the RCs. We release 1.5.x on monthly schedule and that is the plan for 6.0.x too. How many of you tried beta1 ? On Fri, Apr 13, 2012 at 3:07 PM, Paul Szulc wrote: > Any plans or schedule for releasing first RC? -- 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
focus locked in place
I'm slowly getting some ground under my Wicket feet, but now I have a strange problem. I've got a form with two TextFields and a RefreshingView inside a MarkupContainer, building rows containing a DropDownChoice, TextField and a AjaxSubmitLink. The stripped version of the Java code looks like this: final Form lForm = new Form("form", new CompoundPropertyModel(masterLicenseModel)) ; add(lForm); DatePicker lValidFromDateTextField = new DatePicker(LicenseModel.VALIDFROM_PROPERTY) lForm.add(lValidFromDateTextField); DatePicker lValidUntilDateTextField = new DatePicker(LicenseModel.VALIDUNTIL_PROPERTY); lForm.add(lValidUntilDateTextField); final MarkupContainer lRuntimesPanel = new WebMarkupContainer("runtimesPanel"); lRuntimesPanel.setOutputMarkupId(true); lForm.add(lRuntimesPanel); final RefreshingView lRuntimeListView = new RefreshingView(LicenseModel.RUNTIMES_PROPERTY) { @Override protected void populateItem(final Item item) { item.add( new DropDownChoice("runtimeType", new PropertyModel(item.getDefaultModel(), "type"), License.RUNTIME_TYPES)); item.add( new TextField("runtimeOs", new PropertyModel(item.getDefaultModel(), "os"))); AjaxSubmitLink lRemoveRuntime = new AjaxSubmitLink("removeRuntime", lForm) lRemoveRuntime.setDefaultFormProcessing(false); item.add(lRemoveRuntime); } }; lRuntimesPanel.add(lRuntimeListView); AjaxSubmitLink lAddRuntime = new AjaxSubmitLink("addRuntime", lForm) { }; lAddRuntime.setDefaultFormProcessing(false); lRuntimesPanel.add(lAddRuntime); The cursor can be placed in the date fields, but not in any of the textfield in the listview. Focus then immediately jumps to the DropDownChoice in the first row. I've tried removing the MarkupContainer & Ajax part, reverting back to a regular ListView. In the HTML I use a table for the listview, but a bunch of divs instead do not make a difference. I also see no events on the HTML text element in the listview either. Any ideas why the focus jumps? Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
Here is the link https://issues.apache.org/jira/browse/WICKET-4496 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554218.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: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
Create a quickstart app and attach it to Jira. Thanks! On Fri, Apr 13, 2012 at 11:35 AM, dpmihai wrote: > For a DateField and a DateTimeField in the onUpdate method for an > AjaxFormComponentUpdatingBehavior , the model is never updated, it rests > with the initial date selection. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554163.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: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
Create a quickstart app and attach it to Jira. Thanks! On Fri, Apr 13, 2012 at 11:35 AM, dpmihai wrote: > For a DateField and a DateTimeField in the onUpdate method for an > AjaxFormComponentUpdatingBehavior , the model is never updated, it rests > with the initial date selection. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554163.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: Page Expired with Google Analytics Tracking Code
Hi, What happens if you change that to: @Override public void renderHead(HeaderResponse response) { super.renderHead(response); String script = "var _gaq = _gaq || ..."; response.renderJavaScript(script, null); } ? (note that I added a call to super.renderHead()); Bas Op 11-4-2012 23:08, schreef Andre Schütz: Hi, I implemented your version but still I get the same error, if I have the Google Analytics Code in the head. Could it be an error with the way I insert the Google Analytics Code? I do it in the following way. In my WebPage class I overwrite the following method: @Override public void renderHead(HeaderResponse response) { String script = "var _gaq = _gaq || ..."; response.renderJavaScript(script, null); } Andre On Wed, 11 Apr 2012 11:38:52 +0200 Bas Gooren wrote: Well, for starters I wonder why you are using multiple LoadableDetachableModels in a Vector? What we do 99% of the time is this: - Wrap the entire resultset in a LDM - Feed that LDM to a ListView or a variant (we have a custom RepeatingView for paged database listings) - Use PropertyModels inside the repeater item(s) (or not, since the ListView will refresh itself anyway) I'm pretty sure you don't need setReuseItems(true) in this case; The only reason I've seen where it's required on a ListView is when you use it inside a form and need form validation to work. Since I don't see any form fields inside your listview I guess this is not the case. I also wonder why you had "datacontainer.setVersioned(false)"? E.g.: private void displayResults(IModel> 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) { DefaultSearchResult s = item.getModelObject(); // Either (A) item.add(new ExternalLink("title", new PropertyModel(item.getModel(), "title")); // Or (B) item.add(new ExternalLink("title", s.getTitle()); item.add(new Label("description", new PropertyModel(item.getModel(), "description"))); item.add(new Label("time", s.getTime()).setEscapeModelStrings(false)); } }; 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); } Op 11-4-2012 11:22, schreef wic...@faustas.de: Hi, thank you for the answer. The "they are not completely empty" means the following. My results variable is a Vector that contains LoadableDetachableModel's in the form of the LoaableListingEntryModel. This model contains a class that has two variables that I access with getResults() and getTime(). The content of the getResults() variable is a class that implements the Serializable interface. The getTime() variable just has a Vector with time strings. Now comes the interesting part. When I click on one of the links from the PagingNavigator, the content of the getTime() variable is displayed in each single ListItem. The getResults() class is empty. The content of the getResults() class is only shown after a page reload and once again empty after clicking on one of the links from the PagingNavigator. That's the reason why I said it is "not completely empty". I know that there are 60 results to display. The PagingNavigator shows 6 links for 10 entries per page. But after clicking on one of the links, the objects from the getResults() class are empty. Any idea? Andre - Original Message - From: b...@iswd.nl To: users@wicket.apache.org Date: 11.04.2012 00:51:38 Subject: Re: Page Expired with Google Analytics Tracking Code Hi, It sounds a lot like you are not using models properly. E.g. your "results" method parameter has a length which overflows the page size (and thus the pagingnavigator renders page links), but on a second request the contents of "results" are null/empty? Try debugging PageableListView#populateItem() and check what its model points to. Can you be more specific with regard to "they are not completely empty"? What exactly do you see, and what do you expect? Kind regards, Bas Op 10-4-2012 22:19, schreef Andre Schütz: Hi, nobody an idea why the PageableListView is empty after clicking on one of the links from the PagingNavigator? After reloading of the page, the PageableListView is filled and once again empty when I click on oe of the links from the PagingNavigator. It seems, that the Listitem's are empty when I click on one of the links i
Re: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
For a DateField and a DateTimeField in the onUpdate method for an AjaxFormComponentUpdatingBehavior , the model is never updated, it rests with the initial date selection. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554163.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: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
On Fri, Apr 13, 2012 at 11:26 AM, dpmihai wrote: > This workaround works. But it seems DateField and DateTimeField are buggy in > Wicket 1.5.5. Can you explain the bug ? > > So the only solution for now is to create my new components DateField and > DateTimeField. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554145.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: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
This workaround works. But it seems DateField and DateTimeField are buggy in Wicket 1.5.5. So the only solution for now is to create my new components DateField and DateTimeField. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554145.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: [Conception] question about mixed entities and model
Ok thanks it was my idea too but I didn't know if it was right to do this. Thank you very much -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Conception-question-about-mixed-entities-and-model-tp4551789p4554139.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: AbstractPageableView Example
Hi, DataView, GridView, and several classes in org.apache.wicket.examples.repeater (wicket-examples) are implementations of AbstractPageableView. Use them as inspiration. On Fri, Apr 13, 2012 at 9:54 AM, besty wrote: > Hi all, > > I've been looking to implement a table which is also refreshed every > request. RefreshingView doesn't quite do the job because I also need to > paging support. I've finally found AbstractPageableView which is exactly > what I need. However, I could not find any example of how to implement it. > It has a protected method called internalSetRowsPerPage() but could anyone > tell me how to use this? > > Thanks in advance > > Best > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/AbstractPageableView-Example-tp4553989p4553989.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: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
try this public TestForm(String form, final IModel dateModel) { super(form, dateModel); DateTextField dateTextField = new DateTextField("txtDate", dateModel, new StrictPatternDateConverter("dd/MM/", false)); DatePicker datePicker = new DatePicker(); datePicker.setShowOnFieldClick(true); dateTextField.add(datePicker); AjaxFormComponentUpdatingBehavior ajaxFormComponentUpdatingBehavior = new AjaxFormComponentUpdatingBehavior("onChange") { @Override protected void onUpdate(AjaxRequestTarget target) { System.out.println("dateModel :[" + dateModel + "]"); } }; dateTextField.add(ajaxFormComponentUpdatingBehavior); add(dateTextField); } Le 13 avr. 2012 à 09:09, dpmihai a écrit : > import java.util.Date; > import org.apache.wicket.ajax.AjaxRequestTarget; > import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; > import org.apache.wicket.datetime.markup.html.form.DateTextField; > import org.apache.wicket.extensions.yui.calendar.DateField; > import org.apache.wicket.markup.html.WebPage; > import org.apache.wicket.markup.html.form.Form; > import org.apache.wicket.model.IModel; > import org.apache.wicket.model.Model; > import org.apache.wicket.model.PropertyModel; > > public class DatePage extends WebPage { > > private IModel date; > > public DatePage() { > super(); > add(new TestForm("form", date = new Model(new Date(; > } > > private class TestForm extends Form { > > public TestForm(String form, final IModel dateModel) { > super(form, dateModel); > > DateField txtDate = new DateField("txtDate", dateModel) > { > > @Override > protected DateTextField > newDateTextField(java.lang.String id, PropertyModel dateFieldModel) { > DateTextField dateTextField = > super.newDateTextField(id, dateFieldModel); > > AjaxFormComponentUpdatingBehavior > ajaxFormComponentUpdatingBehavior = new > AjaxFormComponentUpdatingBehavior("onChange") { > @Override > protected void > onUpdate(AjaxRequestTarget target) { > > System.out.println("dateModel :[" + dateModel + "]"); > } > }; > > > dateTextField.add(ajaxFormComponentUpdatingBehavior); > return dateTextField; > } > }; > > add( txtDate ); > } > } > } > > with DatePage.html: > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > http://www.w3.org/1999/xhtml"; > > xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.5-strict.dtd/"; > xml:lang="en" > lang="en"> > > > > > > > > > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554031.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
Re: Same versioned link opens different pages on different machines
https://issues.apache.org/jira/browse/WICKET-4441 now I'm convinced that this additional check is needed there On Fri, Apr 13, 2012 at 12:00 AM, Igor Vaynberg wrote: > in that case a bit of logic in the page that checks the product id in > onconfigure() against one in the model, and if they are different > redirects to the correct page... > > -igor > > On Thu, Apr 12, 2012 at 1:56 PM, Bertrand Guay-Paquet > wrote: >>> you simply need to check what page class is mounted, and if the page >>> retrieved by id is not of that class then dont render it but redirect >>> to the bookmarkable url instead. >>> >>> -igor >> >> Both pages actually use the same MyPage.java class in this case. The only >> difference is the page parameter encoded in the URL which presumably drives >> a model. >> >> >> - >> 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
AbstractPageableView Example
Hi all, I've been looking to implement a table which is also refreshed every request. RefreshingView doesn't quite do the job because I also need to paging support. I've finally found AbstractPageableView which is exactly what I need. However, I could not find any example of how to implement it. It has a protected method called internalSetRowsPerPage() but could anyone tell me how to use this? Thanks in advance Best -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractPageableView-Example-tp4553989p4553989.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: AjaxEditableLabel Missing setConvertEmptyInputStringToNull(...)?
Hi, Create a ticket in Jira with a patch. On Thu, Apr 12, 2012 at 6:47 PM, Aaron J. Garcia wrote: > I am wondering if AjaxEditableLabel is intentionally missing a > setConvertEmptyInputStringToNull(...) method? I have a use case for it, and > it > seems like it would be reasonable to implement. > > For now, I have a work-around for this by overriding AjaxEditableLabel's > newEditor(...) method. However, I don't like this solution because I need to > cast the returned FormComponent into a TextField in order to get access > to > the setConvertEmptyInputStringToNull(...) method. If the underlying newEditor > implementation is changed at some point, my code won't work. > > Can this functionality be added to AjaxEditableLabel? If so, how would I go > about requesting it? > > Thanks a lot for your help. > > Regards, > Aaron J. Garcia > > > - > 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: Markup parsing and caching
Hi, You can create the parser before creating the thread and pass it as parameter to the thread. On Thu, Apr 12, 2012 at 8:31 PM, Ashoka Upadhya wrote: > In our case Markup for the component comes from CMS. We want to parse > the markup and cache Markup object in memory. > > Parsing happens asynchronously (depending on the content change in CMS) > in a separate thread from the request thread. > > > > We have custom MarkupParser that extends AbstractMarkupParser but > AbstractMarkupParser has dependency on Application (In the constructor > it is getting MarkupSettings from application). > > > > Since we are doing parsing in a different thread which doesn't have > application set in the thread context., Is there any other way to parse > without setting dummy application object in the thread context? > > > > Regards, > > > > Ashoka Upadhya > > Art.com > -- 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: Group Select with Beans
A beanA = new A(); TextField aName = new TextField("name", new PropertyModel(beanA, "name")); Select aId = new Select("id", new PropertyModel(beanA, "b_id")); SelectOptions options = new SelectOptions("options", aListOfAllIdsInB, rendererIdToDisplay); aId.add(options); something like this should do it On Fri, Apr 13, 2012 at 5:07 AM, William Speirs wrote: > I have 2 JavaBeans A & B. A has 2 fields: String name, Integer b_id. B has > 2 fields: Integer id, String display. > > I have a list of beans for B: > 1, "foo" > 2, "bar" > > I have a single A bean, where its b_id corresponds to an id in bean B > (basically the beans represent 2 tables in a DB with the ids as references > to each other). I want to create a form to edit bean A which includes a > drop-down for all the possible options for bean B. The one hitch is that I > want groups for my drop-down, so I believe I'm forced to use Select & > SelectOption with the appropriate mark-up in HTML. > > I have the form completed and working for changing A's name field, but I > cannot figure out how to link the drop-down which displays all my options > for bean B to A's b_id field. I'm using a PropertyModel to modify A's name > field, and but I missing how to link A's b_id to the id from B. Also, my > has values like option3, option4, option5... I would think I'd > need these to be B's id field values for this to work. > > Any help in the right direction would be greatly appreciated. I'm very > close, just missing this one link between my two models. > > Thanks in advance... > > Bill- -- 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: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
import java.util.Date; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.datetime.markup.html.form.DateTextField; import org.apache.wicket.extensions.yui.calendar.DateField; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; public class DatePage extends WebPage { private IModel date; public DatePage() { super(); add(new TestForm("form", date = new Model(new Date(; } private class TestForm extends Form { public TestForm(String form, final IModel dateModel) { super(form, dateModel); DateField txtDate = new DateField("txtDate", dateModel) { @Override protected DateTextField newDateTextField(java.lang.String id, PropertyModel dateFieldModel) { DateTextField dateTextField = super.newDateTextField(id, dateFieldModel); AjaxFormComponentUpdatingBehavior ajaxFormComponentUpdatingBehavior = new AjaxFormComponentUpdatingBehavior("onChange") { @Override protected void onUpdate(AjaxRequestTarget target) { System.out.println("dateModel :[" + dateModel + "]"); } }; dateTextField.add(ajaxFormComponentUpdatingBehavior); return dateTextField; } }; add( txtDate ); } } } with DatePage.html: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.5-strict.dtd/"; xml:lang="en" lang="en"> -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554031.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: DateField and AjaxFormComponentUpdatingBehavior in wicket 1.5.5
The class I put here was the full code: import java.util.Date; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.datetime.markup.html.form.DateTextField; import org.apache.wicket.extensions.yui.calendar.DateField; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.model.PropertyModel; public class DatePage extends WebPage { private Date date; public DatePage() { super(); final DateField txtDate = new DateField("txtDate", new PropertyModel(this, "date")) { @Override protected DateTextField newDateTextField(java.lang.String id, PropertyModel dateFieldModel) { DateTextField f = super.newDateTextField(id, dateFieldModel); f.add(createAjaxBehavior()); return f; } }; add(txtDate); } private AjaxFormComponentUpdatingBehavior createAjaxBehavior() { return new AjaxFormComponentUpdatingBehavior("onchange") { @Override protected void onUpdate(AjaxRequestTarget target) { System.out.println("*** date=" + date); } }; } } and DatePage.html: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.5-strict.dtd/"; xml:lang="en" lang="en"> -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DateField-and-AjaxFormComponentUpdatingBehavior-in-wicket-1-5-5-tp4551607p4554015.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