Re: Why isn't my stateless form recreated from page parameters automatically?
Hi it seems that item.add(new TextField("itemId", new PropertyModel(item.**getModel(), "itemId"))); should be item.add(new TextField("itemId", new PropertyModel(item.**getModelObject(), "itemId"))); Joe On Mon, Aug 1, 2011 at 6:35 PM, Mike Mander wrote: > Hi, > > i would like to build up a stateless page for collecting an itemId and an > amount from my user. > The website should act as a direct shopping formular. The user only should > insert the data > and on form submission the itemId is checked for existence. > A helper button should clear the field values from the appropriate row. All > has to work > without any javascript. > > My intention was that i create the stateless page, present it to the user, > collect the data, > submit the form, clear the row data and present the stateless page again to > the user > with data in row cleared. But i don't get it to work. > > My question: If i post the form an page is coming back everything is > recreated and the values > from the page parameters are not deployed to appropriate components > automatically. > Do i have to do this by hand? Or is there a way? > > I use wicket 1.4.17. > > Thanks for helping me > Mike > > > HomePage.java > import java.util.Arrays; > import java.util.List; > > import org.apache.wicket.**PageParameters; > import org.apache.wicket.devutils.**stateless.StatelessComponent; > import org.apache.wicket.markup.html.**WebPage; > import org.apache.wicket.markup.html.**form.Button; > import org.apache.wicket.markup.html.**form.StatelessForm; > import org.apache.wicket.markup.html.**form.TextField; > import org.apache.wicket.markup.html.**list.ListItem; > import org.apache.wicket.markup.html.**list.ListView; > import org.apache.wicket.model.**PropertyModel; > > @StatelessComponent > public class HomePage extends WebPage { > >public HomePage(final PageParameters parameters) { >super(parameters); >final StatelessForm form; >add(form = (StatelessForm) new StatelessForm("form")); >form.add(new ListView("item", items()) { > >@Override >protected void populateItem(final ListItem item) { >item.add(new TextField("itemId", new > PropertyModel(item.**getModel(), "itemId"))); >item.add(new TextField("amount", new > PropertyModel(item.**getModel(), "amount"))); >item.add(new Button("clearContent") { >@Override >public void onSubmit() { >item.getModelObject().clear(); >} >}); >} >}.setReuseItems(true)); >} > >private List items() { >return Arrays.asList(new ItemModel(0), new ItemModel(1)); >} > } > > > ItemModel.java > > import org.apache.wicket.util.string.**Strings; > > public class ItemModel { > >private String _itemId = null; >private int _amount = 1; >private int _pos = 0; > >public ItemModel(int pos) { >_pos = pos; >System.out.println(this); >} > >public ItemModel(String key) { >if (!Strings.isEmpty(key)) { >String[] parts = key.split("-"); >setPos(Integer.valueOf(parts[**0]).intValue()); >setItemId(String.valueOf(**parts[1])); >setAmount(Integer.valueOf(**parts[2]).intValue()); >} >} > >public int getAmount() { >return _amount; >} > >public void setAmount(int amount) { >_amount = amount; >} > >public String getItemId() { >return _itemId; >} > >public void setItemId(String itemId) { >_itemId = itemId; >} > >public int getPos() { >return _pos; >} > >public void setPos(int pos) { >_pos = pos; >} > >public String createKey() { >StringBuilder key = new StringBuilder().append(getPos(** > )).append("-").append(**getItemId()).append("-").**append(getAmount()); >return key.toString(); >} > >public void clear() { >setItemId(null); >setAmount(1); >} > } > > > HomePage.html > > http://wicket.**apache.org/dtds.data/wicket-** > xhtml1.4-strict.dtd<http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd>" > > > > Wicket Quickstart Archetype Homepage > > > Wicket Quickstart Archetype Homepage > > Home > > > > Item > Amount > Clear content > > > > > > > > > > > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@wicket.**apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Fragment caching???
Hi is there something equivelant to fragment caching in wicket? I mean , is there any way to cache the generated markup of a component, and on subsequent requests it just render this markup string? if so, how one can store these fragments in external store? how that can be configured or plugged in? to use some central caching like redis or memcached thanks Joe
Re: serialization problem with spring
Hi actually for testing , i tried using the new kryo-serializer from wicket stuff IT DOES NOT WORK, actually it has many more errors than the default one, actuallly it cannot serialize a JdkDynamicProxy which is the basis for injection If someone have a solution or workaround , please help Thanks Joe On Mon, Aug 1, 2011 at 8:10 AM, Joe Fawzy wrote: > Hi > > i am living on the edge ,using wicket 1.5RC5.1 (the latest) > and also using the newly released Spring data-jpa project for data access > > i do not use or reference PersistenceExceptionTranslationInterceptor > directly, actually i never know it is there till i saw that error > > based on its name it is an interceptor which translate the jpa or jdbc > exception to spring's counterpart > > in AccountManager there is an instance of AccountDAO which use this > persistence technology > > i thought it might be a solution to use kryo serialization as it does not > require the object to be serializable, but the site does not recommend using > it in production as it is in its early stages and not yet stable > > Any help please? > > Thanks > > Joe > > On Mon, Aug 1, 2011 at 4:35 AM, Dan Retzlaff wrote: > >> Hi Joe, >> >> Based on the depth of that serialization stack, I doubt it's your >> AccountManager proxy that's giving you problems. I usually just breakpoint >> NotSerializableException and walk up the stack to find the culprit. Any >> change your CreatePage uses a method on AccountManager that returns an >> object with PersistenceExceptionTranslationInterceptor, then holds a >> reference to it? If so, that'll be a problem since Wicket doesn't know to >> proxy that one. >> >> Dan >> >> On Sun, Jul 31, 2011 at 5:08 PM, Joe Fawzy wrote: >> >> > Hi >> > i have a serialization problem with spring >> > My CreatePage class looks like:- >> > >> > public class CreatePage extends WebPage{ >> >@SpringBean >> >AccountManager accountManager; >> > } >> > >> > as i am using @SpringBean , it should handle creating a serializable >> proxy >> > for me BUT >> > >> > i got the following exception >> > >> > >> > >> > ERROR - JavaSerializer - Error serializing object class >> > com.app.view.account.CreatePage [object=[Page class = >> > com.app.view.account.CreatePage, id = 1, render count = 1]] >> > java.io.NotSerializableException: >> > >> org.springframework.dao.support.PersistenceExceptionTranslationInterceptor >> > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) >> > at >> > >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) >> > at >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) >> > at >> > >> > >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) >> > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) >> > at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) >> > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) >> > at >> > >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) >> > at >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) >> > at >> > >> > >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) >> > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) >> > at >> > >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) >> > at >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) >> > at >> > >> > >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) >> > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) >> > at >> > >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) >> > at >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) >> > at >> > >> > >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) >> > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) >> > at >> > >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) >> > at >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
Re: serialization problem with spring
Hi i am living on the edge ,using wicket 1.5RC5.1 (the latest) and also using the newly released Spring data-jpa project for data access i do not use or reference PersistenceExceptionTranslationInterceptor directly, actually i never know it is there till i saw that error based on its name it is an interceptor which translate the jpa or jdbc exception to spring's counterpart in AccountManager there is an instance of AccountDAO which use this persistence technology i thought it might be a solution to use kryo serialization as it does not require the object to be serializable, but the site does not recommend using it in production as it is in its early stages and not yet stable Any help please? Thanks Joe On Mon, Aug 1, 2011 at 4:35 AM, Dan Retzlaff wrote: > Hi Joe, > > Based on the depth of that serialization stack, I doubt it's your > AccountManager proxy that's giving you problems. I usually just breakpoint > NotSerializableException and walk up the stack to find the culprit. Any > change your CreatePage uses a method on AccountManager that returns an > object with PersistenceExceptionTranslationInterceptor, then holds a > reference to it? If so, that'll be a problem since Wicket doesn't know to > proxy that one. > > Dan > > On Sun, Jul 31, 2011 at 5:08 PM, Joe Fawzy wrote: > > > Hi > > i have a serialization problem with spring > > My CreatePage class looks like:- > > > > public class CreatePage extends WebPage{ > >@SpringBean > >AccountManager accountManager; > > } > > > > as i am using @SpringBean , it should handle creating a serializable > proxy > > for me BUT > > > > i got the following exception > > > > > > > > ERROR - JavaSerializer - Error serializing object class > > com.app.view.account.CreatePage [object=[Page class = > > com.app.view.account.CreatePage, id = 1, render count = 1]] > > java.io.NotSerializableException: > > > org.springframework.dao.support.PersistenceExceptionTranslationInterceptor > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) > > at > > > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) > > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) > > at > > > > > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) > > at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) > > at > > > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) > > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) > > at > > > > > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) > > at > > > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) > > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) > > at > > > > > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) > > at > > > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) > > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) > > at > > > > > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) > > at > > > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) > > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) > > at > > > > > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) > > at > > > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) > > at > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) > > at > > > > > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) > > at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) > > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) > > at > > > java.io.Objec
serialization problem with spring
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:257) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:160) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:216) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) So , what is wrong? is there a work around thanks Joe
Re: is there any way to externalize wicket-event.js
Thank you both for your time and attention. Joe On Fri, Jun 17, 2011 at 7:15 PM, Chris Colman wrote: > I'm not sure if this is related to your problem but I see a few server errors > relating to the fetching of wicket-event.js and I discovered it's because > some agent (crappy browser or crappy bot) is ignoring the case sensitive > nature of the .js resource name and making a request with all lowercase > letters in path and filename to the web app which then can't locate it > because it's doing a case sensitive look up. > >>-Original Message- >>From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] >>Sent: Saturday, 18 June 2011 1:33 AM >>To: users@wicket.apache.org >>Subject: Re: is there any way to externalize wicket-event.js >> >>i would figure out why the content is returned with a 304 header. >> >>further, when people are looking to optimize these kinds of things >>they put a caching proxy infront of the app server and tell it to >>cache js, css, and other staticy files >> >>-igor >> >>On Fri, Jun 17, 2011 at 8:18 AM, Joe Hudson wrote: >>> Hi, >>> >>> I for looking at ways of optimizing a wicket application. And, while >>> a 304 is returned for wicket-event.js requests, the resource content >>> is returned as well. Is there any optimizations that can be applied >>> here? Ideally I would like to host these files (and probably change >>> their name to have the wicket version) directly through Apache. >>> >>> I have poked around in the code and all I can see to do is change >>> HtmlHeaderResolver. But since this is in Application.internalInit I >>> am hesitant to do so. Any suggestions would be appreciated. Thanks. >>> >>> Joe >>> >>> - >>> 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
is there any way to externalize wicket-event.js
Hi, I for looking at ways of optimizing a wicket application. And, while a 304 is returned for wicket-event.js requests, the resource content is returned as well. Is there any optimizations that can be applied here? Ideally I would like to host these files (and probably change their name to have the wicket version) directly through Apache. I have poked around in the code and all I can see to do is change HtmlHeaderResolver. But since this is in Application.internalInit I am hesitant to do so. Any suggestions would be appreciated. Thanks. Joe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ComponentInitializationListener and the new 1.5 initialization
Hi does ComponentInitializationListener now have access to the markup as the component.onInitialize() Thanks Joe
Re: Page#onInitialize is final in 1.5RC2 ?
if Page#onInitialize will remain final can i use onMarkupAttached instead for the same purpose? Thanks Joe On Mon, Mar 7, 2011 at 12:40 AM, Joe Fawzy wrote: > The jira issue said it has been fixed since RC1 and as i can see , it is > final in RC2 > does that men that Page#onInitialize will remain final? > thanks > Joe > > > On Sat, Mar 5, 2011 at 11:06 AM, Martin Grigorov wrote: > >> https://issues.apache.org/jira/browse/WICKET-3218 >> There is a thread in the mailing list. Search in Nabble. >> >> On Sat, Mar 5, 2011 at 7:00 AM, Joe Fawzy wrote: >> >> > Hi >> > Page#onInitialize is final in 1.5RC2 >> > i think this method ment to be overridden? >> > am i missing something? >> > Thanks >> > >> > >
Re: Page#onInitialize is final in 1.5RC2 ?
The jira issue said it has been fixed since RC1 and as i can see , it is final in RC2 does that men that Page#onInitialize will remain final? thanks Joe On Sat, Mar 5, 2011 at 11:06 AM, Martin Grigorov wrote: > https://issues.apache.org/jira/browse/WICKET-3218 > There is a thread in the mailing list. Search in Nabble. > > On Sat, Mar 5, 2011 at 7:00 AM, Joe Fawzy wrote: > > > Hi > > Page#onInitialize is final in 1.5RC2 > > i think this method ment to be overridden? > > am i missing something? > > Thanks > > >
Page#onInitialize is final in 1.5RC2 ?
Hi Page#onInitialize is final in 1.5RC2 i think this method ment to be overridden? am i missing something? Thanks
Page.add is final in 1.5 RC2
Hi Container.add is not final why page.add and page.onInitialize is final methods thanks
Generic Search Form & Results Display
Hi, I am new to wicket and I'm having trouble determining the correct way to implement a generic search page. I created a page that contains a custom form panel for the search parameter input, and a DataTable for displaying the results. The DataTable uses a custom DataProvider which takes a condition object that is used to perform the find. The condition is initially null, which causes the DataProvider to return all objects - this works fine, and so does the navigation toolbar I added to the table. (I'm attaching example code below.) My question is: what is the correct way to update the table's contents? I have the form panel's onSubmit() call onFind(), which creates a new condition object, but I'm not sure what to do with it. Should I have the onFind() method add a new DataTable with a new DataProvider? Or keep a reference to the table and set a new provider? Am I on the right track or way off base? SearchPage.java - private EntityCondition condition = null; SearchPage(String entityName) { add(new SearchFormPanel("find", entityName) { public void onSubmit(Map searchParameters) { onFind(searchParameters); } }); IColumn[] columns = ... EntityDataProvider entityDataProvider = new EntityDataProvider(entityName, condition); DataTable table = new DataTable("results", columns, entityDataProvider, 10); table.addTopToolbar(new NavigationToolbar(table)); table.addTopToolbar(new HeadersToolbar(table, null)); add(table); } protected void onFind(Map searchParameters) { condition = makeCondition(searchParameters); } ... SearchPage.html - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Announcing the Topicus Dashboard
Martijn Dashorst wrote: > > > Thanks for having the competition! It was fun to be part of it and we > used it as a nice deadline for our wallboard. It was really the icing > on the cake for us developing the wallboard. > > Glad to hear it. We've got more to come so stay tuned! > > Thanks for reminding me! I just filled in the form with some > suggestions as well :) > > Thanks! I can't promise we'll take all suggestions seriously (*cough* > American Idol *cough*). :) > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Announcing-the-Topicus-Dashboard-tp3058300p3093943.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: Announcing the Topicus Dashboard
@Martijn - I work at Atlassian and was one of the organizers of the campaign. Thanks for your *awesome* entry and I appreciate your critiques below. :) We did think about the problem of the community vote favoring the early entries. Our rationale for having submissions and entries end at the same time included a couple factors: * Timing: Due to internal timing constraints we knew the 4 week contest was going to bump up against Thanksgiving, where a lot of US-based participants would be out of town. * Inevitability: Even a week or two extra could be too little to overcome an early leader. So, like any community vote (e.g. http://musicmachinery.com/2009/04/27/moot-wins-time-inc-loses/ Moot's gaming of the Time Poll ), it's often an imperfect balance. * Non-voting categories: We made the community prize the least significant and included two other judge-ranked categories to incentivize entrants and reduce the impact of community voting / timing. * Simplicity: We felt that entrants would most excited about sharing their entry when they submitted it, and for those not interested in a vote rush, it could've dragged out the campaign. As for how it ended up - the winner of the community award Walle-D entered the contest about halfway through and upset early favorite Willow Creek (who had a two week head-start). So the simultaneous deadline didn't end up being a impossible barrier. That all said, we're listening to everyone's feedback and promise to do a better job next time. Feel free to hit me up @ jlambe at atlassian dot com with any other thoughts. P.S. It doesn't look like you filled out the https://atlassian.wufoo.com/forms/the-ultimate-wallboard-tshirt/ Ultimate Wallboard t-shirt form - I'd be willing to let you enter late if you want a shirt - but you'll have to hustle and get it in today! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Announcing-the-Topicus-Dashboard-tp3058300p3092976.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
Link to stockquote example not found on wicket website
The following link on the Wicket examples page gives a 404 Error: http://wicket.apache.org/learn/examples/stockquote.html http://wicket.apache.org/learn/examples/
Re: strange problem with redirect to buffer and URL encoded query string
Thank you very much for the response, Igor. After looking into this further it seems we might be having problems with MobileAware. AFAICT their implementation of encodeRedirectUrl and sendRedirect perform URL encoding differently. Thanks again. Joe On Sat, Nov 6, 2010 at 10:38 AM, Igor Vaynberg wrote: > trace the java side to see what is encoding the url. it may be a > number of things, but since its only happennig to you its probably > something in your environment. also what version of wicket are you > running? > > -igor > > On Fri, Nov 5, 2010 at 8:01 AM, Joe Hudson wrote: >> Hi, >> >> I am using a AjaxFallbackButton within a form. In this case the >> response is saved to a buffer in the session and supposed to be >> retrieved in the next page request. >> >> The problem that I am facing is that the second request is providing >> URL encoded query string and I can't figure out why... Here is what I >> have tracked down: >> >> The redirect is set by the listener interface request target: >> boolean issueRedirect = (strategy == >> IRequestCycleSettings.REDIRECT_TO_RENDER || strategy == >> IRequestCycleSettings.REDIRECT_TO_BUFFER); >> * I am set to REDIRECT_TO_BUFFER >> >> In WebApplication.addBufferedResponse, we are properly adding the >> buffered response to the map with the key of "wicket:interface=:0" >> >> In the BufferedWebResponse, we are calling >> httpServletResponse.sendRedirect(url) with the value of >> "wicket:interface=:0" >> * note: the value is URL encoded but even after encoding does not >> change from "wicket:interface=:0" >> >> On the next call, the query string retreived in WicketFilter (String >> queryString = servletRequest.getQueryString();) is >> "wicket%3Ainterface=%3A0%3A%3A%3A%3A" >> >> This causes the call to webApplication.popBufferedResponse to execute >> with the wrong key which of course finds no buffered response. >> * I have verified at this time that the valid buffered response is >> still there under the key of "wicket:interface=:0" >> >> * I do get a response back except that all component error messages do >> not show up because they were rendered to the buffer. >> >> >> Can anyone please help me understand what is gong on here? I have >> tried evaluating this in firebug to see where this strange URL >> encoding is coming from but all I see in Firebug when I look at the >> response is "Failed to load source for: >> {context}?wicket:interface=:0:wizard:form::IFormSubmitListener::. I >> am using Wicket version 1.4.12 on Ubuntu and have tried this in both >> Chrome and FireFox with the same result. >> >> Any help would be greatly appreciated. Thanks. >> >> Joe >> >> - >> 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
strange problem with redirect to buffer and URL encoded query string
Hi, I am using a AjaxFallbackButton within a form. In this case the response is saved to a buffer in the session and supposed to be retrieved in the next page request. The problem that I am facing is that the second request is providing URL encoded query string and I can't figure out why... Here is what I have tracked down: The redirect is set by the listener interface request target: boolean issueRedirect = (strategy == IRequestCycleSettings.REDIRECT_TO_RENDER || strategy == IRequestCycleSettings.REDIRECT_TO_BUFFER); * I am set to REDIRECT_TO_BUFFER In WebApplication.addBufferedResponse, we are properly adding the buffered response to the map with the key of "wicket:interface=:0" In the BufferedWebResponse, we are calling httpServletResponse.sendRedirect(url) with the value of "wicket:interface=:0" * note: the value is URL encoded but even after encoding does not change from "wicket:interface=:0" On the next call, the query string retreived in WicketFilter (String queryString = servletRequest.getQueryString();) is "wicket%3Ainterface=%3A0%3A%3A%3A%3A" This causes the call to webApplication.popBufferedResponse to execute with the wrong key which of course finds no buffered response. * I have verified at this time that the valid buffered response is still there under the key of "wicket:interface=:0" * I do get a response back except that all component error messages do not show up because they were rendered to the buffer. Can anyone please help me understand what is gong on here? I have tried evaluating this in firebug to see where this strange URL encoding is coming from but all I see in Firebug when I look at the response is "Failed to load source for: {context}?wicket:interface=:0:wizard:form::IFormSubmitListener::. I am using Wicket version 1.4.12 on Ubuntu and have tried this in both Chrome and FireFox with the same result. Any help would be greatly appreciated. Thanks. Joe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: sanity check request for fix regarding the dreaded PageExpiredException
Thanks Igor and Alex for the feedback. It is very much appreciated! Joe -Original Message- From: Alex Rass [mailto:a...@itbsllc.com] Sent: Monday, September 27, 2010 11:47 AM To: users@wicket.apache.org Subject: RE: sanity check request for fix regarding the dreaded PageExpiredException Igor's is 100% right Plus you are forgetting that if you use the default page url constructor - it goes by "interface number" which will/may change after a redeploy. So your "lost url" bullet can be fixed if you use some url creation strategy that solidifies in it enough of the path that you can recreate your "last page" location Then maybe add the important parts of the user state to the same strategy and you are there. There are a bunch of examples on how to do this, but I am feeling too lazy to go search ;) - Alex -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Monday, September 27, 2010 11:28 AM To: users@wicket.apache.org Subject: Re: sanity check request for fix regarding the dreaded PageExpiredException you can try it and see if it works for your particular usecases. there may still be some edges that will break, like links you actually want to run against an older version of the page because they depend on the component hierarchy that existed then, etc. -igor On Fri, Sep 24, 2010 at 7:56 AM, Joe Hudson wrote: > Hi, > > I know there have been several existing topics around this issue (http://apache-wicket.1842946.n4.nabble.com/debugging-PageExpiredExceptions- td1882040.html) for example. The reason that I am asking for a sanity check is because I plan to use an alternative approach to solving this issue and would like feedback to make sure there isn't a reason I shouldn't be doing this. > > The common approach is to catch the exception and return a new instance of the requested page. This seems to have some key drawbacks IMHO: > 1) this only works with bookmarkable links > 2) you lose any modifications to the model that happened after the page was originally loaded but before the exception occured > 3) any data on the client may potentially be out of sync with the server state if not updated by the request that caused the exception (because the new page was loaded but that client representation is still a picture of the previous page with the previous model). Although this would be resolved by a form submit behavior - you would still have problems in the exceptional cases where the model is updated individually by input field ajax change events. > > It seems that the page version number is only necessary for a stateless application and in an ajax-oriented application you would always want to work with the latest page version. We seem to hit these issues when multiple ajax requests that target a particular page happen concurrently because the page version is incremented when the initial ajax request is made but all other ajax requests that are initiated before the initial ajax request response reference a now outdated page version number. > > So, after all that background - do you think this is a valid fix for an ajax-oriented application: > Override the default SecondLevelCachePageMap and as long as the requested page id matches the page id of getLastPage() just return the last page. > > > Your thoughts would be appreciated and sorry for the long email but I wanted to provide background to make sure that the fix was valid for my particular solution (because I know the fix would not be appropriate for a stateless application). > > Thanks > > Joe Hudson > - 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
sanity check request for fix regarding the dreaded PageExpiredException
Hi, I know there have been several existing topics around this issue (http://apache-wicket.1842946.n4.nabble.com/debugging-PageExpiredExceptions-td1882040.html) for example. The reason that I am asking for a sanity check is because I plan to use an alternative approach to solving this issue and would like feedback to make sure there isn't a reason I shouldn't be doing this. The common approach is to catch the exception and return a new instance of the requested page. This seems to have some key drawbacks IMHO: 1) this only works with bookmarkable links 2) you lose any modifications to the model that happened after the page was originally loaded but before the exception occured 3) any data on the client may potentially be out of sync with the server state if not updated by the request that caused the exception (because the new page was loaded but that client representation is still a picture of the previous page with the previous model). Although this would be resolved by a form submit behavior - you would still have problems in the exceptional cases where the model is updated individually by input field ajax change events. It seems that the page version number is only necessary for a stateless application and in an ajax-oriented application you would always want to work with the latest page version. We seem to hit these issues when multiple ajax requests that target a particular page happen concurrently because the page version is incremented when the initial ajax request is made but all other ajax requests that are initiated before the initial ajax request response reference a now outdated page version number. So, after all that background - do you think this is a valid fix for an ajax-oriented application: Override the default SecondLevelCachePageMap and as long as the requested page id matches the page id of getLastPage() just return the last page. Your thoughts would be appreciated and sorry for the long email but I wanted to provide background to make sure that the fix was valid for my particular solution (because I know the fix would not be appropriate for a stateless application). Thanks Joe Hudson
rendering Wicket components to HTML
Hi, First of all, before I get flamed - I've seen many topics about this since I've been looking into this: http://www.mail-archive.com/users@wicket.apache.org/msg27512.html http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/ http://apache-wicket.1842946.n4.nabble.com/Wicket-PDF-Page-Project-td1934168.html My problem is that I am trying to get the rendered contents of a Page to hopefully post process it and make a PDF out of it (using Flying Saucer) - because of this I need to reference the currently running application for the WicketTester (otherwise the application properties aren't available) So, the standard WicketTester approach looks like this as far as I can tell: public static String toString(Class pageClass) { final WicketTester renderer = new WicketTester((WebApplication) Application.get()); renderer.startPage(pageClass); String renderedSource = renderer.getServletResponse().getDocument(); return renderedSource; } The problem with this approach is that the init method of the application now runs twice (once when the app starts and once when this code runs). This is causing an error because we are mounting resources which don't like being mounted twice. I have tried the other approach suggested from Dan Walmsley and haven't had any luck with this either - can anyone get this to work? Am I just making this terribly hard on myself - is it really this complicated to render a Page to a String? Thanks very much for any feedback you might be able to offer. Joe
RE: any good ideas about how to add a confirm check before leaving a page?
Thank you all for your feedback. This helps. Joe -Original Message- From: Rodolfo Hansen [mailto:kry...@gmail.com] Sent: Tuesday, August 10, 2010 12:30 PM To: users@wicket.apache.org Subject: Re: any good ideas about how to add a confirm check before leaving a page? On Tue, 2010-08-10 at 16:08 +0200, Leszek Gawron wrote: > On 2010-08-10 15:11, Joe Hudson wrote: > > Thank you very much for the response but my issue is not a simple as > > this > > > > Say I have a page with navigation links and the page doesn't "know" about > > the navigation links because they are controlled by functionality provided > > in the superclass. What I am trying to do is deal with the case where the > > user clicks a link of that type and intercept that event. Does anyone have > > any advice? Thanks. > > Do you need to intercept the event or just as user for permission to > leave the page? If the latter: > > https://cwiki.apache.org/WICKET/composite-behaviors.html You can also find an implemented version of this behaviour here: http://code.google.com/p/koodaripalvelut-wicket/ You would want the change detector project. If your requirements are more conplex and you need to add a behavior to that link specifically, (to do something on the server, you should just add a AjaxEventBehaviour for that button, or simply do a replace(Component) on your child page.
RE: any good ideas about how to add a confirm check before leaving a page?
Thank you very much for the response but my issue is not a simple as this Say I have a page with navigation links and the page doesn't "know" about the navigation links because they are controlled by functionality provided in the superclass. What I am trying to do is deal with the case where the user clicks a link of that type and intercept that event. Does anyone have any advice? Thanks. Joe -Original Message- From: vov [mailto:vov...@mail.ru] Sent: Thursday, August 05, 2010 9:43 AM To: users@wicket.apache.org Subject: Re: any good ideas about how to add a confirm check before leaving a page? Hi, Do not forget to use google before posting the question :) http://wicketbyexample.com/wicket-ajax-confirmation-modal-window/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/any-good-ideas-about-how-to-add-a-confirm-check-before-leaving-a-page-tp2314872p2314880.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
any good ideas about how to add a confirm check before leaving a page?
Hi, I'm wondering if anyone has had to tackle this before and might have any advice. I'm working on an application that needs to do a confirm before leaving a page if the use clicked on another link in the application. Does anyone have any ideas about how this could be done? Thank you very much. Joe
Re: [announce] Wicket Security 1.4 released!
Hi i heard a lot about this project but have no opportunity to play with it i think a (detailed) tutorial or a getting start guide is required(for someone like me) to begin using this any pointers? thanks Joe On Mon, May 31, 2010 at 5:07 PM, Martijn Dashorst < martijn.dasho...@gmail.com> wrote: > We are proud to release Wicket Security 1.4 final. > > Wicket Security is an attempt to create an out of the box reusable > authenticating and authorization framework for Apache Wicket. It > contains several projects which can be used standalone or in > conjunction with each other. > > After testing the codebase for a while we did not find any issues. > > Differences between the 1.4-rc1 release: > - upgraded dependencies to newest working versions (JUnit 4.x does > not work with Spring) > - versioned maven plugins to appease the Maven 3 gods. > > Many thanks go to Olger Warnier for the initial port of Wicket > Security to Wicket 1.4. > > The release is available from the usual Wicket Stuff maven repository: > > > http://wicketstuff.org/maven/repository/org/apache/wicket/wicket-security > > If you already depend on Wicket Security, all you need to do is modify > the version of your dependencies in your Maven poms: > > >wicketstuff >http://wicketstuff.org/maven/repository > >true > > >true > > > > >org.apache.wicket.wicket-security >swarm >1.4 >compile > > > Note that with future releases we will move to a new groupId and > package name (since org.apache.wicket is reserved for Apache Wicket, > and not 3rd party projects). > > The future of the Wicket Security project is to remain a standalone > project (it will not be adopted by Apache Wicket), and will continue > to be maintained by Topicus. If you wish to join please let us know! > > Emond & Martijn > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: [PROPOSAL] Application.runAs() Method...
Hi Please make this configurable(can be disabled) as i am on appengine, they does not allow threads thanks Joe On Tue, May 25, 2010 at 4:34 PM, James Carman wrote: > Sorry, subject should be wrap() method, not runAs(). > > On Tue, May 25, 2010 at 9:33 AM, James Carman > wrote: > > I've been thinking about this whole idea of needing to access the > > application object in different threads idea. What if the Application > > class had a method like this: > > > > public Runnable wrap(Runnable task) > > > > Basically, the Application would create a Runnable object that can be > > run within the context of itself (by setting/clearing the ThreadLocal > > variable). Then, you can use that Runnable anywhere to run a task > > with all of the appropriate Wickety goodness set up for you (except > > for the request cycle of course because you're not executing within a > > request cycle). Now, what the Application stores in the Runnable > > doesn't have to be the Application itself. We can set up a static > > Map> object on the Application class > > and when an Application is constructed, it registers itself (the key > > could be a UUID.randomUUID().toString()). Then, we could have a > > method like > > > > public static Application get(String id); > > > > on the Application class to get back the original Application object. > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Another Wicket Site
lovely , needs some tweeks for google chrome joe On Wed, May 19, 2010 at 8:36 PM, chinedubond wrote: > nice love seeing Nigerians doing great things > keep it up . > > On Tue, May 18, 2010 at 10:55 PM, Ajayi Yinka > wrote: > > No doubt of a nicer alpha version. Keep it up. > > > > On Tue, May 18, 2010 at 4:54 PM, Ayodeji Aladejebi >wrote: > > > >> Hi all, > >> just to announce another wicket project I am working on. we > >> just launched the beta version > >> > >> http://www.nelexnigeria.com > >> > >> > >> > >> -- > >> Aladejebi Ayodeji A., > >> DabarObjects Solutions > >> Phone: +234 9 875 1763 > >> Mobile: +234 803 589 1780 > >> Email: d...@dabarobjects.com > >> Web: www.dabarobjects.com > >> > > > > > > > > -- > > Ajayi S . Yinka > > +2348022684477 > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: adding behaviours
hey, what is the prefered approach? thanks joe On Wed, May 19, 2010 at 7:12 AM, Joe Fawzy wrote: > Hi > i have a large number of components in a page that i have to add the same > behaviour > should i use the same instance for all or instansiate one for every > component(that's what i am currently doing); > thanks > Joe >
adding behaviours
Hi i have a large number of components in a page that i have to add the same behaviour should i use the same instance for all or instansiate one for every component(that's what i am currently doing); thanks Joe
Re: efficient resource downloading
Hi dear actually , access control and dynamic file generation requires using services which is injected by spring this cannot be easily done in pure servlet my current solution using spring @Controller and write diretly to the servlet response is somethingvery similar to writing a servlet but as i am planning to deploy on appengine, the startup time for spring especially when using spring mvc cannot be accepted (more than 30 sec) so i am tring to figure out a pure wicket solution thanks for your help Joe On Mon, May 10, 2010 at 5:34 AM, Igor Vaynberg wrote: > write a servlet > > -igor > > On Sun, May 9, 2010 at 6:37 PM, Joe Fawzy wrote: > > Hi > > i want to know if this is an efficient way to download some files > > > > i want my users to be able to download certain files just to registerd > users > > only so i can put that logic in the page constructor > > but is this efficient way to do this as this may be called thausands of > > times per hour (the files generated dynamically) > > does the construction of a page and all the other bits is heavy for such > a > > task > > > > i am using spring MVC right now with its rest style model and annotation > but > > it seems to me too heavyweight for the task > > > > so is this appropriate? > > is there another way more efficient? > > > > public class DownloadManagerPage extends WebPage{ > >private static final long serialVersionUID = 1L; > > > >public DownloadManagerPage(PageParameters parameters) { > >super(parameters); > >if (registeredUser(parameters)) { > >getRequestCycle().setRequestTarget(new > > ResourceStreamRequestTarget(new AbstractResourceStreamWriter() { > >private static final long serialVersionUID = 1L; > >public void write(OutputStream output) { > >output > >} > > > >public String getContentType() { > >return ......; > >} > >})); > >} > >} > > > >private boolean registeredUser(PageParameters parameters) { > >return ; > >} > > } > > > > thanks in advance > > Joe > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
efficient resource downloading
Hi i want to know if this is an efficient way to download some files i want my users to be able to download certain files just to registerd users only so i can put that logic in the page constructor but is this efficient way to do this as this may be called thausands of times per hour (the files generated dynamically) does the construction of a page and all the other bits is heavy for such a task i am using spring MVC right now with its rest style model and annotation but it seems to me too heavyweight for the task so is this appropriate? is there another way more efficient? public class DownloadManagerPage extends WebPage{ private static final long serialVersionUID = 1L; public DownloadManagerPage(PageParameters parameters) { super(parameters); if (registeredUser(parameters)) { getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(new AbstractResourceStreamWriter() { private static final long serialVersionUID = 1L; public void write(OutputStream output) { output } public String getContentType() { return ..; } })); } } private boolean registeredUser(PageParameters parameters) { return ; } } thanks in advance Joe
about serialVersionUID in all components
Hi all what are the side effects of setting serialVersionUID on all page classes and components private static final long serialVersionUID = 1L; i am developing an application which will be deployed on appengine appengine handle sessions by storing them in the memcache and data store as there is no local filesystem for its memcache everything must be Serializable, and as the session is stored in the datastore , your session may last for several weeks even if the web container expires it Ok, when i develop my classes may change a lot hence the auto serialVersionUID changes, making appengine complain as its session does not expires anyway , i think setting private static final long serialVersionUID = 1L; on every component will resolve it on appengine side, but ,what about wicket side? does it have any implications or side effects? thanks Joe
change or replace css file on page reload
Hi all i was wondering how could i change a css file on every page reload i thought of using header contribution in onBeforeRender() , but it seams to add the new the new css file what i need is to replace a certain css on every render of a certain page actually i can dynamically generate the css file using velocity or freemarker ,but the question is how to replace the old css with the new one thanks Joe
Re: posting form outside wicket
OK, got it thanks Joe On Mon, May 3, 2010 at 1:22 AM, Jeremy Thomerson wrote: > Wicket is for creating web applications - not consuming them. So, you > handle all of the form processing, validation, etc, all through Wicket. > Then > in your onSubmit, you need to consume a different application. Wicket's > not > built for that part. HttpClient is. > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > On Sun, May 2, 2010 at 5:19 PM, Joe Fawzy wrote: > > > Hi dear > > thanks for the prompt reply > > aren't there any wicket method to do that? > > then i have to cycle through all my form fields and get their params name > > and values ,build a string ,make the request > > OR there is a shortcut > > thanks > > Joe > > > > On Mon, May 3, 2010 at 1:14 AM, Igor Vaynberg > >wrote: > > > > > use commons http client to issue an http post to the external server > > > > > > -igor > > > > > > > > > On Sun, May 2, 2010 at 3:10 PM, Joe Fawzy wrote: > > > > Hi > > > > i have a form that i want to post its data to a page outside wicket , > > > > actually on other server ,done in ruby > > > > i wanna make use of wicket form handling,model binding and > > validation... > > > > etc. and when i click submit , the data sent to the other page using > a > > > post > > > > thanks in advance > > > > Joe > > > > > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > >
Re: posting form outside wicket
Hi dear thanks for the prompt reply aren't there any wicket method to do that? then i have to cycle through all my form fields and get their params name and values ,build a string ,make the request OR there is a shortcut thanks Joe On Mon, May 3, 2010 at 1:14 AM, Igor Vaynberg wrote: > use commons http client to issue an http post to the external server > > -igor > > > On Sun, May 2, 2010 at 3:10 PM, Joe Fawzy wrote: > > Hi > > i have a form that i want to post its data to a page outside wicket , > > actually on other server ,done in ruby > > i wanna make use of wicket form handling,model binding and validation... > > etc. and when i click submit , the data sent to the other page using a > post > > thanks in advance > > Joe > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
posting form outside wicket
Hi i have a form that i want to post its data to a page outside wicket , actually on other server ,done in ruby i wanna make use of wicket form handling,model binding and validation... etc. and when i click submit , the data sent to the other page using a post thanks in advance Joe
Re: GAE serialization issues
Hi dear thanks for the reply i 'm in the first steps of application deployment on appengine with no problems so far with my manual testing and with jmeter if u have any tips or hints , that will be greatly appreciated Thanks Joe On Thu, Apr 29, 2010 at 5:30 PM, jbrookover wrote: > > I can only say that I've been using Wicket on GAE for awhile and it seems > to > work pretty well, with some extra effort. For now, I'm just using > HttpSessionStore. I asked in the GAE forums about the performance there > and > they said session storage made heavy use of the MemCache to keep > performance > strong. It is possible that Wicket can store very LARGE objects in the > SessionStore, but that may be an indication of poor page detaching. After > making that improvement, my session data rarely exceeds 100K. > > I may try out a pure MemCache version based on the link you provided, see > if > I can get it lower and less dependent on the session. > > The only other serialization issues I've noticed deal with changing model > objects across requests - I instead am forced to replace components on > occasion, instead of replacing model objects. That's a hack right now and > I'll look into it later. > > Don't know anything about JBoss. > > Jake > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/GAE-serialization-issues-tp2068427p2075571.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: GAE serialization issues
Hi Any ideas? please i need these info asap ,i appreciate your help thanks Joe On Wed, Apr 28, 2010 at 1:45 AM, Joe Fawzy wrote: > Hi everybody > i am developing an application on the GAE/J platform using wicket > as i read through this list ,it seems that it is not a recommended > combination due to some issues , specially the serialization issue > BUT i have to deploy on appengine, so what is there any recommendations? > > OK, the real question is: >does anyone used the custom PageStore implementation described in: > http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-profit/ > or in: > http://www.mail-archive.com/users@wicket.apache.org/msg46421.html > > in production and found that of real help? > if so which one is better? > what are the side effects of using each? > can i have an implementation that fallback to normal sessionStore? > > Another question > as its related to seialization, can using JBoss serialization lib make > difference in GAE case? as it is much faster > if so where are the hooks , or the interfaces to replace the default > serialization > BTW. i know it cannot be used in the core wicket due to its LGPL lic. > > Thanks > Joe > > >
Re: using selenium
Hi any tutorials, how to,or best practice? thanks Joe On Wed, Apr 28, 2010 at 4:15 AM, Jeremy Thomerson wrote: > yes - the id path > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > On Tue, Apr 27, 2010 at 8:00 PM, Joe Fawzy wrote: > > > Hi dear > > what is wicket:path? do you mean the component id path,like: > > page:panel1:form2:component4 > > or it is a library or what > > any samples or pointers please > > thanks > > Joe > > > > On Wed, Apr 28, 2010 at 1:53 AM, Jeremy Thomerson < > > jer...@wickettraining.com > > > wrote: > > > > > I think most are using wicket:path (which is output in dev mode) > > > > > > > > > Jeremy Thomerson > > > http://www.wickettraining.com > > > -- sent from a wireless device > > > > > > > > > -Original Message- > > > From: Joe Fawzy > > > Sent: Tuesday, April 27, 2010 6:13 PM > > > To: users@wicket.apache.org > > > Subject: using selenium > > > > > > Hi all > > > i am building an application which use ajax heavily so i have to use > > > component.setOutputMarkupId(true) > > > this generate unique dom id for the components which changes every time > i > > > load the same page > > > when using selenium , specially with its Firefox ide , it depends > mainly > > on > > > the id attribute value and as this is dynamically generated by wicket > ,it > > > cannot work smoothly > > > > > > i can use xpath, but i then will lose some of the benefits of both > > selenium > > > and wicket, > > > selenium , i cannot use its code generation capability as it generate > > code > > > based on the the id > > > of wicket(designer friendly markup) as i cannot freely change my > markup, > > > otherwise it will break my tests > > > > > > what is your experience > > > > > > thanks in advance > > > Joe > > > > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > >
Re: using selenium
Hi dear what is wicket:path? do you mean the component id path,like: page:panel1:form2:component4 or it is a library or what any samples or pointers please thanks Joe On Wed, Apr 28, 2010 at 1:53 AM, Jeremy Thomerson wrote: > I think most are using wicket:path (which is output in dev mode) > > > Jeremy Thomerson > http://www.wickettraining.com > -- sent from a wireless device > > > -Original Message- > From: Joe Fawzy > Sent: Tuesday, April 27, 2010 6:13 PM > To: users@wicket.apache.org > Subject: using selenium > > Hi all > i am building an application which use ajax heavily so i have to use > component.setOutputMarkupId(true) > this generate unique dom id for the components which changes every time i > load the same page > when using selenium , specially with its Firefox ide , it depends mainly on > the id attribute value and as this is dynamically generated by wicket ,it > cannot work smoothly > > i can use xpath, but i then will lose some of the benefits of both selenium > and wicket, > selenium , i cannot use its code generation capability as it generate code > based on the the id > of wicket(designer friendly markup) as i cannot freely change my markup, > otherwise it will break my tests > > what is your experience > > thanks in advance > Joe > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
GAE serialization issues
Hi everybody i am developing an application on the GAE/J platform using wicket as i read through this list ,it seems that it is not a recommended combination due to some issues , specially the serialization issue BUT i have to deploy on appengine, so what is there any recommendations? OK, the real question is: does anyone used the custom PageStore implementation described in: http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-profit/ or in: http://www.mail-archive.com/users@wicket.apache.org/msg46421.html in production and found that of real help? if so which one is better? what are the side effects of using each? can i have an implementation that fallback to normal sessionStore? Another question as its related to seialization, can using JBoss serialization lib make difference in GAE case? as it is much faster if so where are the hooks , or the interfaces to replace the default serialization BTW. i know it cannot be used in the core wicket due to its LGPL lic. Thanks Joe
using selenium
Hi all i am building an application which use ajax heavily so i have to use component.setOutputMarkupId(true) this generate unique dom id for the components which changes every time i load the same page when using selenium , specially with its Firefox ide , it depends mainly on the id attribute value and as this is dynamically generated by wicket ,it cannot work smoothly i can use xpath, but i then will lose some of the benefits of both selenium and wicket, selenium , i cannot use its code generation capability as it generate code based on the the id of wicket(designer friendly markup) as i cannot freely change my markup, otherwise it will break my tests what is your experience thanks in advance Joe
Re: YUI 3 anyone?
Hi i hope the dev team to consider jQuery , it seams it is the standard now , used by all the big companies , even microsoft and although YUI is great, Yahoo has its own problem these days and we cannot consider the commited to the lib, they dropped support for many of their products and abandond many projects in the last 2 years this is my opinion only, u may make a vote or poll or something , or just pick YUI thanks Joe On Tue, Apr 27, 2010 at 6:13 PM, Jeremy Thomerson wrote: > Yes, it's experimental, and it is not 100% decided that YUI will be used. > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > On Mon, Apr 26, 2010 at 6:03 AM, Ernesto Reinaldo Barreiro < > reier...@gmail.com> wrote: > > > Isn't this an experimental branch? > > > > Ernesto > > > > On Mon, Apr 26, 2010 at 12:34 PM, danisevsky > wrote: > > > I think wicket 1.5 will use YUI 3. You can look to svn: > > > > > > http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket/src/main/java/org/apache/_wicket/ajax/ > > > > > > > > > 2010/4/26 Istvan Soos > > > > > >> Hi, > > >> > > >> Is there a cool best-practice or even better an integration library to > > >> use YUI 3? I know the standard generic way, I'm interested > > >> specifically in YUI 3... > > >> > > >> Thanks, > > >> Istvan > > >> > > >> - > > >> 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: Asynchronous DataStore queries on GAE with Twig-persist and other DataStore related problems
Hi dear Begining from GAE sdk 1.3.2 , there is query cursors and you can have more than 1000 result On Mon, Apr 26, 2010 at 11:43 PM, Piotr Tarsa wrote: > Hello, > > I want to use Wicket with GAE and exploit all GAE features but some > problems > arise. > > 1. I'm looking for a good solution for asynchronous simulteanous queries in > Wicket. DataStore has a functionality of asynchronous queries so I would > want to be able to fire various queries before rendering anything and then > return the actual model objects when rendering particular component. I > think > of an Interface (or, better, abstract class) extending IModel with an > additional method, name it prepareModel() which would run the asynchronous > query, so getObjet would just wait for the query to finish and then return > the result (this way total time spend of waiting for DataStore queries will > be at most equal to slowest query). DataStore entities are organized into > Entity Groups where there are ancestors and descendants. So sometimes to > find an object I must first find the ancestor. So I would want to fire the > prepareModel() for parent components first. > > 2. DataStore doesn't support joins internally and it's queries are limited > to 1000 results (this means that GQL COUNT will never return value higher > than 1000 even if there's more that 1000 entities that mets the > requirements). Instead DataStore provides cursors to retrieve more than > 1000 > results and GAE devs recommends using separate sharded counters instead of > GQL COUNT's (of course if the result would never exceed 1000 then we shall > use normal GQL COUNT). Are there any components (repeaters) in Wicket that > supports that approach? > > 3. I think that Wicket should be able to store pages from PageMap > independently. This way we could store pages in separate entities in > datastore (DataStore doesn't have schemas, one can store entities of any > form as every kind) so fewer bytes would be transmitted to and from > DataStore (Http Sessions are kept in MemCache and DiskStore). > > 4. How to inject an DataStore object in Models that will be testing > friendly? >
panel session time
I have a panel in the top part of my page. This panel contain a login form. But, I don't login with the panel because I have been on the page for too long(session timeout) also i have a login page , the page contain a login form .But when session timeout , it can login the two State's backcode is same. but i found the panel code don't call submit methods when session timeout Why does such things could happen. ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/
sesseion timeout using a Panel
i have a pannel code for login ,when session timeout ,i don't login fist time. it mean i must refresh the page, then i can login form the login pannel when the session timeout. if the login code is not the pannel, it don't need refresh the login page ,and it can login .i don't know why. thx joe ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/
how to have an html id in markup and support ajax behavior?
Hello, I need a component to have an html id that I set in markup because I'm referencing it in other places. I also need to have the setOutputMarkupId(true) on the component because I need to support ajax behaviors. The problem that I am facing is that when I call setOutputMarkupId(true) it overrides the static id I set in the markup. Is there any way I can deal with this? Thanks. Joe
what is the proper way to handle success message within a feedback panel
Hello, It seems that the only levels of feedback message are: -DEBUG -ERROR -FATAL -INFO -UNDEFINED -WARNING I'm just wondering what the best practice is for success messages are. Thanks. Regards, Joe
RE: is it possible to somehow create a url to return the contents of a panel
So, it is looking like I could do something like this: Link link = new AjaxLink(componentId, new Model("View Details")) { @Override public void onClick(AjaxRequestTarget target) { String resultHTML = convertPanelToHTML(); // I understand this // how can I override the target response with the result HTML? } }; 1) I just want to return straight HTML (not contents within the node) 2) I need the link to return the contents directly (not handle the contents with the Wicket ajax javascript code) Is type of behavior possible? If not, does anyone have any other ideas as to how I could show a dynamic tooltip with data retrieved using ajax? Thank you very much. Joe -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 01, 2009 8:19 AM To: users@wicket.apache.org Subject: Re: is it possible to somehow create a url to return the contents of a panel 1) Is there a component (the someMadeUpAjaxComponent) that I can get a URL for which will trigger the onClick method http://wicket.apache.org/docs/1.4/org/apache/wicket/IRequestTarget.html http://wicket.apache.org/docs/1.4/org/apache/wicket/behavior/AbstractAjaxBehavior.html#getCallbackUrl%28%29 2) I need to attach the URL for the component to a link - not add the component directly - is this possible? I don't understand. Is possible to do a lot overriding onComponentTag, onRender, 3) Given an AjaxRequestTarget, is there any way I can write out the HTML response (as opposed to adding components for rendering)? you can append javascript to response... On Thu, Oct 1, 2009 at 9:11 AM, Joe Hudson wrote: > Thank you so much for the response, that was very helpful. > > So, I've got half of the equation figured out but now, I have the issue of > how to generate a URL that call a component that allows for a straight HTML > response. > > Here is the issue now: > > Component someMadeUpAjaxComponent = ... { >onClick(AjaxRequestTarget target) { >// return the component output >} > } > > 1) Is there a component (the someMadeUpAjaxComponent) that I can get a URL > for which will trigger the onClick method > 2) I need to attach the URL for the component to a link - not add the > component directly - is this possible? > 3) Given an AjaxRequestTarget, is there any way I can write out the HTML > response (as opposed to adding components for rendering)? > > > Because, the result will look something like this: > View Details > > I will then attach a tooltip to this link which will know that it can take > the href attribute of the link to obtain the tooltip content. > > Thank you very much for any help you could offer. > > Joe > > > > -Original Message- > From: Jeremy Thomerson [mailto:jer...@wickettraining.com] > Sent: Wednesday, September 30, 2009 9:15 PM > To: users@wicket.apache.org > Subject: Re: is it possible to somehow create a url to return the contents > of a panel > > search this list for how to generate emails with wicket. there are a bunch > of posts of that sort. that will teach you how to render a component to a > string. this could be used to return the contents. > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > On Wed, Sep 30, 2009 at 8:10 PM, Joe Hudson >wrote: > > > Hi - hopefully I can explain this clearly... > > > > I understand that I can use the AjaxEventBehavior to refresh the contents > > of any components that I have on the screen or add new components. > > > > I am trying to use a tooltip to display additional details for grid data. > > I plan to use a tooltip library which supports retrieving content via an > > ajax call. The question is: how (or is it possible at all) can I take a > > Panel and get a url that would return the contents of that Panel. I'm > > probably not explaining this well so, here is an example: > > > > AbstractLink link = createLink(IModel rowModel); > > > > Private AbstractLink createLink(IModel rowModel) { > >// I need to return a URL which would contain the contents > > of the additional details panel > > // for this particular row in the grid > > > >// the tooltip library will use the href attribute of this > > link to dynamically retrieve the contents of the tooltip when displayed > > } > > > > Any help or ideas would be greatly appreciated. Thanks. > > > > Joe > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: is it possible to somehow create a url to return the contents of a panel
Thank you so much for the response, that was very helpful. So, I've got half of the equation figured out but now, I have the issue of how to generate a URL that call a component that allows for a straight HTML response. Here is the issue now: Component someMadeUpAjaxComponent = ... { onClick(AjaxRequestTarget target) { // return the component output } } 1) Is there a component (the someMadeUpAjaxComponent) that I can get a URL for which will trigger the onClick method 2) I need to attach the URL for the component to a link - not add the component directly - is this possible? 3) Given an AjaxRequestTarget, is there any way I can write out the HTML response (as opposed to adding components for rendering)? Because, the result will look something like this: View Details I will then attach a tooltip to this link which will know that it can take the href attribute of the link to obtain the tooltip content. Thank you very much for any help you could offer. Joe -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Wednesday, September 30, 2009 9:15 PM To: users@wicket.apache.org Subject: Re: is it possible to somehow create a url to return the contents of a panel search this list for how to generate emails with wicket. there are a bunch of posts of that sort. that will teach you how to render a component to a string. this could be used to return the contents. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Sep 30, 2009 at 8:10 PM, Joe Hudson wrote: > Hi - hopefully I can explain this clearly... > > I understand that I can use the AjaxEventBehavior to refresh the contents > of any components that I have on the screen or add new components. > > I am trying to use a tooltip to display additional details for grid data. > I plan to use a tooltip library which supports retrieving content via an > ajax call. The question is: how (or is it possible at all) can I take a > Panel and get a url that would return the contents of that Panel. I'm > probably not explaining this well so, here is an example: > > AbstractLink link = createLink(IModel rowModel); > > Private AbstractLink createLink(IModel rowModel) { >// I need to return a URL which would contain the contents > of the additional details panel >// for this particular row in the grid > >// the tooltip library will use the href attribute of this > link to dynamically retrieve the contents of the tooltip when displayed > } > > Any help or ideas would be greatly appreciated. Thanks. > > Joe > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
is it possible to somehow create a url to return the contents of a panel
Hi - hopefully I can explain this clearly... I understand that I can use the AjaxEventBehavior to refresh the contents of any components that I have on the screen or add new components. I am trying to use a tooltip to display additional details for grid data. I plan to use a tooltip library which supports retrieving content via an ajax call. The question is: how (or is it possible at all) can I take a Panel and get a url that would return the contents of that Panel. I'm probably not explaining this well so, here is an example: AbstractLink link = createLink(IModel rowModel); Private AbstractLink createLink(IModel rowModel) { // I need to return a URL which would contain the contents of the additional details panel // for this particular row in the grid // the tooltip library will use the href attribute of this link to dynamically retrieve the contents of the tooltip when displayed } Any help or ideas would be greatly appreciated. Thanks. Joe
RE: Form Data Not Available When Testing a TextArea component
Thank you. That was it. I appreciate the help! -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Friday, September 25, 2009 12:22 PM To: users@wicket.apache.org Subject: Re: Form Data Not Available When Testing a TextArea component clickLink() ? shouldnt you be submitting the form? links dont submit forms afaik. -igor On Fri, Sep 25, 2009 at 8:21 AM, Caristi, Joe wrote: > I have a very simple Wicket web page with one TextArea for data entry on a > form. This is contained in a NavomaticBorder. The form works properly, as > the data is successfully saved to the database when the Submit button is > clicked. My JUnit test fails however, because the data is null. I am using > the setValue method of the FormTester object, and when I step through the > code can see the value being saved. However, when I execute clickLink() and > get into the form submit method, the data is null. I even tried stepping > through the Wicket source code, but I can't figure out where the data gets > lost. > > > > Can someone help with this? Here is my test code: > > > WicketTester tester = new WicketTester(partSelectLicenseWeb); > tester.startPage(LicenseDataReplace.class); > FormTester formTester = > tester.newFormTester("navomaticBorder:licenseDataReplaceForm"); > formTester.setValue("licenseCode", "xyz"); > tester.clickLink("navomaticBorder:licenseDataReplaceForm:submitButton"); > tester.assertRenderedPage(LicenseDataReplaceResult.class); > Page resultPage = tester.getLastRenderedPage(); > numLicensesSaved = resultPage.get("numLicensesSaved").toString(); > > Here is my form HTML: > > > Copy and paste a license > code: > > wicket:message="value:submit" /> > > > Here is my (simplified) web page code: > > public class LicenseDataReplace extends WebPage { > > TextArea licenseCode = new TextArea("licenseCode", new Model()); > > public LicenseDataReplace() { > >class LicenseDataReplaceForm extends Form { > > protected void onSubmit() { > >String enteredCode = LicenseDataReplace.this >.getLicenseCode() > > .getDefaultModelObjectAsString()); > >... save enteredCode to database >... navigate to next page > } > > public LicenseDataReplaceForm(String id) { >super(id); > } >}; > >NavomaticBorder navomaticBorder = new > NavomaticBorder("navomaticBorder"); >navomaticBorder.add(new Image("logo")); >navomaticBorder.add(new Image("message")); >Form form = new LicenseDataReplaceForm("licenseDataReplaceForm"); >form.add(licenseCode); >SubmitLink submitLink = new SubmitLink("submitButton"); >form.add(submitLink); >navomaticBorder.add(form); >add(navomaticBorder); > } > > > > STATEMENT OF CONFIDENTIALITY: > > > > The information contained in this electronic message and any attachments to > this message are intended for the exclusive use of the addressee(s) and may > contain confidential or privileged information. If you are not the intended > recipient, please notify WHI Solutions immediately at g...@whisolutions.com, > and destroy all copies of this message and any attachments. > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify WHI Solutions immediately at g...@whisolutions.com, and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Form Data Not Available When Testing a TextArea component
I have a very simple Wicket web page with one TextArea for data entry on a form. This is contained in a NavomaticBorder. The form works properly, as the data is successfully saved to the database when the Submit button is clicked. My JUnit test fails however, because the data is null. I am using the setValue method of the FormTester object, and when I step through the code can see the value being saved. However, when I execute clickLink() and get into the form submit method, the data is null. I even tried stepping through the Wicket source code, but I can't figure out where the data gets lost. Can someone help with this? Here is my test code: WicketTester tester = new WicketTester(partSelectLicenseWeb); tester.startPage(LicenseDataReplace.class); FormTester formTester = tester.newFormTester("navomaticBorder:licenseDataReplaceForm"); formTester.setValue("licenseCode", "xyz"); tester.clickLink("navomaticBorder:licenseDataReplaceForm:submitButton"); tester.assertRenderedPage(LicenseDataReplaceResult.class); Page resultPage = tester.getLastRenderedPage(); numLicensesSaved = resultPage.get("numLicensesSaved").toString(); Here is my form HTML: Copy and paste a license code: Here is my (simplified) web page code: public class LicenseDataReplace extends WebPage { TextArea licenseCode = new TextArea("licenseCode", new Model()); public LicenseDataReplace() { class LicenseDataReplaceForm extends Form { protected void onSubmit() { String enteredCode = LicenseDataReplace.this .getLicenseCode() .getDefaultModelObjectAsString()); ... save enteredCode to database ... navigate to next page } public LicenseDataReplaceForm(String id) { super(id); } }; NavomaticBorder navomaticBorder = new NavomaticBorder("navomaticBorder"); navomaticBorder.add(new Image("logo")); navomaticBorder.add(new Image("message")); Form form = new LicenseDataReplaceForm("licenseDataReplaceForm"); form.add(licenseCode); SubmitLink submitLink = new SubmitLink("submitButton"); form.add(submitLink); navomaticBorder.add(form); add(navomaticBorder); } STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify WHI Solutions immediately at g...@whisolutions.com, and destroy all copies of this message and any attachments.
is it possible to include script resources using the HeaderContributor above the WebPage component script references
Hello, I would like for the script included using a HeaderContributor to be above references within the WebPage component head node. Is this possible. The reason I would like to do this is because I would like to be able to reference code from the script file which is included using the HeaderContributor. For example: --- Application class --- // inside init method addComponentInstantiationListener(new IComponentInstantiationListener() { public void onInstantiation(Component component) { if (component instanceof WebPage) { component.add(new HeaderContributor(new IHeaderContributor() { public void renderHead(IHeaderResponse response) { response.renderJavascriptReference(new JavascriptResourceReference(MyReferenceClass.class, "scripts/example.js")); } })); } } }); // WebPage component template <head> <script type="text/javascript"> ... // I can't reference anything from the scripts/example.js because the source reference appears below this in the rendered output By the way, please tell me if this is bad code and there is a better way as I am very new to Wicket. All code criticism is welcomed :) Thanks. Joe
RE: using behaviors as borders - how to?
Thank you Peter. That link was extremely helpful! Joe -Original Message- From: Peter Thomas [mailto:ptrtho...@gmail.com] Sent: Thursday, August 27, 2009 8:12 AM To: users@wicket.apache.org Subject: Re: using behaviors as borders - how to? On Thu, Aug 27, 2009 at 5:31 PM, Joe Hudson wrote: > Hello, > > I would like to add a behavior to a component which alters the HTML output > related to that component. I know that you can use setComponentBorder but I > saw a posting that mentioned behaviors were the more appropriate way to do > this as explicit component borders might become deprecated. > > I am trying to do something simple like wrap a form component with a label. > For example: > Instead of a form component rendering as: > > > I would like the behavior to help the component to render as > Some Label > > So, the label component would be responsible for wrapping the inner content > with: > Some Label {inner content} > > Here is where I am at: > > - I know I probably want to extend AbstractBehavior > > - I know I probably want to use the beforeRender and afterRender > methods to do this > > Would anyone be able to give me some pointers to get started on this? > Thank you very much. > > Al Maw's "Forms With Flair" presentation is a good start, you can find it here: http://jweekend.co.uk/dev/ArticlesPage > > Regards, > > Joe > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
using behaviors as borders - how to?
Hello, I would like to add a behavior to a component which alters the HTML output related to that component. I know that you can use setComponentBorder but I saw a posting that mentioned behaviors were the more appropriate way to do this as explicit component borders might become deprecated. I am trying to do something simple like wrap a form component with a label. For example: Instead of a form component rendering as: I would like the behavior to help the component to render as Some Label So, the label component would be responsible for wrapping the inner content with: Some Label {inner content} Here is where I am at: - I know I probably want to extend AbstractBehavior - I know I probably want to use the beforeRender and afterRender methods to do this Would anyone be able to give me some pointers to get started on this? Thank you very much. Regards, Joe
RE: javascript effects before an ajax call
How can you make the script sources that you reference in your web page show up after the component & wicket script includes? (assuming you don't want to do this inline) I would like to override the Wicket.replaceOuterHtml function because I would like to do some jquery dom post processing. But whenever I include javascript, it is above all other script includes in the rendered output. To override, it must be included below the Wicket script includes. Thanks. Joe -Original Message- From: Antony Stubbs [mailto:antony.stu...@gmail.com] Sent: Tuesday, August 18, 2009 9:04 AM To: Antony Stubbs Cc: users@wicket.apache.org; Martijn Dashorst; Matej Knopp Subject: Re: javascript effects before an ajax call Here's the more readable version - corrected with help form Richard at JWeekend... This is the easiest way to do the animation either side of the Wicket replace function that I know of... If someone would like to wrap this up into a nice behaviour for the Scriptaculous wicketstuff library be my guest :) I probably will eventually if we get back to the project that uses it. <!-- var oldF = Wicket.replaceOuterHtml Wicket.replaceOuterHtml=function(element, text) { var parent = $(element.id).parentNode; // the disappear animation $(element.id).fade({ duration: 0.4, afterFinish: function(effect) { // call replace function oldF(element, text) // render the appear animtion on the replaced element $(element.id).appear({ duration: 0.4}); }}); } --> Cheers, Antony Stubbs, sharca.com On 29/07/2009, at 4:54 AM, Antony Stubbs wrote: > I have a workaround and it goes a little something like this: > Wicket.replaceOuterHtml=function(element, text) { > > new $(element.id).fade({ duration: 0.4, afterFinish: > function(effect) { > > if (Wicket.Browser.isIE()) { > Wicket.replaceOuterHtmlIE(element, text); > > } else if (Wicket.Browser.isSafari() || > Wicket.Browser.isOpera()) { > Wicket.replaceOuterHtmlSafari(element, text); > } else /* GECKO */ { > // create range and fragment > var range = element.ownerDocument.createRange(); > range.selectNode(element); > var fragment = > range.createContextualFragment(text); > > element.parentNode.replaceChild(fragment, element); > } > > $(element.id).appear({ duration: 0.4}); > }}); > > } > > > > Putting that at the top of the html overrides the wicket function, > adds in a javascript effect, then using the onFinish hook, runs the > original Wicket code, the precedes with another effect. This makes > the effects run immediately after the ajax call has completed... > > This adds a fade transition every time wicket replaces a dom > element. A better version would allow you to do it with some hooks, > passing in your transition functions. > > 2009/7/28 Antony Stubbs > (sorry, sent to wrong list before) > > Is it possible to override certain methods in wicketajax.js ? In > order to modify the behaviour of one of the methods. > > but i'd prefer not to run a patched wicket, or have to run on a copy > of the whole wicketajax.js file - but i will if i have to :/ > > what i want to do is add pre and post hooks > processComponent#Wicket.replaceOuterHtml function - as this will > solve what I want to do - i.e. run an animation on the element to be > replaced, after the ajax call completes, but before the element is > replaced. > > p.s. martijn, is there any info available on the plan for the new > ajax system? > > I just found - there is a post animation hook in Scriptaculous, > which I have working to run the ajax request in, however this > doesn't quite get there, as there's is of course the delay between > when the animation finishes, and when the ajax request actually > completes - which is too long. > > Update: > I've tried overriding the js functions like this: > > > > function newProcessComponent: function(steps, node) { > alert('replaced!'); > } > > Wicket.Ajax.Call.prototype.processComponent = newProcessComponent > > > Wicket.replaceOuterHtml=function() > {alert('replaceOuterHtml');} > Wicket.Ajax.Call.prototype.processComponent: > function(steps, node) {{alert('pr
how to include head resources below generated component additions to head
Hello, I would like to override some of the styles of components I am using in my page. However, when I include a CSS resource at the head of my WebPage component, the incude occurs above all of the component includes. Is there any way I can specify for an include to be below component includes that I am using inside my WebPage component? For example: Here is example markup for the web page component Using some component here The output is something like this: http://localhost:8080/wicket/styles/style.css>"/> http://localhost:8080/wicket/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js</a>>"> http://localhost:8080/wicket/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js</a>>"> http://localhost:8080/wicket/resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js</a>>"> ... ... The output that I would like to achieve is something like this: http://localhost:8080/wicket/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js</a>>"> http://localhost:8080/wicket/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js</a>>"> http://localhost:8080/wicket/resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js</a>>"> ... http://localhost:8080/wicket/styles/style.css>"/> Is there some kind of component or application setting for this? Thanks very much for the help. Joe
Re: Spring ROO & wicket
Hi you 'll find yourself locked to eclipse in general, not specfically to spring tools as eclipse is the only ide with full aspectj support , which is required to open and edit ROO files the code generation tool will clutter your workspace with big amount of .aj files, and here is the role of spring tools, it hide these files by default for u Joe On Sun, Jun 21, 2009 at 9:58 AM, Alex Objelean wrote: > > I think it is very customizable. I see the addons as a kind of maven > archetype, but much better Also, I don't think it resume itself to > spring related tools... therefore there should be no problems creating > addons for wicket or other web frameworks. > > Alex Objelean > > > igor.vaynberg wrote: > > > > how customizable is it? eg is it possible to write a plugin that would > > generate wicket code instead of springmvc? > > > > -igor > > > > On Sat, Jun 20, 2009 at 2:48 PM, Joe Fawzy wrote: > >> Hi deari think possibilities for integration is limited for the > following > >> reasons: > >> ROO is using spring MVC for the web tier > >> ROO utilize the REST pattern which is stateless by default while wicket > >> strength is its ststeful nature > >> ROO depends heavily on aspectj and spring tools > >> > >> if u use spring tools or eclipse , and u want use the data layer > features > >> of > >> ROO , go ahead, this part is compatible with very much every web > >> framework > >> Joe > >> > >> On Sun, Jun 21, 2009 at 12:22 AM, Objelean Alex > >> wrote: > >> > >>> Recently, I've discovered Spring ROO: a user customizable tooling that > >>> enables rapid delivery of high performance enterprise Java > >>> applications. (http://www.springsource.org/roo). It doesn't have yet > >>> a final release (the latest release is a milestone), but it already > >>> have a lot of addons which can help you to build in minutes a complex > >>> application. I think that it would be great to have someday an addon > >>> for wicket. I am curious what the community thinks about this tool. > >>> > >>> Alex Objelean > >>> > >>> - > >>> 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 > > > > > > > > -- > View this message in context: > http://www.nabble.com/Spring-ROO---wicket-tp24129391p24132040.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: Spring ROO & wicket
Hi deari think possibilities for integration is limited for the following reasons: ROO is using spring MVC for the web tier ROO utilize the REST pattern which is stateless by default while wicket strength is its ststeful nature ROO depends heavily on aspectj and spring tools if u use spring tools or eclipse , and u want use the data layer features of ROO , go ahead, this part is compatible with very much every web framework Joe On Sun, Jun 21, 2009 at 12:22 AM, Objelean Alex wrote: > Recently, I've discovered Spring ROO: a user customizable tooling that > enables rapid delivery of high performance enterprise Java > applications. (http://www.springsource.org/roo). It doesn't have yet > a final release (the latest release is a milestone), but it already > have a lot of addons which can help you to build in minutes a complex > application. I think that it would be great to have someday an addon > for wicket. I am curious what the community thinks about this tool. > > Alex Objelean > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: File upload without writing to temp file (on Google App Engine)
Hi split it into small chunks and store each as a blob in datastore entity Joe On Sat, Jun 20, 2009 at 1:44 PM, Dolejs Vlastimil wrote: > Hi, > I´m trying write wicket application for Google App Engine. > App Engine has some restrictions, one of them is, that you can´t work with > filesystem. > I´m trying upload images with FileUploadField, but i get > AccessControlException. > Looking through source code i found there is DiskFileItemFactory, which > puts large files (over 10kB) to temp files. > Is there any way to redirect all data storing to memory? > > I also found, if I upload small file (smaller than 10kB) - > DiskFileItemFactory store it in memory, but there is some FileCleaner class > which cleans temp files and spawns new Thread (which is also restricted in > App Engine). So it fails again on AccessControlException. > > Have you anybody solved problems with file uploads on App Engine? > > Thanks
Re: Conversation scope in wicket
Hi dearfirst of all, why add another dependency,just for conversation handling, while we have in wicket a strong ground for it note: jsr299 is a big spec with a somehow complex lifecycle(which may not be compatible with that of wicket) and really complicated bean resolution strategy second: wicket components are not 299 beans, wicket is an unmanaged framework , u must create the components urself, not by the framework, which is a requirement for jsr299 what can be done with web beans, is to inject its objects in wicket components BUT u cannot manage wicket components as web beans , and for example inject them or handle there lifecycle Joe On Fri, Jun 19, 2009 at 10:43 AM, janneru wrote: > hi james&joe, > > which are the issues with clint popetz's current work on the > webbeans-wicket > integration (already contained in the webbeans preview) that you would > write > your own? > > cheers, uwe. > > > On Thu, Jun 18, 2009 at 8:05 PM, James Carman > wrote: > > > JSR-299 is somewhat of a moving target right now, so it's hard to stay > > up-to-date with it. I'm mainly working with the OpenWebBeans folks on > > it. > > > > On Thu, Jun 18, 2009 at 2:03 PM, Joe Fawzy wrote: > > > > > > Hi all > > > > > > On Thu, Jun 18, 2009 at 7:44 AM, James Carman > > > wrote: > > > > > > > On Thu, Jun 18, 2009 at 12:38 AM, Igor Vaynberg < > > igor.vaynb...@gmail.com> > > > > wrote: > > > > > > > > > > you are free to implement this as an open source addition to > wicket. > > > > > there is wicketstuff or googlecode or sf.net where you can host > it. > > > > > > > > > > wicket is a ui framework and conversational scope management falls > > > > > outside wicket's scope. it is our job to provide the hooks to make > > > > > such things possible, not to provide an implementation. > > > > > > > > And, those hooks are very nice. I would only ask for some more > > > > listener registering opportunities (like for listening to request > > > > cycle events like begin/end rather than having to implement your own > > > > request cycle). > > > > > > > > > Yes this is a much needed functionality > > > i think we may cooperate in that thing > > > can u start another mail discussion suggesting ur needs , and make > > everyone > > > participate > > > Thanks > > > Joe > > > > > > > > > > > > > > > > > > > > > - > > > > 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: Conversation scope in wicket
Hi Igor On Wed, Jun 17, 2009 at 8:58 PM, Igor Vaynberg wrote: > class mysession extends websesison { > private map> coversations; > > public map getconversation(ipagemap pmap) { >return conversations.get(pmap.getid()); > } > } in your last code line , do you mean pmap.getName() instead of pmap.getId() as i cannot find a public getId() in ipagemap thanks Joe > > > -igor > > On Wed, Jun 17, 2009 at 10:29 AM, Joe Fawzy wrote: > > Hi alli need to implement something like a conversation scope in wicket > > i know that wicket is stateful by default and i can pass object o from > page > > A -> page B > > But if Object o in page A which -> page B -> page C -> page D -> page E > > and i need Object o in page E ,that will be very tedious to pass o all > > throught the way from A > ..E > > also if i need to pass a large number of objects between a set of pages > > ,this will be a nightmare > > > > so How can i implement a Conversation object ala Session and store these > > objects there > > > > i thought of using the IPageMap as a key in this situation as it > represent > > an open browser window or tab ie. conversation, but in a previous mail ,i > > 've been tald that it cannot be extended easily, and i cannot provide my > own > > factory for one > > > > so, any ideas about the conversation scope? > > what do u think about the pageMap ? will it work? is it reliable? > > can the core team provide some hooks to implement something like > > IPageMapFactory? > > > > thanks > > Joe > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Conversation scope in wicket
Hi all On Thu, Jun 18, 2009 at 7:44 AM, James Carman wrote: > On Thu, Jun 18, 2009 at 12:38 AM, Igor Vaynberg > wrote: > > > > you are free to implement this as an open source addition to wicket. > > there is wicketstuff or googlecode or sf.net where you can host it. > > > > wicket is a ui framework and conversational scope management falls > > outside wicket's scope. it is our job to provide the hooks to make > > such things possible, not to provide an implementation. > > And, those hooks are very nice. I would only ask for some more > listener registering opportunities (like for listening to request > cycle events like begin/end rather than having to implement your own > request cycle). Yes this is a much needed functionality i think we may cooperate in that thing can u start another mail discussion suggesting ur needs , and make everyone participate Thanks Joe > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Conversation scope in wicket
Hi alli am working on a prototype which i think will convince you that conversation is an important concept, it is very onject oriented as wicket is and has many use cases On Thu, Jun 18, 2009 at 7:38 AM, Igor Vaynberg wrote: > you are free to implement this as an open source addition to wicket. > there is wicketstuff or googlecode or sf.net where you can host it. > > wicket is a ui framework and conversational scope management falls > outside wicket's scope. it is our job to provide the hooks to make > such things possible, not to provide an implementation. yes, u r right, wicket can'nt be everything for everyone ,but the question is how much this hook thing is the responsibility of wicket do you really think wicket is only ui framework?with no scopes so why u support sessions? conversation is much like sessions, it is just narrowwer Thanks Joe > > -igor > > On Wed, Jun 17, 2009 at 9:36 PM, Joe Fawzy wrote: > > Hiyou mean: injecting webbeans conversation component in wicket component > at > > construction time > > this is only what we can achieve with webbeans, as wicket component > cannot > > be webbeans components (wicket is unmanaged framework) > > my idea is about native conversation support, which enable wicket > component > > to be the component and the target for injection in a natural wicket way > > beside, why depending on external project when we have all the > functionality > > we need as wicket is stateful and each pagemap is a conversation(long one > > which may be easily break down to smaller pieces) > > > > Joe > > > > > > On Thu, Jun 18, 2009 at 7:22 AM, James Carman > > wrote: > > > >> There are a few folks working on implementing JSR-299 support for > Wicket, > >> which would provide support for conversation-scoped beans. I'm working > on > >> one currently and I believe that the jboss folks have one working too. > >> > >> On Thu, Jun 18, 2009 at 12:08 AM, Joe Fawzy > wrote: > >> > >> > Hican this functionality added to the standard wicket? > >> > actually much of seam popularity came from supporting conversation > >> > scope..., > >> > so i think that adding explicit wicket support will have momentum > >> > i think that having just a store for conversation objects will be a > good > >> > begin > >> > then we may add apis like beginConversation, endConversation > >> > ,joinConversation,mergeConversation > >> ,suspendConversation,resumeConversation > >> > and other concepts like workspace > >> > what do u think? > >> > Joe > >> > > >> > > >> > On Thu, Jun 18, 2009 at 12:32 AM, Igor Vaynberg < > igor.vaynb...@gmail.com > >> > >wrote: > >> > > >> > > only time will tell > >> > > > >> > > -igor > >> > > > >> > > On Wed, Jun 17, 2009 at 11:59 AM, Joe Fawzy > >> wrote: > >> > > > thanks dearwill wicket continue to support pageMap beyond 1.4 or > it > >> is > >> > > now a > >> > > > deprecated feature? > >> > > > thanks > >> > > > Joe > >> > > > > >> > > > On Wed, Jun 17, 2009 at 9:56 PM, Igor Vaynberg < > >> > igor.vaynb...@gmail.com > >> > > >wrote: > >> > > > > >> > > >> if the scope of your conversation is a browser window then its > the > >> > best > >> > > >> choice. > >> > > >> > >> > > >> -igor > >> > > >> > >> > > >> On Wed, Jun 17, 2009 at 11:45 AM, Joe Fawzy > >> > wrote: > >> > > >> > Hi dearthanks for the reply and for the code snippet > >> > > >> > But, do u think that using pageMap is reliable or what > >> > > >> > i mean , is using pageMap is a good solution or just a hack, > work > >> > > around > >> > > >> > thanks > >> > > >> > Joe > >> > > >> > > >> > > >> > On Wed, Jun 17, 2009 at 8:58 PM, Igor Vaynberg < > >> > > igor.vaynb...@gmail.com > >> > > >> >wrote: > >> > > >> > > >> > > >> >> class mysession extends websesison { > >> > > >> >> private map> coversations; > >> > > >> >> > >&g
Re: Conversation scope in wicket
Hiyou mean: injecting webbeans conversation component in wicket component at construction time this is only what we can achieve with webbeans, as wicket component cannot be webbeans components (wicket is unmanaged framework) my idea is about native conversation support, which enable wicket component to be the component and the target for injection in a natural wicket way beside, why depending on external project when we have all the functionality we need as wicket is stateful and each pagemap is a conversation(long one which may be easily break down to smaller pieces) Joe On Thu, Jun 18, 2009 at 7:22 AM, James Carman wrote: > There are a few folks working on implementing JSR-299 support for Wicket, > which would provide support for conversation-scoped beans. I'm working on > one currently and I believe that the jboss folks have one working too. > > On Thu, Jun 18, 2009 at 12:08 AM, Joe Fawzy wrote: > > > Hican this functionality added to the standard wicket? > > actually much of seam popularity came from supporting conversation > > scope..., > > so i think that adding explicit wicket support will have momentum > > i think that having just a store for conversation objects will be a good > > begin > > then we may add apis like beginConversation, endConversation > > ,joinConversation,mergeConversation > ,suspendConversation,resumeConversation > > and other concepts like workspace > > what do u think? > > Joe > > > > > > On Thu, Jun 18, 2009 at 12:32 AM, Igor Vaynberg > >wrote: > > > > > only time will tell > > > > > > -igor > > > > > > On Wed, Jun 17, 2009 at 11:59 AM, Joe Fawzy > wrote: > > > > thanks dearwill wicket continue to support pageMap beyond 1.4 or it > is > > > now a > > > > deprecated feature? > > > > thanks > > > > Joe > > > > > > > > On Wed, Jun 17, 2009 at 9:56 PM, Igor Vaynberg < > > igor.vaynb...@gmail.com > > > >wrote: > > > > > > > >> if the scope of your conversation is a browser window then its the > > best > > > >> choice. > > > >> > > > >> -igor > > > >> > > > >> On Wed, Jun 17, 2009 at 11:45 AM, Joe Fawzy > > wrote: > > > >> > Hi dearthanks for the reply and for the code snippet > > > >> > But, do u think that using pageMap is reliable or what > > > >> > i mean , is using pageMap is a good solution or just a hack, work > > > around > > > >> > thanks > > > >> > Joe > > > >> > > > > >> > On Wed, Jun 17, 2009 at 8:58 PM, Igor Vaynberg < > > > igor.vaynb...@gmail.com > > > >> >wrote: > > > >> > > > > >> >> class mysession extends websesison { > > > >> >> private map> coversations; > > > >> >> > > > >> >> public map getconversation(ipagemap pmap) { > > > >> >>return conversations.get(pmap.getid()); > > > >> >> } > > > >> >> } > > > >> >> > > > >> >> -igor > > > >> >> > > > >> >> On Wed, Jun 17, 2009 at 10:29 AM, Joe Fawzy > > > wrote: > > > >> >> > Hi alli need to implement something like a conversation scope > in > > > >> wicket > > > >> >> > i know that wicket is stateful by default and i can pass object > o > > > from > > > >> >> page > > > >> >> > A -> page B > > > >> >> > But if Object o in page A which -> page B -> page C -> page D > -> > > > page > > > >> E > > > >> >> > and i need Object o in page E ,that will be very tedious to > pass > > o > > > all > > > >> >> > throught the way from A > ..E > > > >> >> > also if i need to pass a large number of objects between a set > of > > > >> pages > > > >> >> > ,this will be a nightmare > > > >> >> > > > > >> >> > so How can i implement a Conversation object ala Session and > > store > > > >> these > > > >> >> > objects there > > > >> >> > > > > >> >> > i thought of using the IPageMap as a key in this situation as > it > > > >> >
Re: Conversation scope in wicket
Hican this functionality added to the standard wicket? actually much of seam popularity came from supporting conversation scope..., so i think that adding explicit wicket support will have momentum i think that having just a store for conversation objects will be a good begin then we may add apis like beginConversation, endConversation ,joinConversation,mergeConversation ,suspendConversation,resumeConversation and other concepts like workspace what do u think? Joe On Thu, Jun 18, 2009 at 12:32 AM, Igor Vaynberg wrote: > only time will tell > > -igor > > On Wed, Jun 17, 2009 at 11:59 AM, Joe Fawzy wrote: > > thanks dearwill wicket continue to support pageMap beyond 1.4 or it is > now a > > deprecated feature? > > thanks > > Joe > > > > On Wed, Jun 17, 2009 at 9:56 PM, Igor Vaynberg >wrote: > > > >> if the scope of your conversation is a browser window then its the best > >> choice. > >> > >> -igor > >> > >> On Wed, Jun 17, 2009 at 11:45 AM, Joe Fawzy wrote: > >> > Hi dearthanks for the reply and for the code snippet > >> > But, do u think that using pageMap is reliable or what > >> > i mean , is using pageMap is a good solution or just a hack, work > around > >> > thanks > >> > Joe > >> > > >> > On Wed, Jun 17, 2009 at 8:58 PM, Igor Vaynberg < > igor.vaynb...@gmail.com > >> >wrote: > >> > > >> >> class mysession extends websesison { > >> >> private map> coversations; > >> >> > >> >> public map getconversation(ipagemap pmap) { > >> >>return conversations.get(pmap.getid()); > >> >> } > >> >> } > >> >> > >> >> -igor > >> >> > >> >> On Wed, Jun 17, 2009 at 10:29 AM, Joe Fawzy > wrote: > >> >> > Hi alli need to implement something like a conversation scope in > >> wicket > >> >> > i know that wicket is stateful by default and i can pass object o > from > >> >> page > >> >> > A -> page B > >> >> > But if Object o in page A which -> page B -> page C -> page D -> > page > >> E > >> >> > and i need Object o in page E ,that will be very tedious to pass o > all > >> >> > throught the way from A > ..E > >> >> > also if i need to pass a large number of objects between a set of > >> pages > >> >> > ,this will be a nightmare > >> >> > > >> >> > so How can i implement a Conversation object ala Session and store > >> these > >> >> > objects there > >> >> > > >> >> > i thought of using the IPageMap as a key in this situation as it > >> >> represent > >> >> > an open browser window or tab ie. conversation, but in a previous > mail > >> ,i > >> >> > 've been tald that it cannot be extended easily, and i cannot > provide > >> my > >> >> own > >> >> > factory for one > >> >> > > >> >> > so, any ideas about the conversation scope? > >> >> > what do u think about the pageMap ? will it work? is it reliable? > >> >> > can the core team provide some hooks to implement something like > >> >> > IPageMapFactory? > >> >> > > >> >> > thanks > >> >> > Joe > >> >> > > >> >> > >> >> - > >> >> 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: Conversation scope in wicket
thanks dearwill wicket continue to support pageMap beyond 1.4 or it is now a deprecated feature? thanks Joe On Wed, Jun 17, 2009 at 9:56 PM, Igor Vaynberg wrote: > if the scope of your conversation is a browser window then its the best > choice. > > -igor > > On Wed, Jun 17, 2009 at 11:45 AM, Joe Fawzy wrote: > > Hi dearthanks for the reply and for the code snippet > > But, do u think that using pageMap is reliable or what > > i mean , is using pageMap is a good solution or just a hack, work around > > thanks > > Joe > > > > On Wed, Jun 17, 2009 at 8:58 PM, Igor Vaynberg >wrote: > > > >> class mysession extends websesison { > >> private map> coversations; > >> > >> public map getconversation(ipagemap pmap) { > >> return conversations.get(pmap.getid()); > >> } > >> } > >> > >> -igor > >> > >> On Wed, Jun 17, 2009 at 10:29 AM, Joe Fawzy wrote: > >> > Hi alli need to implement something like a conversation scope in > wicket > >> > i know that wicket is stateful by default and i can pass object o from > >> page > >> > A -> page B > >> > But if Object o in page A which -> page B -> page C -> page D -> page > E > >> > and i need Object o in page E ,that will be very tedious to pass o all > >> > throught the way from A > ..E > >> > also if i need to pass a large number of objects between a set of > pages > >> > ,this will be a nightmare > >> > > >> > so How can i implement a Conversation object ala Session and store > these > >> > objects there > >> > > >> > i thought of using the IPageMap as a key in this situation as it > >> represent > >> > an open browser window or tab ie. conversation, but in a previous mail > ,i > >> > 've been tald that it cannot be extended easily, and i cannot provide > my > >> own > >> > factory for one > >> > > >> > so, any ideas about the conversation scope? > >> > what do u think about the pageMap ? will it work? is it reliable? > >> > can the core team provide some hooks to implement something like > >> > IPageMapFactory? > >> > > >> > thanks > >> > Joe > >> > > >> > >> - > >> 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: Conversation scope in wicket
Hi dearthanks for the reply and for the code snippet But, do u think that using pageMap is reliable or what i mean , is using pageMap is a good solution or just a hack, work around thanks Joe On Wed, Jun 17, 2009 at 8:58 PM, Igor Vaynberg wrote: > class mysession extends websesison { > private map> coversations; > > public map getconversation(ipagemap pmap) { >return conversations.get(pmap.getid()); > } > } > > -igor > > On Wed, Jun 17, 2009 at 10:29 AM, Joe Fawzy wrote: > > Hi alli need to implement something like a conversation scope in wicket > > i know that wicket is stateful by default and i can pass object o from > page > > A -> page B > > But if Object o in page A which -> page B -> page C -> page D -> page E > > and i need Object o in page E ,that will be very tedious to pass o all > > throught the way from A > ..E > > also if i need to pass a large number of objects between a set of pages > > ,this will be a nightmare > > > > so How can i implement a Conversation object ala Session and store these > > objects there > > > > i thought of using the IPageMap as a key in this situation as it > represent > > an open browser window or tab ie. conversation, but in a previous mail ,i > > 've been tald that it cannot be extended easily, and i cannot provide my > own > > factory for one > > > > so, any ideas about the conversation scope? > > what do u think about the pageMap ? will it work? is it reliable? > > can the core team provide some hooks to implement something like > > IPageMapFactory? > > > > thanks > > Joe > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Conversation scope in wicket
Hi alli need to implement something like a conversation scope in wicket i know that wicket is stateful by default and i can pass object o from page A -> page B But if Object o in page A which -> page B -> page C -> page D -> page E and i need Object o in page E ,that will be very tedious to pass o all throught the way from A > ..E also if i need to pass a large number of objects between a set of pages ,this will be a nightmare so How can i implement a Conversation object ala Session and store these objects there i thought of using the IPageMap as a key in this situation as it represent an open browser window or tab ie. conversation, but in a previous mail ,i 've been tald that it cannot be extended easily, and i cannot provide my own factory for one so, any ideas about the conversation scope? what do u think about the pageMap ? will it work? is it reliable? can the core team provide some hooks to implement something like IPageMapFactory? thanks Joe
Re: status of the PageMap
Hi So this is the current status, what about future plans?, How can i provide my own custom implementation? thanks Joe On Tue, Jun 16, 2009 at 9:19 PM, Johan Compagner wrote: > in 1.4 it is still an part of wicket. > > But it is not that needed anymore as before but that is sinse 1.3 when we > started saving to disk. > > johan > > > > On Tue, Jun 16, 2009 at 20:03, Joe Fawzy wrote: > > > Hi alli was wondering , what is the status of the pageMap? > > i saw in the wiki some articles talking about it will be deprecated, so > is > > that true? i can see it in the 1.4 docs, is that for backward > compatability > > or it still a essential part of the platform? > > How can i plug my own custom subclass of PageMap and make the framework > use > > it instead of the stock ones > > thanks > > Joe > > >
status of the PageMap
Hi alli was wondering , what is the status of the pageMap? i saw in the wiki some articles talking about it will be deprecated, so is that true? i can see it in the 1.4 docs, is that for backward compatability or it still a essential part of the platform? How can i plug my own custom subclass of PageMap and make the framework use it instead of the stock ones thanks Joe
Re: IRequestTarget not serializable
hi dearu have to process the target during its lifecycle time and store that result into something serializable for future use so u have to make the decision during the first request where the request target is valid not the second joe On Fri, May 22, 2009 at 4:34 PM, Juan G. Arias wrote: > I have this link, that I create in different ways. It performs some logic, > and then redirects to somewhere, depending on how was created. > Here is the code: > > class SignOutLink extends Link { > private IRequestTarget target; > > public SignOutLink(String id, Class redirectPage) { > this(id, new BookmarkablePageRequestTarget(redirectPage)); > } > > public SignOutLink(String id, String url) { > this(id, new RedirectRequestTarget(url)); >} > > public SignOutLink(String id, IRequestTarget target) { > super(id); > this.target = target; > } > > public void onClick() { > this.signOutSession(); > this.redirectSignInPage(); > } > > public abstract void signOutSession(); > > public void redirectSignInPage() { > this.getRequestCycle().setRequestTarget(this.target); > } > } > > > On Thu, May 21, 2009 at 8:08 PM, Matej Knopp > wrote: > > > IRequestTarget is valid only for one request. Why do you want to keep > > as instance variable? > > > > -Matej > > > > On Thu, May 21, 2009 at 11:48 PM, Juan G. Arias > > wrote: > > > Hi all, > > > I want to mantain an IRequestTarget in my component, as an instance > > > attribute. But wicket cries about it's not serializable. > > > Of course, it's right. IRequestTarget is not serializable. > > > > > > Why? Is something wrong with mantain a request target inside my > > component? > > > > > > Thanks! > > > Juan > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > >
Re: fragment markup resolution
Hi Jamesthanks for sharing this i wanna ask , why there is not a unified effort for rapid application dev , why not combine wicket RAD , and wicket web beans and wicketopia thanks Joe On Fri, May 22, 2009 at 3:15 PM, James Carman wrote: > You could try something like this: > > > https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/component/editor/FormComponentEditorPanel.java > > > On Fri, May 22, 2009 at 7:07 AM, Joe Fawzy wrote: > > hi dearthanks for ur reply > > actually i donot often use the wicket:child and wicket:extend as i prefer > > borders for common layout > > is this the only way to get the fragment markup in subclass > > thanks again > > Joe > > > > On Fri, May 22, 2009 at 1:57 PM, James Carman > > wrote: > > > >> The fragments should be able to be found in the parent class' markup > >> file. You don't need to duplicate the fragment definitions if you're > >> using markup inheritance. > >> > >> On Fri, May 22, 2009 at 12:38 AM, Joe Fawzy > wrote: > >> > hiactually i am making a framework over wicket in which i am providing > a > >> > default ui in the base class , which can be customized by overriding > in > >> > subclass > >> > in this case , when i subclass , i have to duplicate all the fragments > >> > markup ,instead of only what i need > >> > thanks > >> > joe > >> > > >> > On Thu, May 21, 2009 at 5:48 PM, Mathias Nilsson < > >> > wicket.program...@gmail.com> wrote: > >> > > >> >> > >> >> Sounds like you should use panels instead of Fragments if they are > used > >> >> more > >> >> then one time. > >> >> -- > >> >> View this message in context: > >> >> > >> > http://www.nabble.com/fragment-markup-resolution-tp23645152p23654434.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 > >> > >> > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Ajax appends to a Table
hi dearwicket ajax support is designed and optimised for **updating** or replacing existing components not appending actually u will find appending table raw a buggy feature in IE i use a work around ,by adding several invisible rows then upon need i update them one by one Waiting for a better approach Joe On Fri, May 22, 2009 at 1:59 PM, James Carman wrote: > You usually have to update the whole table via Ajax when doing > modifications to it. > > On Fri, May 22, 2009 at 1:32 AM, Luther Baker > wrote: > > Hi, > > > > I have an 'Add Row' Ajax link and a Table. The table contains a list of > > todos. > > > > To 'add' a todo, I have created a single full of 's and > that, via Ajax, get shown when someone clicks on the aforementioned 'Add > > Row' link. > > > > Now, on submission of said row, I'd like to append it to the bottom of > the > > table such that, one might be able to add 'another' row. > > > > Is there an easy way to do this or would I simply want to encapsulate the > > entire table and refresh it via Ajax. I'm not sure that'd be as easy as I > > hoped either since, I'd be creating the markup, etc in the Java class for > > the extra row. > > > > Also, to be true to form, is it normal to show that of without > > a formal encapsulating tag or should I wrap the table in a big > form > > to be sure any inputs in the table are formally encapsulated by a form. > > > > Just looking for some pointers in the right direction on basically, how > to, > > via Ajax, create blank rows, allow submissions and then append said rows > to > > a table without formally GET or POSTing the entire page. Many thanks. > > > > -Luther > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: fragment markup resolution
hi dearthanks for ur reply actually i donot often use the wicket:child and wicket:extend as i prefer borders for common layout is this the only way to get the fragment markup in subclass thanks again Joe On Fri, May 22, 2009 at 1:57 PM, James Carman wrote: > The fragments should be able to be found in the parent class' markup > file. You don't need to duplicate the fragment definitions if you're > using markup inheritance. > > On Fri, May 22, 2009 at 12:38 AM, Joe Fawzy wrote: > > hiactually i am making a framework over wicket in which i am providing a > > default ui in the base class , which can be customized by overriding in > > subclass > > in this case , when i subclass , i have to duplicate all the fragments > > markup ,instead of only what i need > > thanks > > joe > > > > On Thu, May 21, 2009 at 5:48 PM, Mathias Nilsson < > > wicket.program...@gmail.com> wrote: > > > >> > >> Sounds like you should use panels instead of Fragments if they are used > >> more > >> then one time. > >> -- > >> View this message in context: > >> > http://www.nabble.com/fragment-markup-resolution-tp23645152p23654434.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 > >
Forms and autoAdd
hi allcan i use autoAdd() to add FormComponents to a form and expect the form to behave normally and all its lifecycle get executed normally, including model binding and error check i know taht components added via autoAdd() didn't serialized or persisted between requests , so how this affect form lifecycle thanks joe
Re: fragment markup resolution
hiactually i am making a framework over wicket in which i am providing a default ui in the base class , which can be customized by overriding in subclass in this case , when i subclass , i have to duplicate all the fragments markup ,instead of only what i need thanks joe On Thu, May 21, 2009 at 5:48 PM, Mathias Nilsson < wicket.program...@gmail.com> wrote: > > Sounds like you should use panels instead of Fragments if they are used > more > then one time. > -- > View this message in context: > http://www.nabble.com/fragment-markup-resolution-tp23645152p23654434.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 > >
fragment markup resolution
hi alli have several pages which have a lot of fragments , this works fine when i subclassed this page class , i may change only one fragment or even no one at all but override a method, yet i have to duplicate all the markup for all the fragments even if they are just a clones of those in the bse class so , is there any way to make wicket lookup the fragments markup in the base page if it is not found in the page or what do i have to inplement custom markup resolver? any key or pointer on how this can b achieved? thanks in advance.. Joe
wicket 1.3 project
hi all www.websketch.com.this is a wicket project.wicket1.3+spring2.5+tomcat6+mysql. i want user can give me some option.thx. joe ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/
Re: wicket integrate acegi
thank per newgro if you clean cache and cookie ,i don' t get the login user's session do you have get the login user's session method? joe --- 09年4月16日,周四, Per Newgro 写道: 发件人: Per Newgro 主题: Re: wicket integrate acegi 收件人: users@wicket.apache.org 日期: 2009,416,周四,4:19下午 You could invalidate your session on logout? Session.get().invalidate(); Or do you have issues on that? Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/
how control user enter url error.
Hi All, second error We are using Sitemesh2.2.1 along with wicket1.3.1 in our product. The sitemesh JSP page contains SCRIPT and LINK tags to include styles and functions that will determine the header and footer for the wicket pages. When I use the URL like http://www.X.com/upgrade where as helpDetails is the page, it works fine. But when I try using http://www.X.com/upgrade/asd, wicket throws error for all the entries like SCRIPT and LINK tags in the sitemesh jsp page. We are using mountBookmarkablePage as the url stratergy. i want url return to http://www.X.com/upgrade page when user try using http://localhost../helpDetails/topic/xyz/sd, The error message is as follows 04 15,2009 14:09 ERROR - RequestCycle.logRuntimeException(1414) | URL fragment has unmatched key/value pair: sd java.lang.IllegalStateException: URL fragment has unmatched key/value pair: sd at org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:174) at org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:76) at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:475) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:175) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.splashnote.util.JsessionIdUtil.doFilter(JsessionIdUtil.java:84) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.splashnote.web.MessageFilter.doFilter(MessageFilter.java:42) Thanks, Joe ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/
Re: URL error?
thanks johan my js and css is relative urls.i will use js and css file absolut urls. --- 09年4月15日,周三, Johan Compagner 写道: 发件人: Johan Compagner 主题: Re: URL error? 收件人: users@wicket.apache.org, huanghu...@yahoo.cn 日期: 2009,415,周三,1:37下午 Are your js and css files really also under that mount? I guess not So you have to rewrite your links to those resources in your markup so that they dont use relative urls On 15/04/2009, Joe wrote: > > > > Hi All, > We are using Sitemesh2.2.1 along with wicket1.3.1 in our product. > The sitemesh JSP page contains SCRIPT and LINK tags to include styles and > functions that will determine the header and footer for the wicket pages. > When I use the URL like http://localhost.../helpDetails?topic=xyz where as > helpDetails is the page, it works fine. > But when I try using http://localhost../helpDetails/topic/xyz/, wicket > throws error for all the entries like SCRIPT and LINK tags in the sitemesh > jsp page. > We are using mountBookmarkablePage as the url stratergy. > The error message is as follows > ERROR - RequestCycle.logRuntimeException(1399) | URL fragment has unmatched > key/value pair: subtopic/display_css/style.css > java.lang.IllegalStateException: URL fragment has unmatched key/value pair: > subtopic/display_css/style.css > at > org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:174) > at > org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:76) > at > org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:475) > at > org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:175) > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) > > ERROR - RequestCycle.logRuntimeException(1399) | URL fragment has unmatched > key/value pair: subtopic/js/jquery-1.2.3.js > java.lang.IllegalStateException: URL fragment has unmatched key/value pair: > subtopic/js/jquery-1.2.3.js > at > org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:174) > at > org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:76) > at > org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:475) > at > org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:175) > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) > > Thanks, > Joe > > > ___ > 好玩贺卡等你发,邮箱贺卡全新上线! > http://card.mail.cn.yahoo.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/
URL error?
Hi All, We are using Sitemesh2.2.1 along with wicket1.3.1 in our product. The sitemesh JSP page contains SCRIPT and LINK tags to include styles and functions that will determine the header and footer for the wicket pages. When I use the URL like http://localhost.../helpDetails?topic=xyz where as helpDetails is the page, it works fine. But when I try using http://localhost../helpDetails/topic/xyz/, wicket throws error for all the entries like SCRIPT and LINK tags in the sitemesh jsp page. We are using mountBookmarkablePage as the url stratergy. The error message is as follows ERROR - RequestCycle.logRuntimeException(1399) | URL fragment has unmatched key/value pair: subtopic/display_css/style.css java.lang.IllegalStateException: URL fragment has unmatched key/value pair: subtopic/display_css/style.css at org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:174) at org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:76) at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:475) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:175) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) ERROR - RequestCycle.logRuntimeException(1399) | URL fragment has unmatched key/value pair: subtopic/js/jquery-1.2.3.js java.lang.IllegalStateException: URL fragment has unmatched key/value pair: subtopic/js/jquery-1.2.3.js at org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:174) at org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:76) at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:475) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:175) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) Thanks, Joe ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/
RE: Newbie IMG question
Hello Martijn: Thank you for your prompt reply. This was exactly what I needed. I did purchase your Wicket in Action book and I started reading it yesterday. The book is great! I also appreciate the high quality sample application, which will be very helpful as I begin to create my own applications. Regards, Joe Caristi -Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2008 9:54 AM To: users@wicket.apache.org Subject: Re: Newbie IMG question it depends where you put the image. If you put it next to the html and java file, you should surround the img tag with otherwise Wicket won't know that you want Wicket to serve the image. If you put it in the context root, then usually you don't have to do anything (depending on your filter mapping). If you want to control the image from Java code, but still put it in the context root, then you should use the ContextImage component. Martijn On Fri, Nov 14, 2008 at 3:37 PM, jcaristi <[EMAIL PROTECTED]> wrote: > > I am using Wicket 1.4-rc1 (I also tried 1.3.5). I have a very simple > application with a very simple IMG tag: > > img src="whi-06sliced_02.gif" > > In the browser, the image does not display and the page source looks like > this: > > img src="../whi-06sliced_02.gif" > > From all of the documentation I've read, this does not seem to be the > correct behavior. I've tried locating the image everywhere I can think of, > without success. I think the image should be in the same folder (or a > sub-folder) of the Java and HTML for the page. Is this correct? How do I > get the relative path to be properly set? > > Here is my web.xml: > > >WicketFilter > > org.apache.wicket.protocol.http.WicketFilter > >applicationClassName >com.whisolutions.pss.web.NexPartPS > > > >WicketFilter >/admin/* > > > Here is the code: > > http://www.nabble.com/file/p20501647/ServerCode.java ServerCode.java > http://www.nabble.com/file/p20501647/ServerCode.html ServerCode.html > http://www.nabble.com/file/p20501647/NexPartPS.java NexPartPS.java > > I'm using Maven for the Wicket dependency: > > >org.apache.wicket >wicket >1.4-rc1 > > > -- > View this message in context: > http://www.nabble.com/Newbie-IMG-question-tp20501647p20501647.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify WHI Solutions immediately at [EMAIL PROTECTED], and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: Java and Business Entrepreneur
We are a start-up with an innovative advertising platform looking for a Java expert with great business sense and knowledge of Internet Advertising to round out the team. This person should have experience with large enterprise Java web applications and the ability to think creatively and strategically in order to grow the business from the technology. You'll function as a key member of the founding team and help drive the company vision and direction. We've received validation from some key industry players and have some notable names signed up to beta test our product. The web application is built in Java 6 with the following: Spring 2.5, Hibernate 3.2.5, Wicket 1.3.0, various Apache Commons projects and the source is managed via Subversion with Maven 2 handling the builds. This is an equity-based, partnership opportunity, not a 9-5 job. We're looking for that unique person who's got the talent and ambition. To learn more contact me directly: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Drag and Drop DataTable rows
Anyone create a drag and drop reordering component out of a DataTable? I want to reorder the rows via drag and drop. I see the scriptaculous SortableListView, but I would have to significantly change a lot of my pages. Anyone tackle this? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 302 vs. 301 Redirect
I think so...something like res.setHeader("Location", "http://301redirect.com/ ); res.setStatus(301); On Thu, 2007-12-06 at 15:43 +0100, Johan Compagner wrote: > what is the right way for a permanent redirect in the servlet spec? > do it all yourself? Including making the url fully qualified? > > On Dec 6, 2007 9:49 AM, Joe Toth <[EMAIL PROTECTED]> wrote: > > > I wasn't suggesting changing the functionality of setRedirect, but > > instead maybe adding setPermanentRedirect(true) or another way for > > wicket to be able to perform a 301. > > > > > > On Wed, 2007-12-05 at 13:43 +, Gwyn Evans wrote: > > > I think the one thread was "Consistent homepage URL" from 2005Q2 - I > > > think the gist was that in the scenario there, it wasn't desirable > > > having the redirected URL becoming the one that the search engines > > > would always go to. > > > > > > /Gwyn > > > > > > On 04/12/2007, Johan Compagner <[EMAIL PROTECTED]> wrote: > > > > Long long time ago we had discussions about this, i think also related > > > > to what google expects. I guess what we now have is a result of that. > > > > But i cant remember what the pros and cons are > > > > > > > > 2007/12/4, Joe Toth <[EMAIL PROTECTED]>: > > > > > When you setRedirect(true), wicket does a 302, temporary, redirect. > > The > > > > > basic rule of thumb in SEO is if you want to pass all authority to a > > > > > different page use 301 (permanent). > > > > > > > > > > > > http://www.seotoday.com/browse.php/category/articles/id/477/index.php > > > > > > > > > > Thoughts on adding something to Wicket to support this > > functionality? > > > > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 302 vs. 301 Redirect
I wasn't suggesting changing the functionality of setRedirect, but instead maybe adding setPermanentRedirect(true) or another way for wicket to be able to perform a 301. On Wed, 2007-12-05 at 13:43 +, Gwyn Evans wrote: > I think the one thread was "Consistent homepage URL" from 2005Q2 - I > think the gist was that in the scenario there, it wasn't desirable > having the redirected URL becoming the one that the search engines > would always go to. > > /Gwyn > > On 04/12/2007, Johan Compagner <[EMAIL PROTECTED]> wrote: > > Long long time ago we had discussions about this, i think also related > > to what google expects. I guess what we now have is a result of that. > > But i cant remember what the pros and cons are > > > > 2007/12/4, Joe Toth <[EMAIL PROTECTED]>: > > > When you setRedirect(true), wicket does a 302, temporary, redirect. The > > > basic rule of thumb in SEO is if you want to pass all authority to a > > > different page use 301 (permanent). > > > > > > http://www.seotoday.com/browse.php/category/articles/id/477/index.php > > > > > > Thoughts on adding something to Wicket to support this functionality? > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
302 vs. 301 Redirect
When you setRedirect(true), wicket does a 302, temporary, redirect. The basic rule of thumb in SEO is if you want to pass all authority to a different page use 301 (permanent). http://www.seotoday.com/browse.php/category/articles/id/477/index.php Thoughts on adding something to Wicket to support this functionality? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Matt Raible's ApacheCon presentation
Compare the java code to something in velocity/jsp like... href="/path/to/something.jsp?id=${draft.id}" ...I know, I know...you really can't compare the 2 because wicket's version can have a lot more functionality easily. But, your ABSOLUTELY POSITIVELY right about paying with maintainability, except you still have to maintain the HTML file, yuck. 99.9% of the time I am very very happy with Wicket and wish that everyone used it. I hate working on JSP/JSF projects because "it's the standard and blah blah crap crap". I liked the last "Con" though. "Everything has to be done in Java" - I know what you meant, but its still funny. I wish everything could be done in Java, even the design. And I don't mean HTML+CSS, but some magically awesome design engine that would output HTML+CSS. With a Wicket application its A LOT easier to figure out where everything is and how it gets there. OO w00t. Ah, the days of PHP/JSP hell. On Thu, 2007-11-15 at 21:20 -0800, Eelco Hillenius wrote: > > Example would be a link on a table... > > > > > > columns.add(new LinkPropertyColumn(new Model("Delivery"), > > new Model( > > "change")) { > > @Override > > public Link createLink(final Item item, String > > componentId, > > final IModel model) { > > return new Link(componentId) { > > @Override > > public void onClick() { > > ReportStatistic > > reportStatistic = (ReportStatistic) model > > > > .getObject(); > > DraftProduct draft = > > productService > > > > .getDraftProduct(reportStatistic.getReportId()); > > setResponsePage(new > > ReportDelivery(draft)); > > } > > }; > > } > > }); > > > > For the record, this code fragment doesn't look like 'too much Java' > to me tbh. The decision to load the draft and redirect to another page > could be done in Velocity, but would immediately mean that you pay > with maintainability. > > Eelco > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Matt Raible's ApacheCon presentation
I agree with the "Too much java" statement. Sometimes you have to create a bunch of stuff that would be a lot easier to do in a velocity template. It only takes a couple of seconds more to do it, but it just makes everything 'seem' bigger. Example would be a link on a table... columns.add(new LinkPropertyColumn(new Model("Delivery"), new Model( "change")) { @Override public Link createLink(final Item item, String componentId, final IModel model) { return new Link(componentId) { @Override public void onClick() { ReportStatistic reportStatistic = (ReportStatistic) model .getObject(); DraftProduct draft = productService .getDraftProduct(reportStatistic.getReportId()); setResponsePage(new ReportDelivery(draft)); } }; } }); On Thu, 2007-11-15 at 15:02 -0800, Alexis wrote: > Pros : > * Statefull > * Steady features (simple Ajax built-in, validation, ...) > * Can do simple stuff quickly without knowing the internals (good for java > developpers without web experiences) > > Cons : > * Not stateless (i'm talking about the stable 1.2 here) > * Too much alternatives to do quite the same things (markup inheritance vs > borders; passing component's constructors models, full objects or even > components; ListView vs DataView vs GridView ...) > * TOO MUCH JAVA and too component oriented: in fact on some pages you need > to create some components (panels, fragment, or inner classes) to write > maintenable code whereas these components will never be reused elsewhere. In > general you need some effort and focus to produce maintenable code on not so > complex pages / components, this is my biggest con. > > > Martijn Dashorst wrote: > > > > Pros: > > * elegant solutions to problems using object oriented programming are > > possible again > > * unspoiled (by model2 framework) graduates can create complex UI's > > almost instantly > > * you actually need to engage your brain at times > > * custom component creation is *really* easy: just use extends (tm) > > > > Cons: > > * single threaded model for responding to client actions: a lot is > > sync'd on the pagemap > > * you actually need to engage your brain at times > > * getting to know the internals can be quite challenging as it is a > > complex beast > > * too easy to create complex UI's that show the world and then some > > * sometimes the limitations of HTML/the web leak into the wicket > > world, making it tougher for new web developers as they are presented > > with quite an abstraction (keeping state in forms across requests in > > tabbed panels) > > > > Martijn > > > > On 11/15/07, mraible <[EMAIL PROTECTED]> wrote: > >> > >> FWIW, I'd like to replace the pros and cons (my opinions) with some that > >> are > >> more accurate. As users of Wicket, I'd love to hear from you and get your > >> opinions on the top 3 pros and cons of Wicket. > >> > >> Here's the ones I currently have: > >> > >> Pros: > >> > >> * Great for Java developers, not web developers > >> * Tight binding between pages and views > >> * Active community - support from the creators > >> > >> Cons: > >> > >> * HTML templates live next to Java code > >> * Need to have a good grasp of OO > >> * The Wicket Way - everything done in Java > >> > >> IMO, there's no need to debate whether these are valid or not. If they're > >> not - please suggest new ones. James Ward of Flex had a nice and honest > >> comment this morning pointing out Flex's cons: > >> > >> http://tinyurl.com/yvybnm > >> > >> Thanks, > >> > >> Matt > >> > >> > >> Sean Sullivan-3 wrote: > >> > > >> > fyi > >> > > >> > > >> http://raibledesigns.com/rd/entry/comparing_jvm_web_frameworks_presentation > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Matt-Raible%27s-ApacheCon-presentation-tf4815955.html#a13780071 > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > > Buy Wicket in Action: http://manning.com/dashorst > > Apache Wicket 1.3.0-rc1 is released > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/ > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] >
Re: Cache Panel
No, sorry should of specified, the output generated from a component. On Wed, 2007-10-24 at 08:25 -0700, Igor Vaynberg wrote: > you are talking about the markup for an actual component? you store > that in the database? > > in that case let your component implement imarkupcachekeyprovider that > generates different keys based on some timeout or whatever it is you > need. > > -igor > > > On 10/24/07, Joe Toth <[EMAIL PROTECTED]> wrote: > > How would I render the component and stick the contents into a label? > > > > If possible, I would like to do something like the following... > > > > String render() { > > > > String markup = cache.get(); > > if (cacheExpired || markup == null) { > >markup = render(); > > } > > > > return markup; > > } > > > > I know there is no "String render()" method, but this just shows what I > > would like to accomplish. > > > > Thanks! > > > > > > On Tue, 2007-10-23 at 20:00 -0700, Igor Vaynberg wrote: > > > use any cache you want to cache it, and stick the contents into a label > > > > > > -igor > > > > > > > > > On 10/23/07, Joe Toth <[EMAIL PROTECTED]> wrote: > > > > There are some operations that are kind of complicated, rather than dig > > > > into those operations and try to cache things, it would be A LOT easier > > > > to just stick a cache in front of it all. > > > > > > > > > > > > > > > > On Tue, 2007-10-23 at 21:01 -0500, Jeremy Thomerson wrote: > > > > > The first thing to ask yourself would be if you really need to do > > > > > that. > > > > > HTML generation is extremely fast, and generally does not need to be > > > > > cached. If page generation is taking a long time, it is likely that > > > > > DB > > > > > operations or external service operations are what needs to be cached. > > > > > > > > > > Was there a particular reason you had in mind for caching the HTML? > > > > > > > > > > Jeremy Thomerson > > > > > > > > > > On 10/23/07, Joe Toth <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > I have a bunch of Panels where the generated HTML can be cached for > > > > > > a > > > > > > period of time. > > > > > > > > > > > > What's the best way to go about doing something like this? > > > > > > > > > > > > Thanks! > > > > > > > > > > > > > > > > > > - > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cache Panel
How would I render the component and stick the contents into a label? If possible, I would like to do something like the following... String render() { String markup = cache.get(); if (cacheExpired || markup == null) { markup = render(); } return markup; } I know there is no "String render()" method, but this just shows what I would like to accomplish. Thanks! On Tue, 2007-10-23 at 20:00 -0700, Igor Vaynberg wrote: > use any cache you want to cache it, and stick the contents into a label > > -igor > > > On 10/23/07, Joe Toth <[EMAIL PROTECTED]> wrote: > > There are some operations that are kind of complicated, rather than dig > > into those operations and try to cache things, it would be A LOT easier > > to just stick a cache in front of it all. > > > > > > > > On Tue, 2007-10-23 at 21:01 -0500, Jeremy Thomerson wrote: > > > The first thing to ask yourself would be if you really need to do that. > > > HTML generation is extremely fast, and generally does not need to be > > > cached. If page generation is taking a long time, it is likely that DB > > > operations or external service operations are what needs to be cached. > > > > > > Was there a particular reason you had in mind for caching the HTML? > > > > > > Jeremy Thomerson > > > > > > On 10/23/07, Joe Toth <[EMAIL PROTECTED]> wrote: > > > > > > > > I have a bunch of Panels where the generated HTML can be cached for a > > > > period of time. > > > > > > > > What's the best way to go about doing something like this? > > > > > > > > Thanks! > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cache Panel
There are some operations that are kind of complicated, rather than dig into those operations and try to cache things, it would be A LOT easier to just stick a cache in front of it all. On Tue, 2007-10-23 at 21:01 -0500, Jeremy Thomerson wrote: > The first thing to ask yourself would be if you really need to do that. > HTML generation is extremely fast, and generally does not need to be > cached. If page generation is taking a long time, it is likely that DB > operations or external service operations are what needs to be cached. > > Was there a particular reason you had in mind for caching the HTML? > > Jeremy Thomerson > > On 10/23/07, Joe Toth <[EMAIL PROTECTED]> wrote: > > > > I have a bunch of Panels where the generated HTML can be cached for a > > period of time. > > > > What's the best way to go about doing something like this? > > > > Thanks! > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cache Panel
I have a bunch of Panels where the generated HTML can be cached for a period of time. What's the best way to go about doing something like this? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Entity Classes
Salve is interesting... One problem, user-module does not know about accounting-module. On Wed, 2007-10-10 at 00:30 +0200, Gerolf Seitz wrote: > heh, i knew this would come up ;) > > On 10/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > > with Salve you can do it like this: > > > > UserBalance User.getBalance() { > > return accountingService.getBalance (user); > > } > > > > because your User domain object would have access to accountingService. > > > > see http://salve.googlecode.com > > > > -igor > > > > On 10/9/07, Joe Toth <[EMAIL PROTECTED]> wrote: > > > This is a Hibernate question, but Eelco's 'class reloading' post > > > reminded me to ask on this list. I asked in the Hibernate forums, but > > > received no responses. Maybe someone here has a similar problem or some > > > thoughts/ideas. > > > > > > * The Problem > > > > > > Ok, so you have IoC where you inject services you want to use in other > > > services. Well basically I want to do something similar with my domain > > > model. > > > > > > I have 3 different maven modules. (I have a lot more, but for > > > simplicity's sake) > > > 1. user-module - Which contains a User.class with fields like > > > emailAddress, password, address information, etc. > > > 2. accounting-module - which depends on user-module and need to keep > > > track of a user's pending account balance, posted balance, etc > > > 3. mywebapp-module - which depends on accounting-module > > > > > > Currently > > > If I want to get a user's account balance I have to > > > User user = userService.getUser("id"); > > > UserBalance bal = accountingService.getBalance (user); > > > > > > It gets very cumbersome trying to write a ton of different queries to > > > retrieve data from the different tables. For instance if I want to get > > > someone's account balance via their e-mail address a query exists in the > > > userService.findByEmailAddress(), but I have to write another method in > > > the accountingService to do this again. > > > > > > * What Hibernate offers > > > > > > 1. Hibernate offers dynamic mode where you can persist fields via a > > > Map, but you have to set the mode on a 'per session' basis. > > > a. This solution could work if you could have POJO and DYNAMIC-MAP > > > in the same session. (which I don't see why this wouldn't be possible) > > > 2. Hibernate offers dynamic components, but User.class has to know > > > about the dynamic components and they cannot be dynamically wired up. > > > > > > * What I've been working on > > > > > > Modules contributing fields to models of other modules. > > > Instead of UserBalance becoming its own class its now an interace that > > > 'contributes' its fields (via getters/setters) to the User.class so I > > > can do this. > > > User user = userService.findByEmailAddress("[EMAIL PROTECTED]"); > > > UserBalance balance = (UserBalance) user; > > > > > > The only way I can think of to accomplish this is by creating new > > > classes via javassist/cglib. > > > > > > 1. I take User.class and see if there are any interfaces that want to > > > contribute their fields to User.class > > > 2. I create a new class that extends User.class with the new fields, > > > User$Enhanced.class > > > 3. Then for each class with a field User.class I replace it with the > > > newly generated class > > > > > > There is one big downfall to this approach. You can't create classes via > > > the new operator. > > > User user = new User(); > > > UserBalance balance = (UserBalance) user; <-- User does not implement > > > UserBalance, throwsClassCastException. > > > balance.setPending(0.0); > > > session.save(user); <-- Hibernate does not know about a User entity, > > > only the new User$Enhanced.class! > > > > > > You have to create objects via a factory so the object is actually of > > > type User$Enhanced > > > User user = factory.create(User.class); > > > > > > This is where class reloading would come in handy! > > > > > > * Conclusion > > > I have not finished a prototype of this yet as there is a big learning > > > curve of (byte code engineering) playing wi
Dynamic Entity Classes
This is a Hibernate question, but Eelco's 'class reloading' post reminded me to ask on this list. I asked in the Hibernate forums, but received no responses. Maybe someone here has a similar problem or some thoughts/ideas. * The Problem Ok, so you have IoC where you inject services you want to use in other services. Well basically I want to do something similar with my domain model. I have 3 different maven modules. (I have a lot more, but for simplicity's sake) 1. user-module - Which contains a User.class with fields like emailAddress, password, address information, etc. 2. accounting-module - which depends on user-module and need to keep track of a user's pending account balance, posted balance, etc 3. mywebapp-module - which depends on accounting-module Currently If I want to get a user's account balance I have to User user = userService.getUser("id"); UserBalance bal = accountingService.getBalance (user); It gets very cumbersome trying to write a ton of different queries to retrieve data from the different tables. For instance if I want to get someone's account balance via their e-mail address a query exists in the userService.findByEmailAddress(), but I have to write another method in the accountingService to do this again. * What Hibernate offers 1. Hibernate offers dynamic mode where you can persist fields via a Map, but you have to set the mode on a 'per session' basis. a. This solution could work if you could have POJO and DYNAMIC-MAP in the same session. (which I don't see why this wouldn't be possible) 2. Hibernate offers dynamic components, but User.class has to know about the dynamic components and they cannot be dynamically wired up. * What I've been working on Modules contributing fields to models of other modules. Instead of UserBalance becoming its own class its now an interace that 'contributes' its fields (via getters/setters) to the User.class so I can do this. User user = userService.findByEmailAddress("[EMAIL PROTECTED]"); UserBalance balance = (UserBalance) user; The only way I can think of to accomplish this is by creating new classes via javassist/cglib. 1. I take User.class and see if there are any interfaces that want to contribute their fields to User.class 2. I create a new class that extends User.class with the new fields, User$Enhanced.class 3. Then for each class with a field User.class I replace it with the newly generated class There is one big downfall to this approach. You can't create classes via the new operator. User user = new User(); UserBalance balance = (UserBalance) user; <-- User does not implement UserBalance, throwsClassCastException. balance.setPending(0.0); session.save(user); <-- Hibernate does not know about a User entity, only the new User$Enhanced.class! You have to create objects via a factory so the object is actually of type User$Enhanced User user = factory.create(User.class); This is where class reloading would come in handy! * Conclusion I have not finished a prototype of this yet as there is a big learning curve of (byte code engineering) playing with javassist. I spent a whole day playing with this when I have other priorities, but this could speed up development immensely. Whoever read this, can you give me some feedback? Think its a good idea? Think a slippery slope of problems will unfurl once I get a prototype running? Are there any other existing solutions? Thanks everyone! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ANN: beturtle.com launched
Hi Everyone, We just launched http://beTurtle.com/ - A 'green' social networking site. If your interested in healthy living, sustainable practices, have 'green' questions or just want to make some new friends, stop on by. Let us know what you think, we would really appreciate it. It runs on Spring2, Hibernate3, Wicket 1.3 plus many other open source projects. Without Wicket and the other frameworks I wouldn't have been able to develop the entire site so quickly. Thank you so much everyone for the great framework and answering any questions I had. Joe Toth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FormComponentPanel and CompoundPropertyModel
I have a FormComponentPanel, I want it to get and set a property from the Form it belongs to who's model is a CompoundPropertyModel. When the FormComponentPanel is loaded, how can I get the backing model's object whether someone passes in a Model or it should get it from the parent? If my FormComponentPanel only has a (String id, IModel model) constructor this is easy. But I want it to also support CompoundPropertyModels from the parent. (String id) I have to initialize a couple of DropDown's with data from the model. Any thoughts? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]