Re: static or nonstatic inner classes
Use the same decision making process you would for any other java class Do you need access to any private variables of the containing class? Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jun 30, 2010 12:56 AM, Sigmar Muuga meedi...@gmail.com wrote: Hello, while designing pages for my app, I was thinking, if there is some difference, when I use static or nonstatic classes in my page classes? For example: public class MyPage extends Page { some code private /** Should it be static or not? */ class MyForm extends Form { } } Best regards, Sigmar
Re: static or nonstatic inner classes
Actually not. I was thinking that maybe I have missed something from the docs. Such issues are sometimes hard to find :) On Wed, Jun 30, 2010 at 8:59 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Use the same decision making process you would for any other java class Do you need access to any private variables of the containing class? Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jun 30, 2010 12:56 AM, Sigmar Muuga meedi...@gmail.com wrote: Hello, while designing pages for my app, I was thinking, if there is some difference, when I use static or nonstatic classes in my page classes? For example: public class MyPage extends Page { some code private /** Should it be static or not? */ class MyForm extends Form { } } Best regards, Sigmar
Re: Best practice: AJAX and how to implement state indicator image?
Hi Igor, thank you for your suggestion, the lookup of the icon to display works fine. I now override ResourceReference.newResource() Unfortunately, the lookup only works correctely the first time, i.e. when the Page is displayed. Subsequent Ajax updates and re-rendering of parts will always show the same (initially displayed) icon, independent of the current model state. Any suggestions on how to Ajax-enable this? Many thanks for your time, Erich Von: Igor Vaynberg igor.vaynb...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 29. Juni 2010, 17:32:27 Uhr Betreff: Re: Best practice: AJAX and how to implement state indicator image? the resourcereference you give your image can serve different images based on some condition. -igor On Tue, Jun 29, 2010 at 7:47 AM, Erich W Schreiner eschrei...@yahoo.com wrote: Dear all, I am trying to find the best way to implement a state indicator that shows different images. The state of the model object can be changed by the user, resulting in an AJAX update being sent the server and a re-rendering of the model object, which should show the correct state image then. Currently I am adding an Image for each state and override their isVisible() method to have only one image shown. Is there any way to do this using a single Image component and some dynamic way of looking up the image to render? Related to this is the problem of showing a set of Ajax-enabled icon buttons, again with their visibility depending on the model state and themselves influencing this state. I would like to merge these buttons into a single one (e.g. for setting a boolean to true / false and showing a checkbox checked / unchecked). TIA best regards, Erich - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Best practice: AJAX and how to implement state indicator image?
use non caching image? Ernesto On Wed, Jun 30, 2010 at 10:54 AM, Erich W Schreiner eschrei...@yahoo.com wrote: Hi Igor, thank you for your suggestion, the lookup of the icon to display works fine. I now override ResourceReference.newResource() Unfortunately, the lookup only works correctely the first time, i.e. when the Page is displayed. Subsequent Ajax updates and re-rendering of parts will always show the same (initially displayed) icon, independent of the current model state. Any suggestions on how to Ajax-enable this? Many thanks for your time, Erich Von: Igor Vaynberg igor.vaynb...@gmail.com An: users@wicket.apache.org Gesendet: Dienstag, den 29. Juni 2010, 17:32:27 Uhr Betreff: Re: Best practice: AJAX and how to implement state indicator image? the resourcereference you give your image can serve different images based on some condition. -igor On Tue, Jun 29, 2010 at 7:47 AM, Erich W Schreiner eschrei...@yahoo.com wrote: Dear all, I am trying to find the best way to implement a state indicator that shows different images. The state of the model object can be changed by the user, resulting in an AJAX update being sent the server and a re-rendering of the model object, which should show the correct state image then. Currently I am adding an Image for each state and override their isVisible() method to have only one image shown. Is there any way to do this using a single Image component and some dynamic way of looking up the image to render? Related to this is the problem of showing a set of Ajax-enabled icon buttons, again with their visibility depending on the model state and themselves influencing this state. I would like to merge these buttons into a single one (e.g. for setting a boolean to true / false and showing a checkbox checked / unchecked). TIA best regards, Erich - 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
difference between getSession().getLocale() and getRequest().getLocale()
Hi I've noticed a difference in getting the locale from the request and from the session. getSession().getLocale() shows en but getRequest().getLocale() shows en_GB. thus not only the language but also the country. Why is this, or what am I doing wrong perhaps? Are there maybe other drawbacks related to the use of one of these? I'm using wicket 1.4.1 grtz
Re: question about adding synchronized on mountsOnPath at WebRequestCodingStrategy
Optimization helped! Thank you for fixing it. Kind regards, Danny -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/question-about-adding-synchronized-on-mountsOnPath-at-WebRequestCodingStrategy-tp1878901p2272701.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Update page after redirecting to blank page
Hi, I have problem with updating my page with Ajax after redirecting to some new page. I have page with list view. In this list view I have some links to audio records represented by AjaxLinks. If I click to the AjaxLink, user is redirected to new _blank page that sends him an audie record. After this all other links are disabled (nothing happens when the link is clicked). So the user can download just one audio and then he must reload the page. This is very incomfortable. Here are some code snippets: this is one of the links I placed to the list view AjaxLink recordLink = new AjaxLink (recordLink) { @Override public void onClick (AjaxRequestTarget target) { // check if the requested file exist String requestedFilePath = Configuration.getConfigItem(Configuration.RECORD_PATH) + callRecord.getRecordPath(); File requestedFile = new File (requestedFilePath); if (requestedFile.exists()) { // I think I need to do this, but when I use setResponsePage this line is probably ignored target.addComponent(parentComponent); PageParameters pp = new PageParameters(); pp.put (REQUESTED_FILE, callRecord.getRecordPath()); // set response page to the page that provide the audio download setResponsePage (SendFile.class, pp); } } }; HTML: td wicket:enclosure a wicket:id=recordLink target=_blank wicket:message=title:recordwicket:message key=record//a /wicket:enclosure /td As you see I open each audio download on new page. So I expected that I can continue working with my main page without any restrictions. But after first click on the recordLink AjaxLink othe AjaxLinks on the page are disabled. Do anyone have some experieces with similar problem. I have no ideas what I am doing wrong. Please help. Milan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mulitple Forms in ListView
Not a best solution but it works:) final FeedbackPanel feedback = new FeedbackPanel(feedback, new ContainerFeedbackMessageFilter(form) { @Override public boolean accept(FeedbackMessage message) { return requiredTextField.getModel().equals(((RequiredTextField) message.getReporter()).getModel()); } }); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mulitple-Forms-in-ListView-tp2272668p2272703.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Refreshing DataView fails if it was initially empty
Hi All, I have what seems like a strange problem with refreshing a DataView. I have a WebMarkupContainer that contains a DataView. The DataView uses a SortableDataProvider as its DataProvider. The WebMarkupContainer uses the DataView's SortableDataProvider to determine if there are any items to be displayed within the DataView. If there any items then the WebMarkupContainer's isVisible() method returns true, and therefore the WebMarkupContainer and DataView should be rendered. I am also using a ModalWindow to add new items to the DataView. On exiting from the ModalWindow, I am using an AjaxRequestTarget to refresh the WebMarkupContainer and therefore redraw the DataView with the new item added to it. This all works fine IF there were already items in the DataView when it was first rendered during the initial loading of its page. If the DataView is initially empty then the WebMarkupContainer is not rendered as expected on page load. My issue is that adding new items via the ModalWindow does not cause the WebMarkupContainer and DataView to be rendered. Via debugging, I can see that the WebMarkupContainer's isVisible() method is returning true yet nothing appears. Any suggestions on resolving this issue would be appreciated. Thanks so much, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Refreshing DataView fails if it was initially empty
Hi Steve, I would do the following (which might not be the best solution;-): 1- Create panel EmptyOrTablePanel with setOutputMarkupId(true); 2- and then have a child of this panel that either displays an EmptyPanel or your table: depending on whether you have records or not. You could determine that on the onBeforeRender of EmptyOrTablePanelpanel and use addOrReplace to put the table or the EmptyPanel. 3- Just tell this panel to update itself after AJAX operations. Best, Ernesto On Wed, Jun 30, 2010 at 3:29 PM, Steve Hiller sh...@bellsouth.net wrote: Hi All, I have what seems like a strange problem with refreshing a DataView. I have a WebMarkupContainer that contains a DataView. The DataView uses a SortableDataProvider as its DataProvider. The WebMarkupContainer uses the DataView's SortableDataProvider to determine if there are any items to be displayed within the DataView. If there any items then the WebMarkupContainer's isVisible() method returns true, and therefore the WebMarkupContainer and DataView should be rendered. I am also using a ModalWindow to add new items to the DataView. On exiting from the ModalWindow, I am using an AjaxRequestTarget to refresh the WebMarkupContainer and therefore redraw the DataView with the new item added to it. This all works fine IF there were already items in the DataView when it was first rendered during the initial loading of its page. If the DataView is initially empty then the WebMarkupContainer is not rendered as expected on page load. My issue is that adding new items via the ModalWindow does not cause the WebMarkupContainer and DataView to be rendered. Via debugging, I can see that the WebMarkupContainer's isVisible() method is returning true yet nothing appears. Any suggestions on resolving this issue would be appreciated. Thanks so much, Steve - 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: Model not Updating on Multiple Form Submits
Hey, I guess the quick summary is whether it's fundamentally okay to share a single model among several components, including a form, through several ajax submits, using setObject() on that model during each submit? My behavior is that one of the components is not getting the updated setObject(). It sounds like you're not opposing that idea and suggesting that there actually is a bug, which is certainly possible. I would love to make a quickstart - but I'm not sure what you mean by that. I'm a long-time programmer, but new to Java web development/deployment. Can you point me to the correct tutorial? I searched for 'java quickstart' and found a whole slew of unhelpful information. Thanks! Jake On 6/30/10 12:04 AM, users-digest-h...@wicket.apache.org users-digest-h...@wicket.apache.org wrote: From: Jeremy Thomerson jer...@wickettraining.com Date: Tue, 29 Jun 2010 22:59:56 -0500 To: users@wicket.apache.org Subject: Re: Model not Updating on Multiple Form Submits Too many variables to debug without seeing the actual code. The best thing for you to do would be to create a quickstart so that we could try to run it. Of course, most people find their problem while creating the quickstart. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Refreshing DataView fails if it was initially empty
I meant something like: === import org.apache.wicket.Component; import org.apache.wicket.markup.html.panel.Panel; public abstract class CondiotionalPanel extends Panel { private static final long serialVersionUID = 1L; public CondiotionalPanel(String id) { super(id); setOutputMarkupId(true); } @Override protected void onBeforeRender() { if(getContidion()) addOrReplace(onTrueState(child)); else addOrReplace(onFalseState(child)); super.onBeforeRender(); } protected abstract Component onTrueState(String id); protected abstract Component onFalseState(String id); protected abstract boolean getContidion(); } ConditionaPanel.html html xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; body wicket:panel div wicket:id=content/div /wicket:panel /body /html CondiotionalPanel condionalPanel= new CondiotionalPanel(myid){ private static final long serialVersionUID = 1L; @Override protected Component onFalseState(String id) { return new EmptyPanel(id); } @Override protected Component onTrueState(String id) { return new MyTablePanel(id); } @Override protected boolean getContidion() { return tableHasElements; } }; when you update this panel (condionalPanel) via AJAX request target. Ernesto On Wed, Jun 30, 2010 at 3:44 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi Steve, I would do the following (which might not be the best solution;-): 1- Create panel EmptyOrTablePanel with setOutputMarkupId(true); 2- and then have a child of this panel that either displays an EmptyPanel or your table: depending on whether you have records or not. You could determine that on the onBeforeRender of EmptyOrTablePanelpanel and use addOrReplace to put the table or the EmptyPanel. 3- Just tell this panel to update itself after AJAX operations. Best, Ernesto On Wed, Jun 30, 2010 at 3:29 PM, Steve Hiller sh...@bellsouth.net wrote: Hi All, I have what seems like a strange problem with refreshing a DataView. I have a WebMarkupContainer that contains a DataView. The DataView uses a SortableDataProvider as its DataProvider. The WebMarkupContainer uses the DataView's SortableDataProvider to determine if there are any items to be displayed within the DataView. If there any items then the WebMarkupContainer's isVisible() method returns true, and therefore the WebMarkupContainer and DataView should be rendered. I am also using a ModalWindow to add new items to the DataView. On exiting from the ModalWindow, I am using an AjaxRequestTarget to refresh the WebMarkupContainer and therefore redraw the DataView with the new item added to it. This all works fine IF there were already items in the DataView when it was first rendered during the initial loading of its page. If the DataView is initially empty then the WebMarkupContainer is not rendered as expected on page load. My issue is that adding new items via the ModalWindow does not cause the WebMarkupContainer and DataView to be rendered. Via debugging, I can see that the WebMarkupContainer's isVisible() method is returning true yet nothing appears. Any suggestions on resolving this issue would be appreciated. Thanks so much, Steve - 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
How to customize the pages of a DataTable, DataView or DataGrid.
Friends, there is some way to customize the pages of a DataTable, DataView or DataGrid, meaning that with each page to load only the data in memory at the time. please expect some response. Thank you very much. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-customize-the-pages-of-a-DataTable-DataView-or-DataGrid-tp2272728p2272728.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Model not Updating on Multiple Form Submits
Hi Jake, It sounds like you're not opposing that idea and suggesting that there actually is a bug, which is certainly possible. I would love to make a quickstart - but I'm not sure what you mean by that. I'm a long-time programmer, but new to Java web development/deployment. Can you point me to the correct tutorial? Probably what he Jeremy meant was you should create a minimal project, using [1], that exhibits the problem you mention. Many times while doing so people find out that the problem is their side of the fence... or else you they are able to reproduce the bug ... and then you have a minimal project you can pack in a zip and post it so that other developers can use it to verify you have found a bug and eventually fix it ... or else prove your were wrong assuming there was a bug;-) Best, Ernesto 1-http://wicket.apache.org/quickstart.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mulitple Forms in ListView
Not a best solution but it works:) final FeedbackPanel feedback = new FeedbackPanel(feedback, new ContainerFeedbackMessageFilter(form) { @Override public boolean accept(FeedbackMessage message) { return requiredTextField.getModel().equals(((RequiredTextField) message.getReporter()).getModel()); } }); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mulitple-Forms-in-ListView-tp2272668p2272729.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wiQuery grid row expander
Ahh missed that. Tx Ernesto, I will take a look at jq and see if I can help! J On Tue, Jun 29, 2010 at 10:57 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: John, See [1] and in particular the answer from Cemal (the one on Jun 16...) That might answer part of your question. Some time ago I have started [2], the implementation there is not that complete yet but at least it could give you a starting point. And, of course, patches and contributions are always welcome! Best, Ernesto 1-http://apache-wicket.1842946.n4.nabble.com/wiQuery-components-with-server-side-state-live-demo-tc1842975.html#none 2-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/jqgrid On Wed, Jun 30, 2010 at 6:34 AM, John Armstrong siber...@siberian.org wrote: Back in march there was a thread titled wiQuery components with server side state - live demo On that thread Richard Poway and I corresponded about a Grid Row Expander. I never saw the reply but in a recent google for this I can across a link he posted in that thread http://labs.jweekend.com/public/grid/GridRowExpanderPage This link is now password protected. Richard/anyone from jweekend : Does this link still exit? Tx! John- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Model not Updating on Multiple Form Submits
On Wed, Jun 30, 2010 at 9:24 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi Jake, It sounds like you're not opposing that idea and suggesting that there actually is a bug, which is certainly possible. I would love to make a quickstart - but I'm not sure what you mean by that. I'm a long-time programmer, but new to Java web development/deployment. Can you point me to the correct tutorial? Probably what he Jeremy meant was you should create a minimal project, using [1], that exhibits the problem you mention. Many times while doing so people find out that the problem is their side of the fence... or else you they are able to reproduce the bug ... and then you have a minimal project you can pack in a zip and post it so that other developers can use it to verify you have found a bug and eventually fix it ... or else prove your were wrong assuming there was a bug;-) Best, Ernesto 1-http://wicket.apache.org/quickstart.html And if you need more help, here: http://www.jeremythomerson.com/blog/2008/11/wicket-quickstart-tutorial/ -- Jeremy Thomerson http://www.wickettraining.com
Re: How to customize the pages of a DataTable, DataView or DataGrid.
On Wed, Jun 30, 2010 at 9:24 AM, adp adp1...@gmail.com wrote: Friends, there is some way to customize the pages of a DataTable, DataView or DataGrid, meaning that with each page to load only the data in memory at the time. please expect some response. Thank you very much. What do you mean? I don't understand the question. If you're saying can I make it load a single page at a time, the answer is yes. The data provider is responsible for doing that. -- Jeremy Thomerson http://www.wickettraining.com
Re: Links in DataTable
Can anyone explain to me why this does not work with AjaxFallbackDefaultDataTable, but does with DefaultDataTable. Does anyone know of a solution for this problem? On Mon, Jun 28, 2010 at 6:18 PM, Nelson Segura nsegu...@gmail.com wrote: Since AjaxLink is AJAX and not a proper link, then it does behave as a normal link, i.e. middle click (open link in new tab or new window) does not trigger the AJAX click even, which means you cannot chose to open the link in a new page. back to square one, except that know I know is a problem with AjaxFallbackDefaultDataTable, not with DataTable. -Nelson On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura nsegu...@gmail.com wrote: Jeremy, the code is below. I did notice something while researching/testing more. The LinkPanel solution DOES work for a DataTable. The problem starts when changed to a AjaxFallbackDefaultDataTable. I did testing based in the datatable example in the wicket examples. Maybe using an AjaxLink instead of a normal link in the table is the right answer. Code is mostly taken from the page linked in the original email public abstract class LinkPanelT extends Panel { private static final long serialVersionUID = 2062173455224348354L; public LinkPanel(final Item? item, final String componentId, final IModelT model, final String property) { super(componentId, model); AjaxLinkT link = new AjaxLinkT(linkCell) { private static final long serialVersionUID = 2574434147588617330L; @Override public void onClick(AjaxRequestTarget target) { LinkPanel.this.onClick(); } }; add(link); link.add(new Label(label, new PropertyModel(model,property))); } protected abstract void onClick(); } - Usage --- public class LinkPanelPage extends WebPage { public LinkPanelPage() { Form form = new Form(form); final LinkPanelListProvider provider = new LinkPanelListProvider(); ListIColumn columnList = new ArrayListIColumn(3); //columnList.add(new PropertyColumn(new Model(eMailAddress),eMailAddress)); columnList.add(new AbstractColumn(new Model(eMailAddress), eMailAddress) { private static final long serialVersionUID = -1822504503325964706L; @Override @SuppressWarnings(unchecked) public void populateItem(Item cellItem, String componentId, final IModel rowModel) { cellItem.add(new LinkPanel(cellItem, componentId, rowModel, getSortProperty()) { private static final long serialVersionUID = -4615958634366803506L; @Override protected void onClick() { System.out.println(clicked on link); } }); } }); columnList.add(new PropertyColumn(new Model(firstName),firstName)); columnList.add(new PropertyColumn(new Model(lastName),lastName)); AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable(link-panel-table, columnList, provider, 3); form.add(table); add(form); } } -Nelson On Mon, Jun 28, 2010 at 5:14 PM, Jeremy Thomerson jer...@wickettraining.com wrote: please show some code On Mon, Jun 28, 2010 at 6:39 PM, Nelson Segura nsegu...@gmail.com wrote: I am trying to create a table based on DataTable, in which one of the columns has links on it. I tried to use the strategy described here (LinkPanel): https://cwiki.apache.org/WICKET/adding-links-in-a-defaultdatatable.html But this has a problem: clicking in the links in succession soon causes component not found exceptions, or opening the link in a new window or tab renders the current page unusable, with the same exception. rg.apache.wicket.WicketRuntimeException: component . not found on page ... at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) ... I believe this is due to the fact that a new LinkPanel is created when rendering each column cell, and that when the click happens, the current LinkPanels are replaced by new ones, and so the original page is not usable anymore, because it is referring to the original LinkPanels. Our users make heavy use of opening links in a list in new pages or tabs, so this is a big deal for us :( Is there any solution for this problem? The only one I can think of is to use AjaxLink instead, but I am not sure whether
Request for how to process incoming E-mails on Google App Engine
I am developing a Wicket application on Google App Engine for Java (GAE/J). I want to process incoming E-mails, which GAE/J routes to addr...@[gae application ID].appspotmail.com by sending a HTTP POST request to the application-relative URL: /_ah/mail/[addr...@[gae application ID].appspotmail.com] Can anyone tell me how I can adjust my web.xml file and WebApplication-derived class so that I can use a filter to launch some Java code on E-mail reception? Google suggests that this code should include the fragment import java.io.IOException; import java.util.Properties; import javax.mail.Session; import javax.mail.internet.MimeMessage; import javax.servlet.http.*; public class MailHandlerServlet extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); MimeMessage message = new MimeMessage(session, req.getInputStream()); ... } } which I may need to access the details of the E-mail message. Any pointers that people could give me would be much appreciated! Regards, Ian Marshall -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Request-for-how-to-process-incoming-E-mails-on-Google-App-Engine-tp2272758p2272758.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Links in DataTable
Put this into WicketApplication.java @Override protected void init() { super.init(); getPageSettings().setAutomaticMultiWindowSupport(true); } Problem was, that you opened new windows in same page map. I cannot explain it better cause, i don't understand page maps very well... On 06/30/2010 07:40 PM, Nelson Segura wrote: I am attaching a Quickstart project to help reproduce the problem. On the home page, middle click in the email address shown (usually this will take a user to a detail page, but in this case it just prints a message). After that, any click on a link in the page will cause a component not found exception. Thanks for all your help. -Nelson On Wed, Jun 30, 2010 at 9:18 AM, Nelson Segura nsegu...@gmail.com mailto:nsegu...@gmail.com wrote: Can anyone explain to me why this does not work with AjaxFallbackDefaultDataTable, but does with DefaultDataTable. Does anyone know of a solution for this problem? On Mon, Jun 28, 2010 at 6:18 PM, Nelson Segura nsegu...@gmail.com mailto:nsegu...@gmail.com wrote: Since AjaxLink is AJAX and not a proper link, then it does behave as a normal link, i.e. middle click (open link in new tab or new window) does not trigger the AJAX click even, which means you cannot chose to open the link in a new page. back to square one, except that know I know is a problem with AjaxFallbackDefaultDataTable, not with DataTable. -Nelson On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura nsegu...@gmail.com mailto:nsegu...@gmail.com wrote: Jeremy, the code is below. I did notice something while researching/testing more. The LinkPanel solution DOES work for a DataTable. The problem starts when changed to a AjaxFallbackDefaultDataTable. I did testing based in the datatable example in the wicket examples. Maybe using an AjaxLink instead of a normal link in the table is the right answer. Code is mostly taken from the page linked in the original email public abstract class LinkPanelT extends Panel { private static final long serialVersionUID = 2062173455224348354L; public LinkPanel(final Item? item, final String componentId, final IModelT model, final String property) { super(componentId, model); AjaxLinkT link = new AjaxLinkT(linkCell) { private static final long serialVersionUID = 2574434147588617330L; @Override public void onClick(AjaxRequestTarget target) { LinkPanel.this.onClick(); } }; add(link); link.add(new Label(label, new PropertyModel(model,property))); } protected abstract void onClick(); } - Usage --- public class LinkPanelPage extends WebPage { public LinkPanelPage() { Form form = new Form(form); final LinkPanelListProvider provider = new LinkPanelListProvider(); ListIColumn columnList = new ArrayListIColumn(3); //columnList.add(new PropertyColumn(new Model(eMailAddress),eMailAddress)); columnList.add(new AbstractColumn(new Model(eMailAddress), eMailAddress) { private static final long serialVersionUID = -1822504503325964706L; @Override @SuppressWarnings(unchecked) public void populateItem(Item cellItem, String componentId, final IModel rowModel) { cellItem.add(new LinkPanel(cellItem, componentId, rowModel, getSortProperty()) { private static final long serialVersionUID = -4615958634366803506L; @Override protected void onClick() { System.out.println(clicked on link); } }); } }); columnList.add(new PropertyColumn(new Model(firstName),firstName)); columnList.add(new PropertyColumn(new Model(lastName),lastName)); AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable(link-panel-table, columnList, provider, 3); form.add(table); add(form); } }
Re: Links in DataTable
and i forgot this in the onclick handler : @Override protected void onClick() { setResponsePage(new HomePage(parameters)); System.out.println(clicked on link); } On 06/30/2010 07:59 PM, Branislav Kalas wrote: Put this into WicketApplication.java @Override protected void init() { super.init(); getPageSettings().setAutomaticMultiWindowSupport(true); } Problem was, that you opened new windows in same page map. I cannot explain it better cause, i don't understand page maps very well... On 06/30/2010 07:40 PM, Nelson Segura wrote: I am attaching a Quickstart project to help reproduce the problem. On the home page, middle click in the email address shown (usually this will take a user to a detail page, but in this case it just prints a message). After that, any click on a link in the page will cause a component not found exception. Thanks for all your help. -Nelson On Wed, Jun 30, 2010 at 9:18 AM, Nelson Segura nsegu...@gmail.com mailto:nsegu...@gmail.com wrote: Can anyone explain to me why this does not work with AjaxFallbackDefaultDataTable, but does with DefaultDataTable. Does anyone know of a solution for this problem? On Mon, Jun 28, 2010 at 6:18 PM, Nelson Segura nsegu...@gmail.com mailto:nsegu...@gmail.com wrote: Since AjaxLink is AJAX and not a proper link, then it does behave as a normal link, i.e. middle click (open link in new tab or new window) does not trigger the AJAX click even, which means you cannot chose to open the link in a new page. back to square one, except that know I know is a problem with AjaxFallbackDefaultDataTable, not with DataTable. -Nelson On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura nsegu...@gmail.com mailto:nsegu...@gmail.com wrote: Jeremy, the code is below. I did notice something while researching/testing more. The LinkPanel solution DOES work for a DataTable. The problem starts when changed to a AjaxFallbackDefaultDataTable. I did testing based in the datatable example in the wicket examples. Maybe using an AjaxLink instead of a normal link in the table is the right answer. Code is mostly taken from the page linked in the original email public abstract class LinkPanelT extends Panel { private static final long serialVersionUID = 2062173455224348354L; public LinkPanel(final Item? item, final String componentId, final IModelT model, final String property) { super(componentId, model); AjaxLinkT link = new AjaxLinkT(linkCell) { private static final long serialVersionUID = 2574434147588617330L; @Override public void onClick(AjaxRequestTarget target) { LinkPanel.this.onClick(); } }; add(link); link.add(new Label(label, new PropertyModel(model,property))); } protected abstract void onClick(); } - Usage --- public class LinkPanelPage extends WebPage { public LinkPanelPage() { Form form = new Form(form); final LinkPanelListProvider provider = new LinkPanelListProvider(); ListIColumn columnList = new ArrayListIColumn(3); //columnList.add(new PropertyColumn(new Model(eMailAddress),eMailAddress)); columnList.add(new AbstractColumn(new Model(eMailAddress), eMailAddress) { private static final long serialVersionUID = -1822504503325964706L; @Override @SuppressWarnings(unchecked) public void populateItem(Item cellItem, String componentId, final IModel rowModel) { cellItem.add(new LinkPanel(cellItem, componentId, rowModel, getSortProperty()) { private static final long serialVersionUID = -4615958634366803506L; @Override protected void onClick() { System.out.println(clicked on link); } }); } }); columnList.add(new PropertyColumn(new Model(firstName),firstName)); columnList.add(new PropertyColumn(new Model(lastName),lastName));
Refreshing modal window
Hi, My problem is that after the user clicks AjaxSubmit button, and the confirmation message is displayed in feedback panel, the window does not refresh, so if the user scrolled to the bottom of the model window, he/she does not see the confirmation message. How can I get the modal window to refresh, so the top part of the window is visible? Thanks, Anna
org.apache.wicket.WicketRuntimeException: Unable to write the response
Hello, I have just noticed that the various components I have that render the same underlying data, when the exception occurs, then they all have a different instance of the underlying data. I have used: add(new CompnentX(getSession().getMyData())) so they were all constructed with the same data from the session object (final reference). However, after the exception occurs, different components have different underlying data. I have a workaround, before rendering I have to call things replace(new CompnentX(getSession().getMyData())), this is a workaround. Not sure what's happening and why I have to sprinkle the code with replace or for listviews setList before rendering is suffiicient. Thanks and best regards, Tommaso - Original Message - From: Tommy To: users@wicket.apache.org Sent: Tuesday, June 29, 2010 10:57 PM Subject: Re: org.apache.wicket.WicketRuntimeException: Unable to write the response Martjin, Thanks, I suppose that solves part of my problem. The wait is only 1 sec or so, so using a lazy panel is a great idea, but does not eliminate my underliying problem. For instance the user can still press the refresh button causing the same exception and the same problem (some sort of corruption, things do not work well anymore, for example I have various wicket-ids that render differently but based on the same data and some of those stop rendering consistent things). As I am not familiar with wicket yet, I am struggling to understand what's happening under the hood. I am also not too familiar with the threading model. However, I am not even sure it's concurrency problem yet. Some of those parts using the same data that I have mentioned above are JFreeCharts and if I take those out, then the problem seems to go away completely. Even by putting a sleep 1000 in the rendering code for the list view (table), I cannot reproduce the problem (and not even the exception to be fair). JFreeChartImage extends Image and I took the sample from https://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html Thanks, Tommy - Original Message - From: Martijn Dashorst To: users@wicket.apache.org Sent: Tuesday, June 29, 2010 8:05 AM Subject: Re: org.apache.wicket.WicketRuntimeException: Unable to write the response Don't let the user wait. Use a lazy panel to render the long stuff in the background, or if it even takes longer than that, calculate your model data in a background thread and use a timer to poll and see if the thread has finished, and use the result in a panel that you replace on your page. Martijn On Tue, Jun 29, 2010 at 8:45 AM, Tommy wrote: Hello, This is my first post. I am not a web developer, I usually develop other kinds of systems, but for a quick project I have to do, I looked at JSF and I really did not like it. Finally, I have come across wicket and it was love at first sight. Now, so far everything has been straightforward, but I am now facing the first puzzle... I have a page that takes a while to render and, while it's rendering, if the user does anything, then I get: org.apache.wicket.WicketRuntimeException: Unable to write the response at org.apache.wicket.Response.handleException(Response.java:286) at org.apache.wicket.Response.write(Response.java:310) at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:160) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) etc ... Caused by: EOFException(java.net.SocketException: Connection reset by peer: socket write error) at org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java:195) at org.mortbay.util.ByteBufferOutputStream.ensureSpareCapacity(ByteBufferOutputStream.java:342) at org.mortbay.util.ByteBufferOutputStream.write(ByteBufferOutputStream.java:182) at org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java:135) at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:442) at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:42) at org.apache.wicket.util.io.Streams.copy(Streams.java:121) at org.apache.wicket.util.io.Streams.copy(Streams.java:88) at org.apache.wicket.Response.write(Response.java:306) ... 23 more 00:39:32.335 WARN!! Invalid length: Content-Length=9491 written=4096 for http://127.0.0.1:8081/quickstart/app/ ERROR - WicketFilter - closing the buffer error
3.5 Hibernate 1.1 tutorial wicketized/eclipseized
Hello, mostly of interest to wicket noobs: i have a wicketized/eclipseized hibernate 1.1 tutorial that should work out-of-the-box albeit for mysql only. Where to upload the project? Or, I can put it on my blog for download? :-David. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Links in DataTable
Thanks for your answers. I set the multi window support settings to true, and that did not make a difference. Interestingly, the javadoc shows that multiwindow support is true by default. I also tried setting it to false, with no luck. However, setting the response to a new page on click seems to conserve the original page usability. My guess is because a new page is then created, so the current page is still valid, and the elements on it are still valid. I am trying a bookmarkable page link instead of the onclick event, which seems to work, except that the AJAX actions (example paging) in the original page return an expired page message. Still investigating, if anyone has more information it will be greatly appreciated. I am working in migrating an existing large JSP/Servlet/Struts app to Wicket, and the pattern, that is open new detail windows or tabs from a AJAX list, is heavily used by our customers. So I have to find a way to solve this issue without limiting existing functionality. Sadly, I am pretty new to wicket, so I dont know the internals of why a page should loses its containers or expires in this cases. -Nelson On Wed, Jun 30, 2010 at 11:14 AM, Branislav Kalas bka...@gmail.com wrote: and i forgot this in the onclick handler : @Override protected void onClick() { setResponsePage(new HomePage(parameters)); System.out.println(clicked on link); } On 06/30/2010 07:59 PM, Branislav Kalas wrote: Put this into WicketApplication.java @Override protected void init() { super.init(); getPageSettings().setAutomaticMultiWindowSupport(true); } Problem was, that you opened new windows in same page map. I cannot explain it better cause, i don't understand page maps very well... On 06/30/2010 07:40 PM, Nelson Segura wrote: I am attaching a Quickstart project to help reproduce the problem. On the home page, middle click in the email address shown (usually this will take a user to a detail page, but in this case it just prints a message). After that, any click on a link in the page will cause a component not found exception. Thanks for all your help. -Nelson On Wed, Jun 30, 2010 at 9:18 AM, Nelson Segura nsegu...@gmail.commailto: nsegu...@gmail.com wrote: Can anyone explain to me why this does not work with AjaxFallbackDefaultDataTable, but does with DefaultDataTable. Does anyone know of a solution for this problem? On Mon, Jun 28, 2010 at 6:18 PM, Nelson Segura nsegu...@gmail.com mailto:nsegu...@gmail.com wrote: Since AjaxLink is AJAX and not a proper link, then it does behave as a normal link, i.e. middle click (open link in new tab or new window) does not trigger the AJAX click even, which means you cannot chose to open the link in a new page. back to square one, except that know I know is a problem with AjaxFallbackDefaultDataTable, not with DataTable. -Nelson On Mon, Jun 28, 2010 at 5:47 PM, Nelson Segura nsegu...@gmail.com mailto:nsegu...@gmail.com wrote: Jeremy, the code is below. I did notice something while researching/testing more. The LinkPanel solution DOES work for a DataTable. The problem starts when changed to a AjaxFallbackDefaultDataTable. I did testing based in the datatable example in the wicket examples. Maybe using an AjaxLink instead of a normal link in the table is the right answer. Code is mostly taken from the page linked in the original email public abstract class LinkPanelT extends Panel { private static final long serialVersionUID = 2062173455224348354L; public LinkPanel(final Item? item, final String componentId, final IModelT model, final String property) { super(componentId, model); AjaxLinkT link = new AjaxLinkT(linkCell) { private static final long serialVersionUID = 2574434147588617330L; @Override public void onClick(AjaxRequestTarget target) { LinkPanel.this.onClick(); } }; add(link); link.add(new Label(label, new PropertyModel(model,property))); } protected abstract void onClick(); } - Usage --- public class LinkPanelPage extends WebPage { public LinkPanelPage() { Form form = new Form(form); final LinkPanelListProvider provider = new LinkPanelListProvider(); ListIColumn columnList = new ArrayListIColumn(3); //columnList.add(new
Re: Refreshing modal window
Are you refreshing the whole window or just the feedback panel? You can try to refresh the whole window, or you can include some java script that scrolls your window to the top on the ajax response. -Nelson On Wed, Jun 30, 2010 at 12:22 PM, Anna Simbirtsev asimbirt...@gmail.comwrote: Hi, My problem is that after the user clicks AjaxSubmit button, and the confirmation message is displayed in feedback panel, the window does not refresh, so if the user scrolled to the bottom of the model window, he/she does not see the confirmation message. How can I get the modal window to refresh, so the top part of the window is visible? Thanks, Anna
Re: How to customize the pages of a DataTable, DataView or DataGrid.
I need to implement a data table in wicket with load on demand. The problem in use the existent implementations is that they load in advance all data and if that data contains a lot of rows, it may produce memory errors. Then, I need find (if it exists) a way to implement the load on demand (load by each page) Thanks in advance! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-customize-the-pages-of-a-DataTable-DataView-or-DataGrid-tp2272728p2274194.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to customize the pages of a DataTable, DataView or DataGrid.
You don't have to load all the data. You can page the data in your data provider. On Wed, Jun 30, 2010 at 4:35 PM, adp adp1...@gmail.com wrote: I need to implement a data table in wicket with load on demand. The problem in use the existent implementations is that they load in advance all data and if that data contains a lot of rows, it may produce memory errors. Then, I need find (if it exists) a way to implement the load on demand (load by each page) Thanks in advance! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-customize-the-pages-of-a-DataTable-DataView-or-DataGrid-tp2272728p2274194.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to customize the pages of a DataTable, DataView or DataGrid.
loading page by page is fully supported by DefaultDataTable or AjaxFallbackDefaultDataTable via IDataProvider interface. Did you have a look at those? Ernesto On Wed, Jun 30, 2010 at 10:35 PM, adp adp1...@gmail.com wrote: I need to implement a data table in wicket with load on demand. The problem in use the existent implementations is that they load in advance all data and if that data contains a lot of rows, it may produce memory errors. Then, I need find (if it exists) a way to implement the load on demand (load by each page) Thanks in advance! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-customize-the-pages-of-a-DataTable-DataView-or-DataGrid-tp2272728p2274194.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Refreshing modal window
I need to scroll to the top on ajax response. Would you have an example on how to do it? On Wed, Jun 30, 2010 at 4:27 PM, Nelson Segura nsegu...@gmail.com wrote: Are you refreshing the whole window or just the feedback panel? You can try to refresh the whole window, or you can include some java script that scrolls your window to the top on the ajax response. -Nelson On Wed, Jun 30, 2010 at 12:22 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: Hi, My problem is that after the user clicks AjaxSubmit button, and the confirmation message is displayed in feedback panel, the window does not refresh, so if the user scrolled to the bottom of the model window, he/she does not see the confirmation message. How can I get the modal window to refresh, so the top part of the window is visible? Thanks, Anna -- Anna Simbirtsev (416) 729-7331
Re: How to customize the pages of a DataTable, DataView or DataGrid.
Now I'll review it. Thank you. if you have any information about this, please send me. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-customize-the-pages-of-a-DataTable-DataView-or-DataGrid-tp2272728p2274247.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wiQuery grid row expander
John, I just uploaded an small demo of [1] to [2]. Please ping me offline if you want to contribute to the project. Best, Ernesto 1-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/j 2-http://wiquery-plugins-demo.appspot.com/demo/ On Wed, Jun 30, 2010 at 4:56 PM, John Armstrong siber...@siberian.org wrote: Ahh missed that. Tx Ernesto, I will take a look at jq and see if I can help! J On Tue, Jun 29, 2010 at 10:57 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: John, See [1] and in particular the answer from Cemal (the one on Jun 16...) That might answer part of your question. Some time ago I have started [2], the implementation there is not that complete yet but at least it could give you a starting point. And, of course, patches and contributions are always welcome! Best, Ernesto 1-http://apache-wicket.1842946.n4.nabble.com/wiQuery-components-with-server-side-state-live-demo-tc1842975.html#none 2-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/jqgrid On Wed, Jun 30, 2010 at 6:34 AM, John Armstrong siber...@siberian.org wrote: Back in march there was a thread titled wiQuery components with server side state - live demo On that thread Richard Poway and I corresponded about a Grid Row Expander. I never saw the reply but in a recent google for this I can across a link he posted in that thread http://labs.jweekend.com/public/grid/GridRowExpanderPage This link is now password protected. Richard/anyone from jweekend : Does this link still exit? Tx! John- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Generating static HTML pages with Wicket
OK thanks. I managed to work something out by fiddling with the BaseWicketTester class. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generating-static-HTML-pages-with-Wicket-tp2271517p2274291.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
open Modal Window without AjaxRequestTarget
Hello, I'm well aware of https://issues.apache.org/jira/browse/WICKET-12 but I can't figure out how to open a modal window without an AjaxRequestTarget. My guess is that it's related to getWindowOpenJavascript() but is there any example available, please? I use Wicket 1.4.9. Thanks in advance, Pierre Goupil -- Les deux règles universelles du bide : 1) on n'explique pas un bide 2) dans le futur, un bide sera toujours un bide.
Re: Asynchronous tree
Hi Bilgin, I'm currently experimenting with something similar in wicket-tree: http://code.google.com/p/wicket-tree/source/browse/trunk/wicket-tree-examples/src/main/java/wickettree/examples/TimeoutPage.java Perhaps it gives you a start. Try it out here: http://wicket-tree.appspot.com/future Feedback is welcome. Regards Sven On 06/29/2010 10:02 AM, Bilgin Ibryam wrote: Hi, Is there any wicket tree component which loads its children nodes asynchronously ie after expanding a branch - children are loaded with ajax? I need this in order to prevent the long initial delay, caused by loading all the nodes. In the examples I saw, all the child nodes were loaded at the beginning. Bilgin Ibryam - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Refreshing modal window
To execute javascript after AJAX, do the following ajaxRequestTarget.appendJavascript(alert('hello');); To jump to a section using javascript use window.location.hash = '#idname'; You can put a #top anchor on top of your window, and then jump to it using the combination of code above. I have not tried this myself, though :) ajaxRequestTarget.appendJavascript(window.location.hash = '#top';); -Nelson On Wed, Jun 30, 2010 at 1:54 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: I need to scroll to the top on ajax response. Would you have an example on how to do it? On Wed, Jun 30, 2010 at 4:27 PM, Nelson Segura nsegu...@gmail.com wrote: Are you refreshing the whole window or just the feedback panel? You can try to refresh the whole window, or you can include some java script that scrolls your window to the top on the ajax response. -Nelson On Wed, Jun 30, 2010 at 12:22 PM, Anna Simbirtsev asimbirt...@gmail.com wrote: Hi, My problem is that after the user clicks AjaxSubmit button, and the confirmation message is displayed in feedback panel, the window does not refresh, so if the user scrolled to the bottom of the model window, he/she does not see the confirmation message. How can I get the modal window to refresh, so the top part of the window is visible? Thanks, Anna -- Anna Simbirtsev (416) 729-7331 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Request for how to process incoming E-mails on Google App Engine
Just map the servlet that Google gives you in the way that you would normally map any servlet in web.xml. This is not Wicket specific. On Wed, Jun 30, 2010 at 12:28 PM, Ian Marshall ianmarshall...@gmail.comwrote: I am developing a Wicket application on Google App Engine for Java (GAE/J). I want to process incoming E-mails, which GAE/J routes to addr...@[gae application ID].appspotmail.com by sending a HTTP POST request to the application-relative URL: /_ah/mail/[addr...@[gae application ID].appspotmail.com] Can anyone tell me how I can adjust my web.xml file and WebApplication-derived class so that I can use a filter to launch some Java code on E-mail reception? Google suggests that this code should include the fragment import java.io.IOException; import java.util.Properties; import javax.mail.Session; import javax.mail.internet.MimeMessage; import javax.servlet.http.*; public class MailHandlerServlet extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); MimeMessage message = new MimeMessage(session, req.getInputStream()); ... } } which I may need to access the details of the E-mail message. Any pointers that people could give me would be much appreciated! Regards, Ian Marshall -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Request-for-how-to-process-incoming-E-mails-on-Google-App-Engine-tp2272758p2272758.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://www.wickettraining.com
Re: Links in DataTable
On Wed, Jun 30, 2010 at 1:14 PM, Branislav Kalas bka...@gmail.com wrote: and i forgot this in the onclick handler : @Override protected void onClick() { setResponsePage(new HomePage(parameters)); System.out.println(clicked on link); } The whole point of a constructor that takes PageParameters is to use it with a bookmarkable URL, which you've avoided by creating an instance of a page that must be redirected to. Your code should say: setResponsePage(getApplication().getHomePage(), parameters); -- Jeremy Thomerson http://www.wickettraining.com
Re: debugging PageExpiredExceptions
ver 1.3.6 I have been tracking this issue for a few months now in our app. Similar to the following threads: http://apache-wicket.1842946.n4.nabble.com/PageExpiredException-getting-this-when-the-session-hasn-t-timeout-td1894202.html#a1894216 PageExpiredException - getting this when the session hasn't timeout http://apache-wicket.1842946.n4.nabble.com/PageExpiredException-on-ajax-calls-if-apps-pages-are-opened-in-different-tabs-td1884182.html#a1884182 PageExpiredException on ajax calls if apps pages are opened in different tabs http://apache-wicket.1842946.n4.nabble.com/Using-AbstractDefaultAjaxBehavior-on-a-Bookmarkable-page-td1861596.html Using AbstractDefaultAjaxBehavior on a Bookmarkable page? Our design goal is a simple RESTful page navigation with moderate AJAX interactions on the pages (join/leave groups, rate items, connect to people, etc). If a user refreshes the page or clicks the back button we simply repaint the page using whatever state the spring beans return. We are using IndexedParamUrlCodingStrategy and have implemented a relatively simple navigation infrastructure using simple href/get requests with manually generated links eg: http://server/web/common/profilehome/userxyz Where 'common' is the mount name and userxyz is parameter 0. So far so good. The pages are stateless and automaticWindowSupport = false (we can't have the additional parameters on our URL) I have been seeing these exceptions for a while : - Cannot find the rendered page in session - The target page does not exist anymore I thought the issue was limited to a cached page not matching the current state so I implemented a temporary hack in order to improve the user experience (it was getting very common) by intercepting the PEE and redirecting to the current request URL (i.e. trigger a page refresh) which really calmed things down from a user experience perspective but the messages kept coming in. It turns out that isn't the only source of these messages as it seems to be related to using AJAX behaviors on stateless pages causing the pagemap to either lose or remove references to certain pages so that when an AJAX request comes in the requesting URL is no longer valid (if http://apache-wicket.1842946.n4.nabble.com/Using-AbstractDefaultAjaxBehavior-on-a-Bookmarkable-page-td1861596.html I understand the previous thread ) I see a few possible paths forward and would like to get some feedback from the community on them and to see if there is additional information you can share to help me out here. 1) I looked at the technique in this blog post: http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html Wicket extreme consistent URLs and it looks like it may be a possibility but unfortunately we are using indexed parameters and the technique is based on named parameters so it would mean quite a bit of work to rework our navigation implementation so I am reluctant to venture to far down that path until it is either confirmed by someone here or we run out of other options 2) Is there some setting or pagemap configuration that I don't know about that would either keep the pages in the store or 'turn off' the page map altogether? 3) Convert our AJAX calls from wicket based to a more generic 'servlet' style so that we would construct the AJAX target URL ourselves to remove the dependency on the native wicket url and hopefully bypass the pagemap reference altogether. Would this 'solve' the problem? It would also be quite a lot of work but we have been moving in this direction for a while now anyway in order to get more control over our AJAX for performance reasons so if this sounds like a viable way to avoid the PEEs then at least we would be able to commit to it and get on with fixing it. Wicket has been very good to us for a couple of years but now that I am trying to implement a 'real' fix I am concerned I may have made a big architecture mistake given the heavy emphasis on state with Wicket. Hopefully there is a magic bullet out there someone can share. Thanks, Sean -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/debugging-PageExpiredExceptions-tp1882040p2274494.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Rerender modal window fields without ajaxtargetrequest
Hi, AjaxSubmitLink removeLink = new AjaxSubmitLink(removeLink) { @Override public void onSubmit(AjaxTargetRequest target) { MyPanel.this.replaceWith(new ConfirmDeletePanel( MyPanel.this.getId(), are you sure) { @Override protected void onCancel() { this.replaceWith(MyPanel.this); } @Override protected void onConfirm() { // do something you want confirmed beforehand // then this.replaceWith(MyPanel.this); } }); } }; In onConfirm function of ConfirmDeletePanel, how can I rerender some fields in the MyPanel.this after it is replaced back if i don't have AjaxTargetRequest? I mean onConfirm changes the values that are displayed on MyPanel and I want to refresh them. Thanks Anna
Wicket Sessions and Load Balancing
Hi, I just setup my production environment for a wicket-based application today and I am having a problem with Page Expired messages. I have three servers that are not clustered together, but rather are configured with Apache's proxy_balancer to use sticky sessions (with failover turned off.) The homepage always loads, but a high percentage of the time when I enter the second page of my application I receive a Page Expired page - clicking on that takes me back to the home page and then the application works. My guess is that when the homepage is loaded that Wicket provides a new jsessionid (I sometimes see it coming in the submission url) but then the user is directed to another server on the next request, and because the user does not yet have a JSESSIONID cookie, but does have the jsessionid in the URL, the Wicket instance that receives the request searches and cannot find the session id and marks the page as expired. The next request then populates the browser's cookie and the sticky session works.This is just a theory, but it would explain the behavior. I thought I handled this case in the proxy_balancer configuration with an entry like the following: ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On Where JSESSIONID|jsessionid covers the cookie and encoded path, respectively, and the nofailover=On tells Apache to not to try to fail a user's session over to antoher server. Has anyone faced this problem? Any ideas on how to resolve it? And we're going to start allow production load very shortly, so any insight would be much appreciated! Thanks Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to pass parameters to javascript function?
or let your page implemen IHeaderResponseContributor -igor On Tue, Jun 29, 2010 at 8:57 PM, Jeremy Thomerson jer...@wickettraining.com wrote: On Tue, Jun 29, 2010 at 9:44 PM, Gustavo Henrique gustavo...@gmail.comwrote: Hi! I need to put in the page a javascript function with name and Id of customer. I'm using a label component because I don't know others solutions. Any idea? Thanks! AbstractBehavior#renderHead -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: question about adding synchronized on mountsOnPath at WebRequestCodingStrategy
did it reduce it or is the hotspot completely gone? -igor On Wed, Jun 30, 2010 at 3:38 AM, dannyboy danny.bolla...@gmail.com wrote: Optimization helped! Thank you for fixing it. Kind regards, Danny -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/question-about-adding-synchronized-on-mountsOnPath-at-WebRequestCodingStrategy-tp1878901p2272701.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: difference between getSession().getLocale() and getRequest().getLocale()
not sure why they would be different unless you explicitly change it in Session. when the session is created it sets its locale from the request by default: public Session(Request request) { ... locale = request.getLocale(); ... } -igor On Wed, Jun 30, 2010 at 2:02 AM, David Meulemans meulemans.da...@gmail.com wrote: Hi I've noticed a difference in getting the locale from the request and from the session. getSession().getLocale() shows en but getRequest().getLocale() shows en_GB. thus not only the language but also the country. Why is this, or what am I doing wrong perhaps? Are there maybe other drawbacks related to the use of one of these? I'm using wicket 1.4.1 grtz - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mulitple Forms in ListView
Thank you for providing a solution to that. It not so much of the solution I am looking for. I am curious why it didn't work out of the box for non-Ajax submit but it works for AjaxSubmitLink. Basically the code to determine if the FormComponent is the child of the container is the same but for some reasons it didn't work out for non-Ajax submit. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mulitple-Forms-in-ListView-tp2272668p2274628.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to override container markup package loaction?
How does one override container markup package loaction? If I provide mysite.wicket.pages for my Java Wicket components, then the html markup must be in the same package. I want the HTML to live in html. So how can I override mysite.wicket.pages with html when wicket searches for components? thanks, Arjun -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-override-container-markup-package-loaction-tp2274647p2274647.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org