Re: Proper resource versioning
I don't think there's anything wrong with serving resources from the webapp-folder, and making the webapp container (e.g. jetty) responsible for serving them instead of Wicket. Most webapp containers will serve static resources much more efficiently than any servlet-based (including Wicket's) approach will do. It's also easier to switch to CDN, because your resources are already served as static resources. Just change to the new URL's. The container should be able to serve your static resources with proper long-time caching headers. You should make sure that the paths of these resources contain a version, so that when you update a resource to a new version, clients will see it as a new (uncached) resource. You can add the links directly in your markup, or use UrlResourceReference in your java for this approach. The result is the same. Serving with Wicket (e.g. PackagedResourceReference) makes sense if: - You need the locale/style/variation resource lookups of PackagedResourceReference - You want Wicket to automatically detect new versions of resources (wicket changes the url to include a version number) - You want to serve resources from the classpath, instead of the webapp folder Cheers On Wed, Mar 27, 2013, at 23:24, Dan Retzlaff wrote: Hi, Bertrand. I don't have all your answers, but I can share my experience. First, when you say you serve files out of webapp folder, do you mean you're not using any ResourceReference? Just absolute paths from markup? I think improving that is the first thing to do. You need to process resource references in Java so you can introduce versions, CDN base URLs, etc. The main caching problem we had was that after upgrades, some clients had the old CSS cached and the site looked funky for them. So we went through and made sure all CSS is served through PackageResourceReferences. Wicket's default versioning strategy then did its magic and that complaint stopped. With respect to @import, we have many @imports in our source LESS, but by the time it's being served, the CSS is flat. So versioning that is enough. It's possible but I think far less likely that this kind of caching problem will happen for images and fonts. Direct references to these from our application still go through ResourceReferences just so they can be served from CDN, but we don't worry about relative-path includes from CSS. Hope that helps. Dan On Wed, Mar 27, 2013 at 2:15 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hello, I'm trying to figure out the optimal way to deal with caching and out of date resources and can't really find which methodology to adopt. Considering that: a) css and js files are only accessed from web pages b) image files are accessed from web pages and from email clients (links stored for a long time) c) image files are referenced from css (e.g. background-image url) d) font files are accessed from web pages and maybe eventually from email clients e) some css files currently use @import statements to include other css files (this could be removed if needed) f) css, js, fonts and images currently are all located in the webapp folder (i.e. I wasn't able to access them with PackageResourceReference) g) whatever the approach, it needs to be compatible with eventual usage of CDN services Questions: 1- Which files should be versioned? 2- Should they be versioned using Wicket's ResourceReferences? 3- Are there other considerations I haven't thought about? 4- Which successful approaches are in use now by other Wicker users? Thanks for your insight! Regards, Bertrand --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-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: AjaxButton doesn't work in WebMarkupContainer
Well the error messages kind of gives it away, doesn't it? But to explain further: setDefaultFormProcessing(false) doesn't mean the button can be placed outside a a form. It means that the default validation and submit behavior of the form is not executed when pressing the button. Why do you want to use AjaxButton? Outside a form AjaxLink does the job as you already discovered... On Thu, Mar 28, 2013, at 18:45, eugenebalt wrote: I have the below block of code. A Link or an AjaxLink works perfectly here inside a WebMarkupContainer. But when I use an AjaxButton (with a setDefaultFormProcessing=False), I get an error. Thanks AjaxButton linkCopy = new AjaxButton(linkCopy) { @Override protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) { // TODO Auto-generated method stub } }; linkCopy.setDefaultFormProcessing(false); wmcMarkup.add(linkCopy); Error: java.lang.IllegalStateException: form was not specified in the constructor and cannot be found in the hierarchy of the component this behavior is attached to at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.getForm(AjaxFormSubmitBehavior.java:92) at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.getEventHandler(AjaxFormSubmitBehavior.java:108) at org.apache.wicket.ajax.markup.html.form.AjaxButton$1.getEventHandler(AjaxButton.java:131) at org.apache.wicket.ajax.AjaxEventBehavior.onComponentTag(AjaxEventBehavior.java:111) at org.apache.wicket.behavior.AbstractAjaxBehavior.onComponentTag(AbstractAjaxBehavior.java:134) at org.apache.wicket.Component.renderComponentTag(Component.java:4009) at org.apache.wicket.Component.renderComponent(Component.java:2610) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxButton-doesn-t-work-in-WebMarkupContainer-tp4657633.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serverside caching of IResource's that are expensive to generate
Cool! I took a slightly different route, as explained in a previous mail. I may try to find some time to see if both implementations could be merged, but I'll have to check license issues first. What I built is tightly integrated with Less4J so I'm not so sure merging the two would make sense for wicket-bootstrap anyway. I put a few comments inline below. Will try to make some time free later to have a look at the pull request. Cheers On Wed, Mar 27, 2013, at 15:50, Martin Grigorov wrote: Hi, At https://github.com/l0rdn1kk0n/wicket-bootstrap/compare/cached-less you may see the diff between master and cached-less branches. I still have to discuss the changes with Michael Haitz but your feedback is welcome too! LessResourceReference is a specialization of CssResourceReference so it can be used like: @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); response.render(CssHeaderItem.forReference(new LessResourceReference(HomePage.class, demo.less))); } You don't need a CssResourceReference for that, any ResourceReference can be used like that. LessPackageResource is a specialization of CssPackageResource so all that is valid for CPR is valid for LPR too - compression, minified name, etc. Why would you want to have a minified name for your less source file? Only the output after compilation goes to the client. The compression (I guess you mean minification) can be handled by Less as well. The real logic is in LessCacheManager that handles the server side caching for the generated CSS content per Less resource. As I explained earlier: - if a request without 'If-Modified-Since' request header is being processed then the cache manager is being advised - if there is no CSS content entry in the cache then the Less resource is compiled on the fly - if there is CSS entry then it is returned - if there is 'If-Modified-Since' then it is used by the cache manager to compare it against the last modification time of the root Less resource and all imports in it - if the Less resource is newer then the cache manager returns either the generated CSS or re-generates a new one if the CSS has been generated is before the last modification of the Less file(s) Please note that LessSource.URLSource is not threadsafe, your CacheManager seems to assume that. I went the same route as you, caching LessSource, but made my own threadsafe LessSource implementation for that (and also to @imports much much more flexible). On Tue, Mar 26, 2013 at 11:29 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: Thanks! Just FYI: with Less4j it's actually quite easy to get the modification time of the most recently updated import, since it creates a list of all used imports on the top level LessSource On Tue, Mar 26, 2013, at 10:13, Martin Grigorov wrote: Hi, As Dan explained at the moment Wicket provides just the logic for client side caching. And this is enough for _static_ resources. The case with Less/SASS/Stylus and similar resources is a bit more complicated because they are not static, unless you compile them at the client side. Wicket uses the last modification time of the resource to decide whether to stream it back to the client. If the resource is not modified then response with code 304 (Not Modified) is returned, _without_ body. For dynamically created resources this is not enough. The CSS content should be generated once, for the first client, and then cached for all following clients. Response with code 304 should be returned for clients which have already received the compiled CSS content and the modification time of the .less file is still the same. The more complex logic should be in LessResourceStream#getModificationTime() - it may contain @import's and it should return the modification time of the import with the most recent update. CachingResourceStreamLocator is about caching the location of the resource, i.e. the location of the resource with the most specific attributes - locale, variation and style. Wicket will still read the input stream of the resource if the response is with code 200. CachingResourceStreamLocator just saves the time of checking all combinations of scope/name/locale/variation/style every time. I'll work to improve Wicket Bootstrap Less module with this. And probably ConcatBundleResource will need similar optimizations. On Tue, Mar 26, 2013 at 10:36 AM, Michael Haitz michael.ha...@1und1.dewrote: Wicket has a CachingResourceStreamLocator that caches the resource streams. here's my wicket less implementation, could be helpful too: https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/master/bootstrap-less Am 26.03.2013 um 01:01 schrieb Pointbreak pointbreak+wicketst...@ml1.net : I have implemented
Re: Serverside caching of IResource's that are expensive to generate
Fair enough. I also see that in deployment mode wicket actually caches the decorated url of resources for the entire application lifetime, so the Resource.getCacheableResourceStream isn't repeated each time a page is rendered with a reference to a resource. On Tue, Mar 26, 2013, at 2:09, Dan Retzlaff wrote: I believe Wicket's resource versioning and caching logic simply provides advice in HTTP response headers, and decorates filenames if so configured. Do your requests come directly to Wicket's container? We reverse proxy with HTTPD, which is probably better at caching than a Java solution could ever be. On Mon, Mar 25, 2013 at 5:01 PM, Pointbreak pointbreak+wicketst...@ml1.netwrote: I have implemented a LessCssResource (it generates a CSS resource from Less source files) + LessCssResourceReference. Since computing the CSS is expensive, I would like to cache the generated CSS on the server, once generated. It is unclear to me whether Wicket has mechanisms to do this. I expected that IStaticCacheableResource would also provide the means to do server side caching (in addition to setting the correct headers and decorating the url for client-side caching). But this doesn't seem to be the case. When I look at what happens when doing a second page request/refresh after all browser caches are cleared, it seems that for IResource's that implement IStaticCacheableResource (including my LessCssResource, but also e.g. ConcatBundleResource from wicket core): * Resource.newResourceResponse is called (which obviously results in a recompute of the entire response) * Resource.getCacheableResourceStream is called (which also does a recompute of the entire response) * All implementations of these methods in wicket core resources are designed so that both calls do a full recompute of the actual response (which duplicates the effort for every page that uses a resource) * The Resource itself is recreated for every request (I could cache it in e.g. LessCssResourceReference, but nothing in wicket core abuses ResourceReferences for server side caching of Resources, so I'd like to know if there is a better approach). I have looked at Wickets own implementations of Resources that would benefit from server side caching and happen to implement IStaticCachableResource (e.g. ConcatBundleResource) and they seem to have the same behaviour: no server-side caching, and for each request the resource is actually computed multiple times: once for the actual response, once for computing the cache-key to decorate the url. Hence I would like to know: * Should the duplicate expensive compute of various Wicket core IStaticCacheableResource implementations not be fixed? * Does Wicket provide any mechanism for server side caching of IResource implementations? Thanks - 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: Serverside caching of IResource's that are expensive to generate
CachingResourceStreamLocator only caches the location of files so that after the first lookup Wicket doesn't have to find out the correct locale, style, and variant for each consecutive request. It doesn't help with resources for which the content is expensive to generate. Like my LessCssResource, but also e.g. wickets ConcatBundleResource, or e.g. resources for server-side thumbnail creation. I had a quick look at your wicket less implementation yesterday. Mine is a bit different (as far as I can tell from a quick glance at the source): * I only support/use Less4J * I use the @import features of Less4J, you seem to have added your own way of bundling multiple less files into one * I added my own implementation of LessSource that allows @import lookups for classpath, and filesystem (also absolute paths), and use the style/variant in @import lookups in the same way wicket does for resource lookups. * I don't extends CssResourceReference, which also mitigates (I think) the need for a ResourceStreamLocator I would probably have tried your implementation first if it did support a flexible enough @import for my needs Cheers, Gerrit On Tue, Mar 26, 2013, at 9:36, Michael Haitz wrote: Wicket has a CachingResourceStreamLocator that caches the resource streams. here's my wicket less implementation, could be helpful too: https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/master/bootstrap-less Am 26.03.2013 um 01:01 schrieb Pointbreak pointbreak+wicketst...@ml1.net: I have implemented a LessCssResource (it generates a CSS resource from Less source files) + LessCssResourceReference. Since computing the CSS is expensive, I would like to cache the generated CSS on the server, once generated. It is unclear to me whether Wicket has mechanisms to do this. I expected that IStaticCacheableResource would also provide the means to do server side caching (in addition to setting the correct headers and decorating the url for client-side caching). But this doesn't seem to be the case. When I look at what happens when doing a second page request/refresh after all browser caches are cleared, it seems that for IResource's that implement IStaticCacheableResource (including my LessCssResource, but also e.g. ConcatBundleResource from wicket core): * Resource.newResourceResponse is called (which obviously results in a recompute of the entire response) * Resource.getCacheableResourceStream is called (which also does a recompute of the entire response) * All implementations of these methods in wicket core resources are designed so that both calls do a full recompute of the actual response (which duplicates the effort for every page that uses a resource) * The Resource itself is recreated for every request (I could cache it in e.g. LessCssResourceReference, but nothing in wicket core abuses ResourceReferences for server side caching of Resources, so I'd like to know if there is a better approach). I have looked at Wickets own implementations of Resources that would benefit from server side caching and happen to implement IStaticCachableResource (e.g. ConcatBundleResource) and they seem to have the same behaviour: no server-side caching, and for each request the resource is actually computed multiple times: once for the actual response, once for computing the cache-key to decorate the url. Hence I would like to know: * Should the duplicate expensive compute of various Wicket core IStaticCacheableResource implementations not be fixed? * Does Wicket provide any mechanism for server side caching of IResource implementations? Thanks - 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: Serverside caching of IResource's that are expensive to generate
Thanks! Just FYI: with Less4j it's actually quite easy to get the modification time of the most recently updated import, since it creates a list of all used imports on the top level LessSource On Tue, Mar 26, 2013, at 10:13, Martin Grigorov wrote: Hi, As Dan explained at the moment Wicket provides just the logic for client side caching. And this is enough for _static_ resources. The case with Less/SASS/Stylus and similar resources is a bit more complicated because they are not static, unless you compile them at the client side. Wicket uses the last modification time of the resource to decide whether to stream it back to the client. If the resource is not modified then response with code 304 (Not Modified) is returned, _without_ body. For dynamically created resources this is not enough. The CSS content should be generated once, for the first client, and then cached for all following clients. Response with code 304 should be returned for clients which have already received the compiled CSS content and the modification time of the .less file is still the same. The more complex logic should be in LessResourceStream#getModificationTime() - it may contain @import's and it should return the modification time of the import with the most recent update. CachingResourceStreamLocator is about caching the location of the resource, i.e. the location of the resource with the most specific attributes - locale, variation and style. Wicket will still read the input stream of the resource if the response is with code 200. CachingResourceStreamLocator just saves the time of checking all combinations of scope/name/locale/variation/style every time. I'll work to improve Wicket Bootstrap Less module with this. And probably ConcatBundleResource will need similar optimizations. On Tue, Mar 26, 2013 at 10:36 AM, Michael Haitz michael.ha...@1und1.dewrote: Wicket has a CachingResourceStreamLocator that caches the resource streams. here's my wicket less implementation, could be helpful too: https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/master/bootstrap-less Am 26.03.2013 um 01:01 schrieb Pointbreak pointbreak+wicketst...@ml1.net : I have implemented a LessCssResource (it generates a CSS resource from Less source files) + LessCssResourceReference. Since computing the CSS is expensive, I would like to cache the generated CSS on the server, once generated. It is unclear to me whether Wicket has mechanisms to do this. I expected that IStaticCacheableResource would also provide the means to do server side caching (in addition to setting the correct headers and decorating the url for client-side caching). But this doesn't seem to be the case. When I look at what happens when doing a second page request/refresh after all browser caches are cleared, it seems that for IResource's that implement IStaticCacheableResource (including my LessCssResource, but also e.g. ConcatBundleResource from wicket core): * Resource.newResourceResponse is called (which obviously results in a recompute of the entire response) * Resource.getCacheableResourceStream is called (which also does a recompute of the entire response) * All implementations of these methods in wicket core resources are designed so that both calls do a full recompute of the actual response (which duplicates the effort for every page that uses a resource) * The Resource itself is recreated for every request (I could cache it in e.g. LessCssResourceReference, but nothing in wicket core abuses ResourceReferences for server side caching of Resources, so I'd like to know if there is a better approach). I have looked at Wickets own implementations of Resources that would benefit from server side caching and happen to implement IStaticCachableResource (e.g. ConcatBundleResource) and they seem to have the same behaviour: no server-side caching, and for each request the resource is actually computed multiple times: once for the actual response, once for computing the cache-key to decorate the url. Hence I would like to know: * Should the duplicate expensive compute of various Wicket core IStaticCacheableResource implementations not be fixed? * Does Wicket provide any mechanism for server side caching of IResource implementations? Thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com
Serverside caching of IResource's that are expensive to generate
I have implemented a LessCssResource (it generates a CSS resource from Less source files) + LessCssResourceReference. Since computing the CSS is expensive, I would like to cache the generated CSS on the server, once generated. It is unclear to me whether Wicket has mechanisms to do this. I expected that IStaticCacheableResource would also provide the means to do server side caching (in addition to setting the correct headers and decorating the url for client-side caching). But this doesn't seem to be the case. When I look at what happens when doing a second page request/refresh after all browser caches are cleared, it seems that for IResource's that implement IStaticCacheableResource (including my LessCssResource, but also e.g. ConcatBundleResource from wicket core): * Resource.newResourceResponse is called (which obviously results in a recompute of the entire response) * Resource.getCacheableResourceStream is called (which also does a recompute of the entire response) * All implementations of these methods in wicket core resources are designed so that both calls do a full recompute of the actual response (which duplicates the effort for every page that uses a resource) * The Resource itself is recreated for every request (I could cache it in e.g. LessCssResourceReference, but nothing in wicket core abuses ResourceReferences for server side caching of Resources, so I'd like to know if there is a better approach). I have looked at Wickets own implementations of Resources that would benefit from server side caching and happen to implement IStaticCachableResource (e.g. ConcatBundleResource) and they seem to have the same behaviour: no server-side caching, and for each request the resource is actually computed multiple times: once for the actual response, once for computing the cache-key to decorate the url. Hence I would like to know: * Should the duplicate expensive compute of various Wicket core IStaticCacheableResource implementations not be fixed? * Does Wicket provide any mechanism for server side caching of IResource implementations? Thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Question about name suffix that wicket appends to ResourceReferences
When rendering the header items for packeded resource references, wicket appends a suffix like -ver-1363953702887 to the name of the resource. Can somebody point me add the place in the code where this suffix is generated and/or document if/how this could be disabled (preferably on a case by case basis)? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Question about name suffix that wicket appends to ResourceReferences
Thanks! On Fri, Mar 22, 2013, at 14:07, Thomas Götz wrote: Please have a look at FilenameWithVersionResourceCachingStrategy. -Tom On 22.03.2013, at 14:01, Pointbreak pointbreak+wicketst...@ml1.net wrote: When rendering the header items for packeded resource references, wicket appends a suffix like -ver-1363953702887 to the name of the resource. Can somebody point me add the place in the code where this suffix is generated and/or document if/how this could be disabled (preferably on a case by case basis)? Thanks! - 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: Prioritize header items in html templates
The Java based header contributions are for css, and javascript mostly. Is there a practical way to get title, meta, and other 'special' tags appear before contributed headeritems in the head then? On Tue, Mar 19, 2013, at 13:48, Martin Grigorov wrote: Hi, I think this is not possible. wicket:head is just a convenience. The full power is in the Java based header contributors. On Tue, Mar 19, 2013 at 2:42 PM, Pointbreak pointbreak+wicketst...@ml1.netwrote: Is there a way (in Wicket 6) to prioritize items in wicket:head/head elements to get them inside the head of the final page before all code contributed header items? I.e. something like PriorityHeaderItem, but applied to the markup of an item in the wicket:head of a template? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Session Expiration - Ajax interactions
Why don't you just keep the session alive as long as the user has an ajax page open? You can easily do this by letting the page do a timed ajax call to the server every x minutes, where x is slightly less than your session timeout. On Mon, Jan 21, 2013, at 17:56, sthomps wrote: I'm currently in the process of evaluating frameworks. We are currently using Wicket 1.4. The ones I've looked at so far have been Vaadin, Tapestry 5.4, and Wicket 6.0. Vaadin I ruled out for various reasons. One of the problems that our users have complained quite a bit about is the dreaded PageExpiration problem. In Wicket 6.0 the issue is resolved somewhat by the framework recreating the page and then issuing a redirect. While understand why it does this // If the page is stateful then we cannot assume that the listener interface is // invoked on its initial state (right after page initialization) and that its // component and/or behavior will be available. That's why the listener interface // should be ignored and the best we can do is to re-paint the newly constructed // page. it's still not the solution we want. The Ajax interaction should continue on as normal. Due to how Tapestry is architected, this is not an isssue. In Wicket 1.4, I got around this somewhat by extending the WebRequestCycleProcessor and recreating the request when a PageExpiration was encountered. It doesn't appear that I can carry this forward in Wicket 6.0. I just want to make sure that I'm not missing anything. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-Expiration-Ajax-interactions-tp4655591.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Call Wicket repeatedly from JQplot (Jquery based) graphing framework
With that code the javascript should be added to the markup (which is easy to check if you view the source form your browser). Your problem is that the generated javascript is incorrect: you have no closing ['] after the url. That would have shown up if you opened the page in Firebug with Scripts enabled. On Wed, Oct 31, 2012, at 0:08, baguahsingi wrote: Hi, I would like to call Wicket repeatedly to obtain data from a service for a JQplot chart. I need to do this as the data is obtained from a slow web service. The user will then see a graph that will gradually build up after each new set of data from the server is added to it. I've had some success with this part. The user clicks a button to start building the graph, however, I cannot work out how to call for more data from javaScript to Wicket, then back again from Wicket to javaScript to add the new data to the JQplot graph. Code below (there will be a flag to signal to the javaScript that there's no more graph data, but it's not there yet): public class GraphPanel extends ParentPanel { @SpringBean private GraphDataService graphDataService; private Integer dataId; public GraphPanel ( String id, Integer dataId) { super(id); this.dataId = dataId; buildPage(); } public void buildPage() { //Link used for button to start to obtain chart data add( new AjaxLink( getGraphData ){ public void onClick( AjaxRequestTarget target ){ getChartData(target); } } ); //behaviour used to obtain url for call back from javaScript final AbstractDefaultAjaxBehavior jsCallbackBehaviourForMoreChartData = new AbstractDefaultAjaxBehavior() { @Override protected void respond(AjaxRequestTarget target) { getChartData(target); } }; getBasePage().add(jsCallbackBehaviourForMoreChartData); final CharSequence url = jsCallbackBehaviourForMoreChartData.getCallbackUrl(); //behaviour to provide javaScript function which I can call from my javaScript //function if it needs to get more data. This function is not added to mark up... add(new Behavior() { private static final long serialVersionUID = 1L; @Override public void renderHead(Component component, IHeaderResponse response) { super.renderHead(component, response); String js = function callWicket() { var wcall = wicketAjaxGet (' + url + , function() { }, function() { } ) }; response.renderJavaScript(js, myScript); } }); } private void getChartData(AjaxRequestTarget target) { GraphData graphData = null; try { graphData = graphDataService.getChartData(dataId); } catch (GraphDataFailureException e) { // TODO Need to report error to user somehow } //This method just builds a String in the format required for JQplot String jsVar = buildChartDataAsJavaScriptVariable(graphData); String chartTitle = graphData.getTitle(); ListString namesOfSeriesOnGraph = graphData.getNamesOfGraphSeries(); String legendNames = Arrays.toString(namesOfSeriesOnGraph.toArray(new String[namesOfSeriesOnGraph.size()])); String javaScriptFunctionCall= buildChart('chartDivContainer',[ + jsVar + ],' + chartTitle + , + legendNames + ); target.appendJavaScript(javaScriptFunctionCall); } } I want the abstract Behaviour added to the panel above to provide me with some javaScript so that I can call back to Wicket. This javaScript is not added to the mark up. When I paste the url from the getCallbackUrl() into the browser but I get XML back: ajax-responseevaluate encoding=wicket1buildChart('chartDivContainer',[[[135161736, 22.76].all my graph data. Can anyone point me in the right direction as to what I have to do here or as to what I've missed? Are there any examples that demonstrate
Re: Custom CSS for Feedback message is broken in 1.5
[X] Other suggestion: don't have a class on the span, or even better, don't have the span element at all inside the list-item For any customisations beyound this, just create your own FeedbackPanel, it's easy and gives complete control. On Sun, Oct 28, 2012, at 17:03, Sebastien wrote: Hi, To sum-up this thread: we have a (not huge, but still) design issue that annoys several users. A patch* has been provided but some questions remains... Given this, I would suggest a kind-of vote about the several points discussed earlier, in order to enlighten the dev-team about the preferred choice of their (beloved) users.** Here are some possible options: [ ] Please apply the patch as-is. It currently provides 2 methods (#getListCSSClass and #getLabelCSSClass), #getCSSClass is marked a deprecated until marked as private (or removed) [ ] Do not apply the patch as-is, #getCSSClass should be kept (not marked as deprecated) [ ] Do not apply the patch as-is, I do not agree with the 2 method names. I would have preferred: (please specify) [ ] This is not an issue; this does not need to be corrected [ ] Other suggestion: (please specify) Thanks in advance for your contribution, Sebastien (*) https://issues.apache.org/jira/browse/WICKET-4831 (**) Sure, dev-team opinion is also kindly asked! :) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [DISCUSS] Security Frameworks
[X] I use Shiro Because it's simple in use and simple to integrate with Wicket or other frameworks, but still powerful enough for most security related tasks. And because I liked it more than Spring Security three years or so ago. I think Spring Security is more feature complete out of the box though. On Thu, Oct 18, 2012, at 06:08, Jeremy Thomerson wrote: Our of curiosity: among the wider community: what security framework(s) do you use with with Wicket, and why? [ ] I use my own custom framework [ ] I use Shiro [ ] I use Spring Security [ ] I use WASP/Swarm [ ] Other (please specify) And don't forget the why. -- Jeremy Thomerson http://wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and jQuery UI
It's a very long time ago that I looked at the API's, so it's likely things have changed since that time. But the problem I had with both products is that they are mostly component based API's (meaning they offer an Accordion component, Autocomplete component, etc.). Imho, a much more flexible approach for JQuery integration is to offer all jquery-ui functionality as behaviors. That way existing components (both from core, other libraries, or your own code) can more easily be augmented with jqeury-ui functionality. And since it's easy enough to do it yourself with a few lines of code, I opted to don't use these libraries at all. There are a few things that require more thought (e.g. jQuery Tab-UI combined integrated with Wicket-Ajax functionality, but at least back then these frameworks didn't offer that in a flexible way either). So I would say, check the libraries for how you are supposed to add the jquery functionality (behavior vs component hierarchy), and don't be afraid to just roll your own if necessary. It's not that much extra functionality that the library offers over just using raw Wicket and jQuery. My 2cnts. On Tue, Oct 2, 2012, at 13:02, ronny.v...@consult.nordea.com wrote: Hi I was not thinking about the base, ie AbstractDefaultAjaxBehavior. I was thinking about using one off the API - several components - could be accordion? could be some effects etc. So I was thinking about who has tried out both API's - has some experiences and suggest this API because bla bla. Hope I explain myself fully here. - Ronny -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: 02 October 2012 08:52 To: users@wicket.apache.org Subject: Re: Wicket and jQuery UI Hi, On Tue, Oct 2, 2012 at 9:28 AM, ronny.v...@consult.nordea.com wrote: Hi Wicket I have been looking at a) wiQuery and b) wicket-jquery-ui What API to use when doing a bridge between Wicket and jQuery UI? What exactly do you need ? The bridge is AbstractDefaultAjaxBehavior - the base Ajax behavior. Recommendations and experience would be very much welcomed. Thanks in advance! Best regards/Med venlig hilsen Ronny Voss Nordea Bank Danmark A/S Online Securities Processing Solutions Strandgade 3 DK-1401 København K Mobile: +45 26711952 E-mail: ronny.v...@consult.nordea.commailto:ronny.v...@consult.nordea.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and jQuery UI
But why not for tabs, accordion, slider, and other jquery components? That gives you much more flexibility in separating what a component logically does (e.g. render various sections of data, widgets, etc.), from how it is shown and interacted with in the browser (view as tabs, steps in a widget, accordion, just plain sections, ...). In jquery-ui itself you also add it as a behavior to a DOM element. So why not offer that flexibility in the Wicket integration? Idem ditto for things like draggable, droppable, etc. Why not offer the possibility to make any existing wicket panel/component a draggable by having a DraggableBehavior? In wicket-jquery-ui you need to subclass a Draggable panel, which is obviously not possible with already existing components/panels. Just to clarify: this is my very personal opinion on how a jquery integration should be designed (and actually how I've done it for many projects so far). That's obviously very subjective. It looks like an impressive library nonetheless! On Tue, Oct 2, 2012, at 15:30, Sébastien Gautrin wrote: Hi Pointbreak, At least for wicket-jquery-ui, it offers also pure behaviours integration for jquery extensions that are pure behaviours (such as Droppable). I think wiQuery does as well. For ease of defining such things for you own component, it is the main goal of wicket-jquery-ui; take a look at the three tutorials Sebastien made (sebfz1) for wicket-jquery-ui: http://code.google.com/p/wicket-jquery-ui/w/list?q=label:How-To (note: Sebastien is the author of wicket-jquery-ui). More on the topic, I as well would welcome experience returns from people who used both (though personally I'm inclined to use wicket-jquery-ui at the moment, but that's also because I'm biaised after having been really impressed at how fast Sebastien integrated run fox software Datepicker component to wicket-jquery-ui while doing his tutorial#3). Pointbreak wrote: It's a very long time ago that I looked at the API's, so it's likely things have changed since that time. But the problem I had with both products is that they are mostly component based API's (meaning they offer an Accordion component, Autocomplete component, etc.). Imho, a much more flexible approach for JQuery integration is to offer all jquery-ui functionality as behaviors. That way existing components (both from core, other libraries, or your own code) can more easily be augmented with jqeury-ui functionality. And since it's easy enough to do it yourself with a few lines of code, I opted to don't use these libraries at all. There are a few things that require more thought (e.g. jQuery Tab-UI combined integrated with Wicket-Ajax functionality, but at least back then these frameworks didn't offer that in a flexible way either). So I would say, check the libraries for how you are supposed to add the jquery functionality (behavior vs component hierarchy), and don't be afraid to just roll your own if necessary. It's not that much extra functionality that the library offers over just using raw Wicket and jQuery. My 2cnts. On Tue, Oct 2, 2012, at 13:02, ronny.v...@consult.nordea.com wrote: Hi I was not thinking about the base, ie AbstractDefaultAjaxBehavior. I was thinking about using one off the API - several components - could be accordion? could be some effects etc. So I was thinking about who has tried out both API's - has some experiences and suggest this API because bla bla. Hope I explain myself fully here. - Ronny -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: 02 October 2012 08:52 To: users@wicket.apache.org Subject: Re: Wicket and jQuery UI Hi, On Tue, Oct 2, 2012 at 9:28 AM, ronny.v...@consult.nordea.com wrote: Hi Wicket I have been looking at a) wiQuery and b) wicket-jquery-ui What API to use when doing a bridge between Wicket and jQuery UI? What exactly do you need ? The bridge is AbstractDefaultAjaxBehavior - the base Ajax behavior. Recommendations and experience would be very much welcomed. Thanks in advance! Best regards/Med venlig hilsen Ronny Voss Nordea Bank Danmark A/S Online Securities Processing Solutions Strandgade 3 DK-1401 København K Mobile: +45 26711952 E-mail: ronny.v...@consult.nordea.commailto:ronny.v...@consult.nordea.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
Re: Wicket rendering jquery late
If your panel depends on jquery, you should render the reference to jquery also in your panel. On Wed, Sep 26, 2012, at 13:40, Oscar Besga Arcauz wrote: Hi wickers ! I've a problem with wicket and jquery resource rendering. My webpage has many panels wich uses jquery, and they have javascript attached to it. This panel-dependant javascript uses jquery, so I render jquery with a resourcerefernce in the webpage. (The page doesn't use ajax because I want to mantain page stateless and bookmarkable.) The problem is that the javascript attached to panel is rendered first into the page, and the jquery reference is the last. so, when the page fully renders, i've some 'ReferenceError: $ is not defined' errors in webrowser console. ¿ Has anyone experienced similar problems ? Other little question: wicket6 uses jquery 1.7.2; has anyone tried with 1.8.x ? Thanks in advance Oscar Besga Arcauz PS. Example code (little long) --- public class MyPage extends WebPage { public MyPage (PageParameters parameters) { super(parameters); add(new MyPageJsBehaviour()); add(new MyPanel(mypanel)); } private class MyPageJsBehaviour extends Behavior { @Override public void renderHead(Component component, IHeaderResponse response) { response.render(JavaScriptHeaderItem.forReference(JQueryResourceReference.get(),jquery)); super.renderHead(component,response); } } } public class MyPanel extends Panel { public MyPanel(String id,String lang) { super(id); add(new MyPanelJsBehaviour()); } private class MyPanelJsBehaviour extends Behavior { @Override public void renderHead(Component component, IHeaderResponse response) { super.renderHead(component,response); response.render(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(MyPanel .class, MyPanel.js),mypaneljs)); /** //MyPanel.js $(function () { // -- here arises the error, as $ is not defined because MyPanel.js is loaded before jquery !!! $('mypanel').dosomething(); }); **/ } } } - 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: Best practices for passing configurations, such as Facebook app_id, to JavaScript
I would use PackageTextTemplate to render the javascript, e.g. put your javascript in MyPage.js along with the other templates, and use ${facebookId} for the id, then add this to your class: @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); PackageTextTemplate javascript = new PackageTextTemplate(MyPage.class, MyPage.class.getSimpleName() + .js); MapString, String vars = new HashMapString, String(); vars.put(facebookId, facebookId); response.renderOnDomReadyJavaScript(javascript.asString(vars)); } On Wed, Aug 29, 2012, at 15:09, Fergal Keating wrote: *HTML* * * script type=text/javascript wicket:id= Facebookjs/* script will be rendered here *//script *JAVA* String FacbookJS = var facebookID = \ + this.getfacebookID(CurrentDomain) + \); ; Label FacebookLabel = new Label(Facebookjs, FacbookJS ); addOrReplace( FacebookLabel.setEscapeModelStrings(false)); On 27 August 2012 15:33, Alec Swan alecs...@gmail.com wrote: Hello, We deploy our web app on different domains which means that JavaScript Facebook integration needs to use different app_id values. I am planning to store these values in a configuration file and wonder how to expose them to JavaScript. I would also like to write a unit test that verifies that settings were passed correctly. I could use a HeaderContributor to inject raw JavaScript, but this doesn't seem to be very unit-testable. I could create a div which attributes/elements contain the settings, which seems to be more unit-testable. Thoughts? Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Fergal Keating IT Senior Engineer --- e. fergal.keat...@directski.com p. NA w. www.directski.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: page version and forms
The tree node selections are fully handled by ajax requests, so they will (obviously) never change the url of the page. Change the selection of e.g. the dropdown for Content, and you will see that the url changes. There are ways to have forms without version/id information in the URL. Search this list for e.g. NoVersionMount. Such solutions do change how Wicket behaves with the back-button/page-refresh, since a new version of the page will always be returned in that case. On Tue, Aug 21, 2012, at 13:16, Alex Shubert wrote: [...] Anyway: what does your answer has to do with my question? One more time: how that example manage not to increase page version shown in url on every tree node selection? thanks [...] On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote: The deployed examples use Wicket 1.4. http://wicket-tree.appspot.com/?wicket:interface=:0:1::: On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com wrote: They are using FormVoid form = new FormVoid(form); and still no version in url on round-trips. Also, FilterForm from Wicket API doesn't extends StatelessForm while your answer states that must be the case. On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org wrote: Use StatelessForm instead. On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert alex.shub...@gmail.com wrote: Hello Recently I found wicket tree control http://wicket-tree.appspot.com/nested and one there is a thing I can't understand: while the page contains Form it looks like not versioned. I mean there are no version number in a url. How does it work then? Is there any clear way to build pages containing Form without explicit version number in url except some black magic involved ( modified MountedMapper ) -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - 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: Wicket tags in output markup may change styles
You should at least escape your ':', i.e. something like: BODY WICKET\:MESSAGE * { } But I doubt it will work on any browser. If you really want to keep the wicket:message tags (imho you're better of without them), you could wrap them in another container (div/span) and use that conatiner as a css scope to style your messages. On Tue, Aug 21, 2012, at 17:55, Adriano dos Santos Fernandes wrote: Hi! I was creating a website with Wicket and the CSS styles were fine. Then I decided to replace some texts with wicket:message / and it changed the formatting. I know setStripWicketTags(true), but I prefer to have it working with setStripWicketTags(false) in dev. mode. The html is actually a XHTML transitional. The affected style is related to body * { ... }. I tried things like body *:* { ... } and it fixed the problem, but introduced another ones. I'm even not sure this is a valid CSS syntax. Has anyone have a hint on a good way to solve this problem? Sorry to not create a quickstart, maybe this is well know thing, but it never happened to me till now. Adriano - 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: Wicket Application on GoDaddy
You probably have another webapp already mounted as root context (in your webapps/ROOT). You obviously can't have two webapps under the root... On Tue, Apr 3, 2012, at 09:31, Satrix wrote: I changed the name of WAR file to ROOT.war but no luck now it's www.domain.com/ROOT/home :/ From what I know there is tomcat 5 running -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Application-on-GoDaddy-tp4529071p4529402.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Using AbstractAjaxBehavior.getCallbackUrl during page construction
We have recently upgraded our application from Wicket 1.4 to Wicket 1.5. One problem we encounter is with Ajax handlers we have that use AbstractAjaxBehavior.getCallbackUrl to bind serverside code to actions in the browser. I have been debugging this, and the problem seems to be that the callback-url puts a renderCount parameter in the url that gets created. That renderCount however is invalid if you call AbstractAjaxBehavior.getCallbackUrl during page construction, because in the render phase the renderCount will be incremented. Effect: a StalePageException will allways be thrown for such behaviours, because the renderCount of the behaviour is always invalid. The StalePageException leads to a new instance of the page, but again with the same problems for these Ajax behaviours. I can probably workaround this by either changing the code to not use renderCount for these bahviours (not so nice), or to change the behaviours to move the rendering of the urls from page-construction to page-render (is going to be a big change). My question is: why is renderCount of a page not coupled to the page construction, instead of to the page render. I believe many wicket pages use a pattern that initializes their state during constructions, instead of during render, and this renderCount issue affects all these pages when they use Ajax. Comments? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What real life scenario calls for page ID?
On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What real life scenario calls for page ID?
On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2, depending on the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. I have never had to build a website were it was a problem when the ajax state was lost on page refresh. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. it is undesirable in applications that perform navigation using ajax panel swapping. in this case a page-refresh will essentially take you back to the homepage. Fair enough I have never had to build a website were it was a problem when the ajax state was lost on page refresh. but you also have not built every wicket application... Obviously... to be honest, for your use case (one page ajax application that performs navigation by swapping page components) I have always chosen other frameworks, that are (imho) better suited for these usecases. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). you also lose it if the user bookmarks the page after they click something on a bookmarkable page... so stripping the version off initial entry is not fixing the problem entirely. I don't see this. They always get an up-to-date version of the page they bookmarked, as it is always freshly constructed. Ok, I can see the usecase for this page-id/version functionality. However, I still think it would be useful if Wicket also catered for the other usecase, where page navigation is handled by just having multiple pages. Is there a serious flaw in the NoVersionMount strategy for these usecases, and if not, wouldn't something like that be a valuable contribution to Wicket? (In which case I think it should not be turned on by a MountMapper implementation, but by a page property). I have always considered Wicket's main strength the flexibility to have ajax-like functionality in a page based component framework. It's a really nice thing to be able to have support for good looking and bookmarkable url's in such applications. And it also makes page state management easier for these pages (i.e. when a LDM and the component hierarchy on a page have a relation). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 10:56, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 10:20 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. it is undesirable in applications that perform navigation using ajax panel swapping. in this case a page-refresh will essentially take you back to the homepage. Fair enough I have never had to build a website were it was a problem when the ajax state was lost on page refresh. but you also have not built every wicket application... Obviously... to be honest, for your use case (one page ajax application that performs navigation by swapping page components) I have always chosen other frameworks, that are (imho) better suited for these usecases. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). you also lose it if the user bookmarks the page after they click something on a bookmarkable page... so stripping the version off initial entry is not fixing the problem entirely. I don't see this. They always get an up-to-date version of the page they bookmarked, as it is always freshly constructed. suppose i go to /foo i think click some twistie link that expands some info section, and in process redirects me to /foo?1 at this point i think this page is useful and i bookmark it so i still have the version number in my bookmark. in fact, the only way i dont have a version number is if i bookmark without clicking anything on the page. i dont know how often that happens compared to bookmarking after at least one click on something in the page No that is not what happens with NoVersionMount: * If you click a link while on /foo that expands an info section why would it want to redirect you to /foo?1 ? It should just expand that info section, and you can remain on /foo. Doing a redirect defeats the purpose of being ajax twistie link. * Additionally, if you would explicitly program a redirect to the originating page in that callback, there will still be no ?x in the url. NoVersionMount drops it. The redirect will however construct a new version of the page. Depending on the page implementation, this may mean that the info section is not expanded on the final /foo page. NoVersionMount also makes sure that url's for callbacks do NOT drop the id in the url, so that the page is still
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 11:42, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:37 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 10:56, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 10:20 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. it is undesirable in applications that perform navigation using ajax panel swapping. in this case a page-refresh will essentially take you back to the homepage. Fair enough I have never had to build a website were it was a problem when the ajax state was lost on page refresh. but you also have not built every wicket application... Obviously... to be honest, for your use case (one page ajax application that performs navigation by swapping page components) I have always chosen other frameworks, that are (imho) better suited for these usecases. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). you also lose it if the user bookmarks the page after they click something on a bookmarkable page... so stripping the version off initial entry is not fixing the problem entirely. I don't see this. They always get an up-to-date version of the page they bookmarked, as it is always freshly constructed. suppose i go to /foo i think click some twistie link that expands some info section, and in process redirects me to /foo?1 at this point i think this page is useful and i bookmark it so i still have the version number in my bookmark. in fact, the only way i dont have a version number is if i bookmark without clicking anything on the page. i dont know how often that happens compared to bookmarking after at least one click on something in the page No that is not what happens with NoVersionMount: * If you click a link while on /foo that expands an info section why would it want to redirect you to /foo?1 ? It should just expand that info section, and you can remain on /foo. Doing a redirect defeats the purpose of being ajax twistie link. Not being an ajax twistie link still doesn't add the ?1 to the url. NoVersionMount will only add the id to callback urls. * Additionally, if you
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 11:42, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:37 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 10:56, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 10:20 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. it is undesirable in applications that perform navigation using ajax panel swapping. in this case a page-refresh will essentially take you back to the homepage. Fair enough I have never had to build a website were it was a problem when the ajax state was lost on page refresh. but you also have not built every wicket application... Obviously... to be honest, for your use case (one page ajax application that performs navigation by swapping page components) I have always chosen other frameworks, that are (imho) better suited for these usecases. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). you also lose it if the user bookmarks the page after they click something on a bookmarkable page... so stripping the version off initial entry is not fixing the problem entirely. I don't see this. They always get an up-to-date version of the page they bookmarked, as it is always freshly constructed. suppose i go to /foo i think click some twistie link that expands some info section, and in process redirects me to /foo?1 at this point i think this page is useful and i bookmark it so i still have the version number in my bookmark. in fact, the only way i dont have a version number is if i bookmark without clicking anything on the page. i dont know how often that happens compared to bookmarking after at least one click on something in the page No that is not what happens with NoVersionMount: * If you click a link while on /foo that expands an info section why would it want to redirect you to /foo?1 ? It should just expand that info section, and you can remain on /foo. Doing a redirect defeats the purpose of being ajax twistie link. i didnt say it was an ajax twistie Not being an ajax twistie link still doesn't add the ?1 to the url. NoVersionMount will only add the id
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 12:05, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:55 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 11:42, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:37 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 10:56, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 10:20 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. it is undesirable in applications that perform navigation using ajax panel swapping. in this case a page-refresh will essentially take you back to the homepage. Fair enough I have never had to build a website were it was a problem when the ajax state was lost on page refresh. but you also have not built every wicket application... Obviously... to be honest, for your use case (one page ajax application that performs navigation by swapping page components) I have always chosen other frameworks, that are (imho) better suited for these usecases. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). you also lose it if the user bookmarks the page after they click something on a bookmarkable page... so stripping the version off initial entry is not fixing the problem entirely. I don't see this. They always get an up-to-date version of the page they bookmarked, as it is always freshly constructed. suppose i go to /foo i think click some twistie link that expands some info section, and in process redirects me to /foo?1 at this point i think this page is useful and i bookmark it so i still have the version number in my bookmark. in fact, the only way i dont have a version number is if i bookmark without clicking anything on the page. i dont know how often that happens compared to bookmarking after at least one click on something in the page No that is not what happens with NoVersionMount: * If you click a link while on /foo that expands an info section why would it want
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 12:30, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 12:24 PM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 12:05, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:55 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 11:42, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:37 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 10:56, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 10:20 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. it is undesirable in applications that perform navigation using ajax panel swapping. in this case a page-refresh will essentially take you back to the homepage. Fair enough I have never had to build a website were it was a problem when the ajax state was lost on page refresh. but you also have not built every wicket application... Obviously... to be honest, for your use case (one page ajax application that performs navigation by swapping page components) I have always chosen other frameworks, that are (imho) better suited for these usecases. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). you also lose it if the user bookmarks the page after they click something on a bookmarkable page... so stripping the version off initial entry is not fixing the problem entirely. I don't see this. They always get an up-to-date version of the page they bookmarked, as it is always freshly constructed. suppose i go to /foo i think click some twistie link that expands some info section, and in process redirects me to /foo?1 at this point i think this page is useful and i bookmark it so i still have the version number in my bookmark. in fact, the only way i dont have a version number is if i bookmark without
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 12:30, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 12:24 PM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 12:05, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:55 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 11:42, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:37 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 10:56, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 10:20 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. it is undesirable in applications that perform navigation using ajax panel swapping. in this case a page-refresh will essentially take you back to the homepage. Fair enough I have never had to build a website were it was a problem when the ajax state was lost on page refresh. but you also have not built every wicket application... Obviously... to be honest, for your use case (one page ajax application that performs navigation by swapping page components) I have always chosen other frameworks, that are (imho) better suited for these usecases. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). you also lose it if the user bookmarks the page after they click something on a bookmarkable page... so stripping the version off initial entry is not fixing the problem entirely. I don't see this. They always get an up-to-date version of the page they bookmarked, as it is always freshly constructed. suppose i go to /foo i think click some twistie link that expands some info section, and in process redirects me to /foo?1 at this point i think this page is useful and i bookmark it so i still have the version number in my bookmark. in fact, the only way i dont have a version number is if i bookmark without
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 14:34, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 1:58 PM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 12:30, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 12:24 PM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 12:05, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:55 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 11:42, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 11:37 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 10:56, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 10:20 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 09:49, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 8:54 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Thu, Mar 22, 2012, at 08:23, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 7:59 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Sun, Mar 18, 2012, at 20:00, Igor Vaynberg wrote: i think there is some confusion here. wicket 1.4 had page ids. it also had page versions. in 1.5 we simply merged page id and page version into the same variable - page id. this made things much simpler and also allowed some usecases that were not possible when the two were separate. you dont have to go very far to come up with an example where page id is useful. 1. suppose you have a page with panel A that has a link 2. user hits a link on the page that swaps panel A for panel B 3. user presses the back button 4. user clicks the link on panel A now if you turn off page id and therefore page versioning it goes like this 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. page with id 1 is rerendered 4. wicket loads page with id 1. user gets an error because it cannot find the link component the user clicked since the page has panel B instead of panel A This is imho not what happens with NoVersionMount. What happens is: 1. wicket creates page and assigns it id 1 2. page id 1 now has panel B instead of panel A 3. wicket creates new page and assigns it id 2; depending on how the page keeps state either a page with panel A and link, or a page with Panel B is created. Hence, there is nothing broken in this scenario. we were talking about something else here. the NoVersionMount has the problem of losing ajax state when the user refreshes the page. I believe the OP's question was for use-cases were Wickets default behaviour would be preferred over using a strategy like NoVersionMount. But if I understood that incorrectly, it's now my question ;-). Imho the natural behaviour a user expects for a page-refresh is a fresh up-to-date version of the page. This is exactly what NoVersionMount does as it forces a newly constructed page for a refresh. For OP's (Chris Colman's) shopping card example this seems perfectly reasonable behaviour. it is undesirable in applications that perform navigation using ajax panel swapping. in this case a page-refresh will essentially take you back to the homepage. Fair enough I have never had to build a website were it was a problem when the ajax state was lost on page refresh. but you also have not built every wicket application... Obviously... to be honest, for your use case (one page ajax application that performs navigation by swapping page components) I have always chosen other frameworks, that are (imho) better suited for these usecases. When wicket shows older versions of a page (e.g. due to back button, bookmarking older versions, etc.), you have to be really careful with how a page version and a model interact to not run into trouble. You also loose bookmarkability of such pages (in the web-browser sense, not in the wicket-sense). you also lose it if the user bookmarks the page after they click something on a bookmarkable page... so stripping the version off initial entry is not fixing the problem entirely. I don't see this. They always get an up-to-date version of the page they bookmarked, as it is always freshly constructed. suppose i go to /foo i think
Re: What real life scenario calls for page ID?
On Thu, Mar 22, 2012, at 15:46, Igor Vaynberg wrote: On Thu, Mar 22, 2012 at 3:39 PM, heikki tropic...@gmail.com wrote: What's the point in refreshing if it returns exactly the same page as before ? it allows components such as datatables and others that pull data from the database to refresh, while preserving other things. think of it this way: i have a page with two tabs. the first tab shows a table of data, and the second tab shows the graph of data. i load the page through a bookmarkable page and switch to the second tab to look at the graph. ten minutes later i want to refresh the graph, so i refresh the page. but now, instead of looking at the graph i am looking at the table again because in the new instance of the page the first tab is selected. what if it takes me three or four clicks to get to the graph? it is very frustrating to lose your navigation just because you refreshed another example is a log viewer. suppose i have a form on the top that lets me select a way to filter log entries such as thread name and severity. i say i want to look at warnings and up from the worker 15 thread. the table below filters the log. ten minutes later i want to see new log entries, so i refresh. but because a new page instance is created i have to reselect the severity and thread name. Ok, and now split the above use cases over two sessions. Load the page, turn to the required tabs, filter log entries like you want etc. Then bookmark, and the next day at some point open the page from the bookmark, expecting not having the described frustrations. But you will have exactly the frustrations described above, and more: the page instance you will be looking at depends on what you did in your current session at some point, as the bookmark possibly refers to an old page id. To a user this is completely random. Hence we use the NoVersionMount, and model the UI changes you described either via page parameters, in server side user-preferences, or in the client side (web browser) state. Solving both what you describe above and making it possible to bookmark that between sessions. Again: it's not for every app. It's nice that wicket can keep such state automatically for you. But doing that has drawbacks as well, listed by some in this thread. It would be nice to have NoVersionMount like functionality more easily available. Unless of course it's broken, but so far it doesn't seem to be. And now I go for a beer, and will forget this thread for at least a very long sunny spring weekend. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What real life scenario calls for page ID?
Yes (sort of) except you don't need two users. Just bookmark a page with a version/id e.g. ?5, close the sessions, open a new session, do some interaction so that another version of the page with version/id ?5 exists, and use that bookmark. Stuff like that confuses users even if they don't care about pretty urls. On Tue, Mar 20, 2012, at 10:07, Martin Grigorov wrote: On Tue, Mar 20, 2012 at 12:55 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: indeed. we should check that the page pointed to by the id maps back to the mount, and create a new instance based on the mount if it doesnt. jira please. This is already the case, no need of a ticket for this. If there is no ?5 then Wicket creates ?0 and shows it. The problem Pointbreak actually mean is that userA may have opened ?5 in his session, copy the url and give it to userB, but userB also already have its own session and by chance he also had reached ?5 and these two ?5s are different because they may have different states for both users. The confusing part here is bookmarkable. Now imagine that there is no ?pageId in the url. userA clicks several Ajax links to get to version5 of that page and then copy/paste the url but userB will see the initial state of the page, not version5 that userA actually meant. So it seems only ?0 is actually bookmarkable for stateful pages. Only in this case both users will see the same content (if there is no special logic for user permissions involved). If userA wants to fully share his page with userB then he has to share his session too, i.e. both ?5 and jessionid= has to be in the pasted url. I don't recomment this! ?5 helps when the user refreshes the page in his current session. In this case he will see the same content as before the refresh. In 1.4 he'd see the initial state of the page and will loose any state that is not persisted so far. -igor On Mon, Mar 19, 2012 at 3:52 PM, Pointbreak pointbreak+wicketst...@ml1.net wrote: It's a problem when users bookmark it. Because ...?5 this session is an entirely other page as ...?5 in another session tomorrow. On Mon, Mar 19, 2012, at 11:53, Girts Ziemelis wrote: On 2012-03-19 02:46, Paolo wrote: I support you! I implemented class NoVersionMount thanks to pointbreak in my MainApplication. And It will be my template for future app. But to do it, I needed to understood the problem, check on google, read a lot of pages, without found a solution, so post the question here, and after 3 post, got a right reply for me. Why an wicket user have to do all this Why not, wicket use the NoVersionMount as default Mount? Like in wicket 1.4. And implement an VersionMount as an alternative for developer? I actually like this change so far. I can finally tell, that my page is stetefull just by looking at the link and ask myself question - if I really care so much about the clean link for this page, may be it should be stateless in a first place? And why is ?0 such a big problem? It does not cause problems sending links. Is there any real proof of google indexing problems so far? - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What real life scenario calls for page ID?
On Tue, Mar 20, 2012, at 10:40, Martin Grigorov wrote: On Tue, Mar 20, 2012 at 10:38 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: Yes (sort of) except you don't need two users. Just bookmark a page with a version/id e.g. ?5, close the sessions, open a new session, do some interaction so that another version of the page with version/id ?5 exists, and use that bookmark. Stuff like that confuses users even if they don't care about pretty urls. But it is the same in 1.4. Do some Ajax interactions to swap panels for example, copy the url, then later paste it and you will see the initial version of the page, not the one with the swapped panels. Yes this was also the case in 1.4. But in 1.4 with HybridUrlCodingStrategy you could work around that (sort of). On Tue, Mar 20, 2012, at 10:07, Martin Grigorov wrote: On Tue, Mar 20, 2012 at 12:55 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: indeed. we should check that the page pointed to by the id maps back to the mount, and create a new instance based on the mount if it doesnt. jira please. This is already the case, no need of a ticket for this. If there is no ?5 then Wicket creates ?0 and shows it. The problem Pointbreak actually mean is that userA may have opened ?5 in his session, copy the url and give it to userB, but userB also already have its own session and by chance he also had reached ?5 and these two ?5s are different because they may have different states for both users. The confusing part here is bookmarkable. Now imagine that there is no ?pageId in the url. userA clicks several Ajax links to get to version5 of that page and then copy/paste the url but userB will see the initial state of the page, not version5 that userA actually meant. So it seems only ?0 is actually bookmarkable for stateful pages. Only in this case both users will see the same content (if there is no special logic for user permissions involved). If userA wants to fully share his page with userB then he has to share his session too, i.e. both ?5 and jessionid= has to be in the pasted url. I don't recomment this! ?5 helps when the user refreshes the page in his current session. In this case he will see the same content as before the refresh. In 1.4 he'd see the initial state of the page and will loose any state that is not persisted so far. -igor On Mon, Mar 19, 2012 at 3:52 PM, Pointbreak pointbreak+wicketst...@ml1.net wrote: It's a problem when users bookmark it. Because ...?5 this session is an entirely other page as ...?5 in another session tomorrow. On Mon, Mar 19, 2012, at 11:53, Girts Ziemelis wrote: On 2012-03-19 02:46, Paolo wrote: I support you! I implemented class NoVersionMount thanks to pointbreak in my MainApplication. And It will be my template for future app. But to do it, I needed to understood the problem, check on google, read a lot of pages, without found a solution, so post the question here, and after 3 post, got a right reply for me. Why an wicket user have to do all this Why not, wicket use the NoVersionMount as default Mount? Like in wicket 1.4. And implement an VersionMount as an alternative for developer? I actually like this change so far. I can finally tell, that my page is stetefull just by looking at the link and ask myself question - if I really care so much about the clean link for this page, may be it should be stateless in a first place? And why is ?0 such a big problem? It does not cause problems sending links. Is there any real proof of google indexing problems so far? - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com
Re: What real life scenario calls for page ID?
On Tue, Mar 20, 2012, at 10:50, Martin Grigorov wrote: On Tue, Mar 20, 2012 at 10:45 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: On Tue, Mar 20, 2012, at 10:40, Martin Grigorov wrote: On Tue, Mar 20, 2012 at 10:38 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: Yes (sort of) except you don't need two users. Just bookmark a page with a version/id e.g. ?5, close the sessions, open a new session, do some interaction so that another version of the page with version/id ?5 exists, and use that bookmark. Stuff like that confuses users even if they don't care about pretty urls. But it is the same in 1.4. Do some Ajax interactions to swap panels for example, copy the url, then later paste it and you will see the initial version of the page, not the one with the swapped panels. Yes this was also the case in 1.4. But in 1.4 with HybridUrlCodingStrategy you could work around that (sort of). Please explain. Sorry for confusion, we didn't use HybridUrlCodingStrategy, but QueryStringUrlCodingStrategy. It doesn't put the version nr into the url of stateful pages, but always gives the latest version of a page. That solves the problem when bookmarking a page (because you don't bookmark a specific version of a page, but just the page). (It may however cause problems when users keep two versions of a page open in two tabs and switch between them, since callbacks on one of them are not in sync with the latest version.) On Tue, Mar 20, 2012, at 10:07, Martin Grigorov wrote: On Tue, Mar 20, 2012 at 12:55 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: indeed. we should check that the page pointed to by the id maps back to the mount, and create a new instance based on the mount if it doesnt. jira please. This is already the case, no need of a ticket for this. If there is no ?5 then Wicket creates ?0 and shows it. The problem Pointbreak actually mean is that userA may have opened ?5 in his session, copy the url and give it to userB, but userB also already have its own session and by chance he also had reached ?5 and these two ?5s are different because they may have different states for both users. The confusing part here is bookmarkable. Now imagine that there is no ?pageId in the url. userA clicks several Ajax links to get to version5 of that page and then copy/paste the url but userB will see the initial state of the page, not version5 that userA actually meant. So it seems only ?0 is actually bookmarkable for stateful pages. Only in this case both users will see the same content (if there is no special logic for user permissions involved). If userA wants to fully share his page with userB then he has to share his session too, i.e. both ?5 and jessionid= has to be in the pasted url. I don't recomment this! ?5 helps when the user refreshes the page in his current session. In this case he will see the same content as before the refresh. In 1.4 he'd see the initial state of the page and will loose any state that is not persisted so far. -igor On Mon, Mar 19, 2012 at 3:52 PM, Pointbreak pointbreak+wicketst...@ml1.net wrote: It's a problem when users bookmark it. Because ...?5 this session is an entirely other page as ...?5 in another session tomorrow. On Mon, Mar 19, 2012, at 11:53, Girts Ziemelis wrote: On 2012-03-19 02:46, Paolo wrote: I support you! I implemented class NoVersionMount thanks to pointbreak in my MainApplication. And It will be my template for future app. But to do it, I needed to understood the problem, check on google, read a lot of pages, without found a solution, so post the question here, and after 3 post, got a right reply for me. Why an wicket user have to do all this Why not, wicket use the NoVersionMount as default Mount? Like in wicket 1.4. And implement an VersionMount as an alternative for developer? I actually like this change so far. I can finally tell, that my page is stetefull just by looking at the link and ask myself question - if I really care so much about the clean link for this page, may be it should be stateless in a first place? And why is ?0 such a big problem? It does not cause problems sending links. Is there any real proof of google indexing problems so far? - 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: What real life scenario calls for page ID?
It's a problem when users bookmark it. Because ...?5 this session is an entirely other page as ...?5 in another session tomorrow. On Mon, Mar 19, 2012, at 11:53, Girts Ziemelis wrote: On 2012-03-19 02:46, Paolo wrote: I support you! I implemented class NoVersionMount thanks to pointbreak in my MainApplication. And It will be my template for future app. But to do it, I needed to understood the problem, check on google, read a lot of pages, without found a solution, so post the question here, and after 3 post, got a right reply for me. Why an wicket user have to do all this Why not, wicket use the NoVersionMount as default Mount? Like in wicket 1.4. And implement an VersionMount as an alternative for developer? I actually like this change so far. I can finally tell, that my page is stetefull just by looking at the link and ask myself question - if I really care so much about the clean link for this page, may be it should be stateless in a first place? And why is ?0 such a big problem? It does not cause problems sending links. Is there any real proof of google indexing problems so far? - 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: I don't want url page count parameter: localhost:8080/context/?0
Create a class NoVersionMount: /** * Provides a mount strategy that drops the version number from * stateful page urls. */ public class NoVersionMount extends MountedMapper { public NoVersionMount(String path, Class? extends IRequestablePage pageClass) { super(path, pageClass, new PageParametersEncoder()); } @Override protected void encodePageComponentInfo(Url url, PageComponentInfo info) { // do nothing so that component info does not get // rendered in url } @Override public Url mapHandler(IRequestHandler requestHandler) { if (requestHandler instanceof ListenerInterfaceRequestHandler) { return null; } else { return super.mapHandler(requestHandler); } } } And mount your pages using that mounted mapper, e.g.: mount(new NoVersionMount(myPage, MyPage.class)); Cheers, Gerrit On Sun, Mar 18, 2012, at 02:51, Paolo wrote: Hi, I read this old post to solve the my same problem: --- I'm using Wicket 1.5.3, an application with a number of tabbed panels. My application's url is, lets say http://localhost:9080/context/ When I enter this URL, the browse immediately changes this to http://localhost:9080/context/?0 I don't want that!! When I enter userdata and switch some tabs, nothing happens, but when I hit F5 the URL changes to http://localhost:9080/context/?9 or another number, depending on my activity. I don't want that!! I read this suggested link: http://stackoverflow.com/questions/8081143/components-not-reloading-on-url-change-in-wicket-1-5-2 http://stackoverflow.com/questions/8135755/wicket-1-5-new-urls/8139152#8139152 BUT I DON'T UNDERSTAND TO SOLVE THE SIMPLE PROBLEM! I tried to change from String id = inparams.get(id).toString(); TO RequestCycle requestCycle = RequestCycle.get(); Request request = requestCycle.getRequest(); IRequestParameters irp = request.getRequestParameters(); String id = irp.getParameterValue(id).toString(); BUT NOTHING CHANGED! Please Help me, in this stupid wicket issue. Thank you - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 1.5 rewrites template content - imho should not
I have recently upgraded from Wicket 1.4.14 to 1.5.4. One issue that I encountered is that script tags in panel templates are rewritten by Wicket, even when the script tags in question have no wicket handlers attached to them. I.e. the following panel template (notice that there are no wicket:id attributes whatsoever): wicket:panel script id=template-upload type=text/x-jquery-tmpl span${name}/span /script /wicket:panel Would render in the panel as: script id=template-upload type=text/x-jquery-tmpl /*![CDATA[*/ span${name}/span /*]]*/ /script Imho this is unwanted behavior that is a regression from the behavior in Wicket 1.4.x (or at least 1.4.14). Wicket should not add content to the body of the script tags (or any other tags in a template, unless their content is provided programmatically), as it does not have the knowledge how that affects the functionality of the page. Moreover, the content that Wicket adds to these script tags is only correct for Javascript (hence incorrect for the scripts in the example as they are not javascript). In the above example adding /*, */ and even the CDATA part will change the functionality of the script tag. If the /*![CDATA[*/ part was necessary in the script tags above, they should be added by the person that provides the template, not magically added by Wicket. Comments? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Updating a component from custom thread or why getRequestCycle returns null
You will still need client initiated requests to get your non-stop-updates from the page/component to the browser. Hence, just separate the work (which you can do continuously in your thread) from the page rendering (which will need to be initiated by a browser request whatever you do). Will make your live so much easier if you cleanly separate those two tasks... On Tue, Feb 21, 2012, at 04:48, BayPhilip wrote: Actually this is not my problem. You update component just once after some time while I need non-stop updating. I found a semi-solution. I am using ScheduledThreadPoolExecutor. final ExecutorService service = new ScheduledThreadPoolExecutor(100) { protected void beforeExecute(final Thread t, final Runnable r) { Application.set(getApplication()); } protected void afterExecute(final Runnable r, final Throwable t) { Application.unset(); } }; service.submit(chat); but..the thread is submitted, but it is not executed. I'm debugging and.there is nothing that calls my run() method in my thread. So how can execute this thread which is submited in service. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 rewrites template content - imho should not
See https://issues.apache.org/jira/browse/WICKET-4425 On Tue, Feb 21, 2012, at 14:01, Martin Grigorov wrote: Hi, Agree. Wicket should not do this in this case. File a ticket with a quickstart. On Tue, Feb 21, 2012 at 1:42 PM, Pointbreak pointbreak+wicketst...@ml1.net wrote: I have recently upgraded from Wicket 1.4.14 to 1.5.4. One issue that I encountered is that script tags in panel templates are rewritten by Wicket, even when the script tags in question have no wicket handlers attached to them. I.e. the following panel template (notice that there are no wicket:id attributes whatsoever): wicket:panel script id=template-upload type=text/x-jquery-tmpl span${name}/span /script /wicket:panel Would render in the panel as: script id=template-upload type=text/x-jquery-tmpl /*![CDATA[*/ span${name}/span /*]]*/ /script Imho this is unwanted behavior that is a regression from the behavior in Wicket 1.4.x (or at least 1.4.14). Wicket should not add content to the body of the script tags (or any other tags in a template, unless their content is provided programmatically), as it does not have the knowledge how that affects the functionality of the page. Moreover, the content that Wicket adds to these script tags is only correct for Javascript (hence incorrect for the scripts in the example as they are not javascript). In the above example adding /*, */ and even the CDATA part will change the functionality of the script tag. If the /*![CDATA[*/ part was necessary in the script tags above, they should be added by the person that provides the template, not magically added by Wicket. Comments? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WiQuery vs JQWicket
I've never used either framework, but your question made me curious again. (Years ago I evaluated the existing wicket-jquery integrations and wasn't happy with how they were designed. Since than I've always just used jquery inside wicket, it's not that hard for simple designs, and for complex designs these frameworks may be just to rigid). That being said I just had a quick glance at the projects again and it seems that WiQuery does the integration via Components (i.e. you create an Accordion Component), while JqWicket does the integration via Bahaviors (i.e. you add an AccordionBehavior to an existing Component, e.g. a ListView). The latter (thus using Behaviors) is how I have always done it, feels more natural to me, and is a lot more flexible. On Wednesday, November 23, 2011 10:16 AM, Brian Mulholland blmulholl...@gmail.com wrote: We are considering WiQuery and JQWicket. 1) Which is better and why? 2) Is one more established or better supported than the other? 3) Is one more full featured? What differentiates the two? Brian Mulholland - 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: An extensive RIA technology comparison matrix including Wicket
That's actually accurate, as Martin already explained, Wicket has no provisions for client side Java based programming. To be honest, I don't think the comparison matrix is that bad. I would consider a framework like Vaadin over Wicket if all I wanted a typical desktop style only (menu bar, content frames + layout manager, fancy widgets) only type of application, what they call application oriented, especially if it would benefit a lot from client-side UI management. On Wednesday, October 26, 2011 10:18 PM, Andrea Del Bene an.delb...@gmail.com wrote: That's right but why they didn't include Java among languages you can use to program on client side with Wicket. It's a mystery! On Wed, Oct 26, 2011 at 10:02 PM, Andrea Del Benean.delb...@gmail.com wrote: You missed the funniest row: UI programming on client-side. What does it mean Java, Javascript for GWT and Vaadin and just Javascript for Wicket? Does it mean that GWT and Vaadin run bytecode inside browser? Did they (re)invented applets :)? They (actually GWT, Vaadin is reusing it) compile Java to JavaScript. I.e the developer writes only Java and the framework does the rest. - 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: Servlet and Wicket
No that was not was I was saying. I am just advising you to let Wicket manage complete pages, instead of parts of pages composed within another servlet architecture. I would give you the same advise if you were using JSF instead. On Tuesday, September 27, 2011 11:58 AM, koha...@gmail.com koha...@gmail.com wrote: Are you saying that I can either use Wicket without Servlet or use Servlet with JSP/JSF just like our previous implementation? I thought Wicket components would work under a Servlet environment. If Wicket cannot run under Servlet then, I would like to know now so that we can consider JSF instead. Your response is appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3848610.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Servlet and Wicket
On Monday, September 26, 2011 8:39 PM, koha...@gmail.com koha...@gmail.com wrote: We have to have the Servlets in front due to current connection from IIS and Apache. That doesn't make any sense. For IIS and Apache it really doesn't matter at all. Here is what the architecture of my implementation looks like: Dispatcher Servlet (awaiting incoming httpservletRequest) | Wicket Components On the Application Service layer, I have EJB Beans And then on the Data Layer I have JPA/Entity My question is what should I be concerned about in accessing Wicket Components from the Servlets since the URL would be connecting directly to servlets. I would never advice to do it this way. If you want to keep your application in a request-based dispatcher kind of architecture, than don't use wicket. If your reason for moving to wicket is to have better maintainable software, then by all means, don't rebuild everything exactly the same in wicket. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-spring version
Don't use wicket-spring-annot, just wicket-spring. On Tuesday, September 27, 2011 3:15 AM, boy_oh_boy muralih...@gmail.com wrote: Hello, Very new to Wicket. Trying to integrate an existing Spring application with the latest Wicket release. Versions: Wicket - 1.5.0 SpringFramework - 2.5.6 I am following the annotations based approach mentioned here - https://cwiki.apache.org/WICKET/spring.html. Now, which version of wicket-spring-annot do I use? In the maven repo, the latest version is 1.3.7. So, do I need to use 1.3.7 version of wicket-spring jar too? When I use 1.3.7 for both wicket-spring and wicket-spring-annot, I get this error when I start up jetty server: :2432011-09-27 11:12:58.635::WARN: failed BCWicketFilter java.lang.NoSuchMethodError: org.apache.wicket.MetaDataKey.init(Ljava/lang/Class;)V at org.apache.wicket.spring.injection.annot.SpringComponentInjector$1.init(SpringComponentInjector.java:58) at org.apache.wicket.spring.injection.annot.SpringComponentInjector.clinit(SpringComponentInjector.java:55) at com.inceptor.bcWicket.app.BCWicketApplication.init(BCWicketApplication.java:19) at org.apache.wicket.Application.initApplication(Application.java:805) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:570) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.plugin.Jetty6PluginWebApplication.start(Jetty6PluginWebApplication.java:147) at org.mortbay.jetty.plugin.AbstractJettyRunMojo$1.changesDetected(AbstractJettyRunMojo.java:372) at org.mortbay.jetty.plugin.util.Scanner.run(Scanner.java:159) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-spring-version-tp3846702p3846702.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: adding resources after ajax swap
Of course you could also just load the scripts in your page instead of via ajax... just my 2cnts. On Thursday, September 22, 2011 3:18 PM, Steve Lowery slow...@gatessolutions.com wrote: Is that a filter on my end? Would that go before or after my wicket filter mapping? Any helpful resources out there on this? I haven't dealt with OPTIONS methods before. On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery slow...@gatessolutions.comwrote: I'm having an issue using resources after an ajax swap, in this case jquery. My home page does not have anything jquery related on it. There is an AjaxFallbackLink which swaps out the main content. The new content Panel has a jquery header contributor. I see this is being returned in the response to the AjaxFallbackLink click: ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src =https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js; /script... /ajax-response However, I notice that the browser is attempting to retrieve the jquery resource via the OPTIONS method. It does not appear to be getting added to the head and therefore, my component fails because it tries to do some jQuery stuff but it isn't available. Is this the expected behavior or am I doing something wrong? Do I have to load 3rd party libraries on the Page or register headerListener with the application? I have seen the same behavior with other javascript libraries (i.e. yui). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket is secure by default. why use spring security?
You're taking the statement Wicket is Secure by default out of its context. The full statement is Wicket is secure by default. URLs do not expose sensitive information and all component paths are session-relative. Explicit steps must be taken to share information between sessions. Furthermore URL encryption allows highly secure web sites. The statement has nothing to do with authorisation and authentication, but with common security pitfalls when designing web-applications which may result in exposing sensitive information, e.g. javascript related security holes in your pages. Authorisation authentication are in a completely different ballpark. The features of wicket auth annotation based security can be used to integrate Wicket with either Spring Security or Apache Shiro, they are certainly not a replacement for those frameworks (although those frameworks offer alternative ways to declare authorisation requirements). So use Spring Security or Apache Shiro if you want to integrate authorisation and authentication into your web-app, and don't want to reinvent the wheel yourself. Wicket doesn't know what LDAP is, or SSO, or how to control access to resources other than wicket components. On Monday, September 19, 2011 1:53 AM, Zilvinas Vilutis cika...@gmail.com wrote: Hi all Wicket users. While I was trying to design a wicket app in my mind - the first thing I thought of was authentication and ( spring ) security. I know that wicket is secure by default ( a quote from wicket features? :), we can use wicket auth annotation based security. Wicket will automatically redirect to original page after login. So...did anyone think of it - what is the real reason to use spring or other security framework ( shiro? ) for authentication? what benefits does it bring apart from some standards overhead for the app? is it integration with other auth systems ( OpenID, Facebook login or whatever )? or what? Just pennies for thought... Žilvinas Vilutis Mobile: (+1) 623 330 6048 E-mail: cika...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to update @SpringBean proxy?
What you are saying doesn't make sense. The SpringBean proxy doesn't cache anything, so would still proxy all method calls to the original bean. If you are not seeing updated values in that bean, there is something else going on. Unless with update you mean that you replace the original bean with another instance in the context, which you really should not On Mon, 29 Aug 2011 08:39 -0700, Arjun Dhar dhar...@yahoo.com wrote: Hi, I believe @SpringBean creates a proxy over the original bean. I have a situation where in the Application.init() --callls -- Service layer that has direct access to SpringContext. I modify the original Bean (getting it via Spring Context). However, this update to the object wont reflect in the associated proxy. Anyone know how I can get a ref to the original bean or have the proxy updated; so without the Annotation how can I get access to the Proxy object via API? Currently looking @ for clues... https://cwiki.apache.org/WICKET/spring.html Pointers appreciated! thanks - Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-update-SpringBean-proxy-tp3776522p3776522.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicketstuff tinymce development
According to: http://tinymce.moxiecode.com/tryit/multiple_configs.php Mode should be switched to textareas our current implementation provide exact only. Why would you want to use textareas matching when using TinyMce in Wicket? Attach a TinyMceBehavior to each Wicket component that needs a TinyMce editor. That's it. Using textarea mode makes no sense in a Wicket integration as it doesn't integrate anything. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Differences development vs deployment mode, hierarchy errors
The differences are implemented in Application.configure(), so check there for how deployment and development mode differ. I am not aware of any differences in how Wicket handles the component hierarchy. The hierarchy in your java-implementation either is or is not consistent with the hierarchy in your template files. Wicket doesn't do anything to fix or ignore hierarchy issues. On Tue, 24 May 2011 10:51 -0400, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: I noticed with the web.xml configuration, development mode that I see more hierarchy exceptions thrown by wicket. Basically, it seems that wicket ignores some hierarchy or markup issues in development mode and not in deployment mode. What are the main differences between those modes and how do I know what exceptions will be thrown? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Why does wicket use Serializable contracts in generics?
For example in Session there is the method: public final M extends Serializable M getMetaData(final MetaDataKeyM key) This makes it seriously difficult to use this methods for retrieving vales that have e.g. a MetaDataKeyCollectionString, since Collection does not extend Serializable (although most implementations do). Afaik, you can only cast your way out of this if you know the actual implementation type, which is impossible when for instance the collection was created with Collections.synchronized... I understand that session-data should be serializable, but I don't think that it should be enforced like this, because Serializable is just a marker interface. It doesn't offer an interface/contract. In fact, having an object that implements Serializable still does not guarantee that it can be serialized. Cheers, Gerrit - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic child in container
This is definitely possible. The easy way is to do ajaxRequestTarget.addComponent(theParentComponent); the drawback being that tho whole parent component will be redrawn, including childs that were already on the page. If that is not acceptable, you could use javascript to first create a child component of your parent with the markupId of your new child (using ajaxRequestTarget.prependJavascript(your javascript code that adds an empty div with correct id to the parent), and let wicket render the child component by doing ajaxRequestTarget.addComponent(theChildComponent). On Tue, 29 Mar 2011 16:49 +0200, kamiseq kami...@gmail.com wrote: hi, I ve googled a bit but all I ve found are links about panels. my problem is that I would like to create components (with corresponding html markup) and then add those components dynamically on request to target container, where child component could be other container that might be dynamically modified. what I read about panels is that you need always mark a placeholder for a child component so there is no way to add more or less child when my logic decides to do so. is this possible in wicket? could someone point me to some materials about it? pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic child in container
That's what I thought you meant (ajax). If you want to add a dynamic number of components during normal page construction, you should have a look at wicket repeaters, e.g. RepeatingView. There are plenty examples for how to use those. On Tue, 29 Mar 2011 17:28 +0200, kamiseq kami...@gmail.com wrote: thanks, so I understand that it is only possible with AJAX calls. could I make a link callback that will add random number of components on each request? there will be no wicket:id for dynamic child and I could generate as many components as I want, right? I will try this anyway;] pozdrawiam Paweł Kamiński [1]kami...@gmail.com [2]pkaminski@gmail.com __ References 1. mailto:kami...@gmail.com 2. mailto:pkaminski@gmail.com
Re: chrome + wicket ajax + back button = problem?
See https://issues.apache.org/jira/browse/WICKET-923 for a solution. On Mon, 11 Oct 2010 09:31 -0500, Ryan Crumley crum...@gmail.com wrote: I have (I am using MixedParamHybridUrlCodingStrategy) however in this case the browser is not contacting the server on back button click so the UrlCodingStrategy does not come into play. Ryan On Wed, Oct 6, 2010 at 4:13 PM, mzem...@osc.state.ny.us wrote: I've had similar issues, have you tried HybridUrlCodingStrategy? Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Saving a component in session
You really don't want to save a component in a session. A component has its own lifecycle, tied to pagerequests, and its own scope tied to its parent components and the page it is part of. From what I understand of your story, what you should do is write your own component that wraps a Label or an AjaxEditLabel depending on some condition/mode. This is very easy to make with wicket. On Thu, 23 Sep 2010 13:24 +0300, Mihai Postelnicu mposteln...@dgfoundation.org wrote: Guys, I work on the same project as below (integrating an interface translator with Wicket) and we are a bit stuck. Any ideas? Thanks in advance for your time ! Mihai On 09/23/2010 12:29 PM, Alexandru Artimon wrote: Forgot to mention that the component is an AjaxEditableLabel and I need to save it to session because I'm creating a custom wicket tag for translation purposes. When in translator mode I want all the labels to be replaced by AjaxEditableLabel's so that the translator can do his job easier. The problem I have is that when I click on the label of the AjaxEditableLabel, it produces an ajax request in order to change visibility modes and show the edit box. I did my custom tag replacing by implementing an IComponentResolver, which (from what I figured) happens on render. So my AjaxEditableLabel component isn't in the page when the Ajax request arrives. I planned to solve this by fetching the missing component from the session on my own, by overwriting resolveListenerInterfaceTarget. Now when I fetch the original AjaxEditableLabel from the session, all it's children (the Label and TextField) are gone. Any ideas will be much appreciated. Thanks, Alexandru On 09/23/2010 11:57 AM, Alexandru Artimon wrote: Hello, I have a problem when saving a component to the session, all it's children disappear. I do the save like this: session.bind(); session.setMetaData(MY_KEY, component); Regards, Alexandru - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Strip header contributors from Ajax response.
if (!AjaxRequestTarget.get()) renderMyJavascript(); On Thu, 22 Apr 2010 09:10 +0530, Apple Grew appleg...@gmail.com wrote: I have a component which contributes Js headers. This component is also rendered by AjaxRequestTarget. The problem is that when rendering ajax response the Js codes too are getting rendered. These Js codes were already contributed when this component first rendered (in non-Ajax mode). To fix this what I initially did was that in the onBeforeRender method of the component I was checking if the response NOT isAjax then add the header contributors, else, remove them. This was working fine, but problem is if I want to implement this is other components I would have to copy n paste the codes. So I decided to implement a behavior. I added all the header contributors to that behavior and it was supposed to do the job of adding n removing the header contributors. But we can't modify hierarchy from beforeRender of behavior so I am now stuck. Furthermore, this approach is not capable of removing JS contributed by super calsses of the componenet. Please suggest. Thanks and regards, Apple Grew my blog @ http://blog.applegrew.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Hibernate - OSIV
With OSIV every user will have a different hibernate-session, hence a different hibernate object, so your example would work. But your approach is wrong. For your example I would make a SurveyResult object that holds a reference to your hibernate Survey object. Problem solved. No need to play jiggle with transient properties and object identities in hibernate. On Thu, 01 Apr 2010 16:11 -0500, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Because the objects have transient properties on them that are set by another process. Basically the object is pulled from the db to create a shell/container and the transient properties are filled in at a later time and may be different. Not a great example but, the object is a survey and the transient properties are the answers that a user will provide. I want to get the same survey twice but allow the transient properties to have different values. If it is the same object, I can't do this. The following setting seems to do the trick. The problem is that after some amount of time, everything locks up. It appears I am out of db connections. filter filter-nameopensessioninview/filter-name filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class init-param param-namesingleSession/param-name param-valuefalse/param-value /init-param /filter -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Thursday, April 01, 2010 4:37 PM To: users@wicket.apache.org Subject: Re: Hibernate - OSIV Why do you need different objects? On Thu, Apr 1, 2010 at 4:25 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: So by using the OSIV, I am out of luck? Any ideas? -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Thursday, April 01, 2010 3:59 PM To: users@wicket.apache.org Subject: Re: Hibernate - OSIV They have to be different sessions. Hibernate's cache (the first level) guarantees that you get the same object for any given entity within the same session. On Thu, Apr 1, 2010 at 3:47 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: The issue was the object was being evicted from the Hibernate session. getSession().evict(object). I had forgot that the object was being evicted from the session. If I do not evict the object from the session then lazy loading worked. This is more of a Hibernate question but, how can I get unique object from a hibernate query for each query and have each object be tied to the session? example: select * from Product where sku = ? I want to select the same sku but get two different java objects from Hibernate so the objects are not the same. Thanks. -Original Message- From: Josh Chappelle [mailto:jchappe...@4redi.com] Sent: Wednesday, March 31, 2010 7:01 PM To: users@wicket.apache.org Subject: RE: Hibernate - OSIV What error are you getting? -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Wednesday, March 31, 2010 4:47 PM To: users@wicket.apache.org Subject: Hibernate - OSIV I think I have the OSIV filter setup correctly but I can't access any lazy loaded properties of my objects. I am not even between requests when this is happening. Does anyone have any ideas? I can't seem to figure this out. I have looked at OSIV in Spring and OSIV in Wicket. I can't seem to find any examples that will help me to determine the problem. I have included all the code and xml configuration that I believe is relevant. Any help would be appreciated. Also a clean example of how to setup Spring + Hibernate OSIV in the wiki would be a big help. - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail:
Re: InMethod Grid: resizing rowcount
On Mon, 15 Mar 2010 16:06 +0100, Thierry Peng p...@glue.ch wrote: Pointbreak schrieb: On Mon, 15 Mar 2010 15:06 +0100, Thierry Peng p...@glue.ch wrote: Pointbreak schrieb: The public interface of the inmethod DataGrid/DefaultDataGrid does not seem to provide functionality to expand the number of rows after an ajax-call that e.g. adds data to the underlying datasource. Is there a way to tell the DataGrid that the underlying datasource may have changed, to the effect that the existing row count is not valid anymore? I.e. like markAllItemsDirty(), but then telling the grid to reload the entire underlying model, including rowcount, instead of only the individual rows? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org I tackled a similar problem (an add button for an editable datagrid) the following way: - create a new object with reflection - insert it in the backing list (model) - call update on the grid - add the grid to the requesttarget public class MyDataGrid extends DecoratedDataGrid { protected List rawList; protected final Class modelAsClass; public MyDataGrid(String id, String title, String buttonTitle, List? list, ListIGridColumn columns, final Class? modelAsClass) { super(id, title, buttonTitle, new MyDataProviderAdapter(new ListDataProvider(list)), columns, modelAsClass); log.debug(creating grid for type + modelAsClass.getSimpleName() + no of columns: + columns.size() + size of datalist: + list.size()); this.rawList = list; } @Override protected void onAddRow(AjaxRequestTarget target, Form? form) { Object obj = modelAsClass.newInstance(); rawList.add(obj); log.debug(object of class + modelAsClass.getName() + successfully inserted); update(); target.addComponent(getGrid()); } } This takes place in a custom subclass of the defaultdatagrid. The onAddRow method is called from an ajaxbutton (onsubmit) I hope this helps -- Thierry Peng You must be doing something else in addition to that (or I am missing something). As far as I can see, the DefaultDataGrid class will not ask its model/datasource for a new rowcount when you call update(). Hence the call to update() will not result in the addition of a row to the grid, even though you added the row to your model. Are you sure you are not replacing the entire dataGrid in e.g. your getGrid() call? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org nope, there is no magic in the getGrid() method. it only returns the grid. If I read the update() method correctly I may even omit that call. So, the target.addComponent(grid) is sufficient I'm using the inmethod-grid-1.4-rc7 with some extensions. wicket version is 1.4.6 Ok thanks for your help. The problem is that inmethod 's call to IDataSource.query() asks for the rows upto the last known total row count. In your case that probably does not matter, since you just return an iterator over the entire datasource, and update the rowcount accordingly. I work with very large datasources, and unknown rowcounts. I can workaround this issue by providing the page-size to my datasource, so that I can fix the IQuery.getCount() asked by inmethod. Not a nice solution, but will work for now. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
InMethod Grid: resizing rowcount
The public interface of the inmethod DataGrid/DefaultDataGrid does not seem to provide functionality to expand the number of rows after an ajax-call that e.g. adds data to the underlying datasource. Is there a way to tell the DataGrid that the underlying datasource may have changed, to the effect that the existing row count is not valid anymore? I.e. like markAllItemsDirty(), but then telling the grid to reload the entire underlying model, including rowcount, instead of only the individual rows? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: InMethod Grid: resizing rowcount
On Mon, 15 Mar 2010 15:06 +0100, Thierry Peng p...@glue.ch wrote: Pointbreak schrieb: The public interface of the inmethod DataGrid/DefaultDataGrid does not seem to provide functionality to expand the number of rows after an ajax-call that e.g. adds data to the underlying datasource. Is there a way to tell the DataGrid that the underlying datasource may have changed, to the effect that the existing row count is not valid anymore? I.e. like markAllItemsDirty(), but then telling the grid to reload the entire underlying model, including rowcount, instead of only the individual rows? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org I tackled a similar problem (an add button for an editable datagrid) the following way: - create a new object with reflection - insert it in the backing list (model) - call update on the grid - add the grid to the requesttarget public class MyDataGrid extends DecoratedDataGrid { protected List rawList; protected final Class modelAsClass; public MyDataGrid(String id, String title, String buttonTitle, List? list, ListIGridColumn columns, final Class? modelAsClass) { super(id, title, buttonTitle, new MyDataProviderAdapter(new ListDataProvider(list)), columns, modelAsClass); log.debug(creating grid for type + modelAsClass.getSimpleName() + no of columns: + columns.size() + size of datalist: + list.size()); this.rawList = list; } @Override protected void onAddRow(AjaxRequestTarget target, Form? form) { Object obj = modelAsClass.newInstance(); rawList.add(obj); log.debug(object of class + modelAsClass.getName() + successfully inserted); update(); target.addComponent(getGrid()); } } This takes place in a custom subclass of the defaultdatagrid. The onAddRow method is called from an ajaxbutton (onsubmit) I hope this helps -- Thierry Peng You must be doing something else in addition to that (or I am missing something). As far as I can see, the DefaultDataGrid class will not ask its model/datasource for a new rowcount when you call update(). Hence the call to update() will not result in the addition of a row to the grid, even though you added the row to your model. Are you sure you are not replacing the entire dataGrid in e.g. your getGrid() call? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: maven, eclipse and wicket
Right-click project - Maven - Download sources You can see for which jar's m2eclipse has downloaded sources via the icon displayed in front of the jar under Maven dependencies in the project explorer. On Mon, 23 Mar 2009 12:23 -0500, Luther Baker lutherba...@gmail.com wrote: I am having a slight bit of trouble getting Eclipse to step into the Wicket source code while using the m2eclipse plugin. The m2eclpse has successfully downloaded the Wicket 1.3.5 distribution. My application fires up and works just fine in Eclipse. I have also enabled the m2eclipse plugin to download sources - I can see the source jars in the m2 repository now as well. I am trying to implement a security/authentiation/authorization scheme and while debugging, anytime I step out of my workspace source code, I get a window in Eclipse that says Source not found and a button that says Edit Source Lookup Path... If I click that button, I can choose to explicitly add: *Archive*: a jar or zip in the workspace containing source files *External Archive*: a jar or zip in the local file system containing source files *File System Directory*: a directory in the local file system *Java Classpath Variable*: workspace folder, local directory, or archive referenced by a variable path *Java Library*: a collection of binary archives with attached source *Java Project*: source folders in a Java project *Project*: a project in the workspace *Working Set*: *Workspace*: all projects in the workspace *Workspace Folder*: a folder in the workspace And I can click External Archive and explicitly add every single source jar file --- but I was wondering - shouldn't this automatically happen? Does anyone have a suggestion? or confirmation that these source jars must be manually added to step into Wicket code while using the m2eclipse plugin in Eclipse? I think this is probably an m2eclipse question ... but hoping someone here has dealt with this already. Thanks much, -Luther - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: maven, eclipse and wicket
I guess that if you use mvn jetty:run, maven will deploy your application (including the dependent jars). Thus it is not directly using the jars in the maven repo, but the deployed copies, therefore eclipse would be unable to find the sources. You could make a Start.java that just starts jetty (I think the wicket quick start projects include one). That's the easiest way to debug applications using jetty. On Mon, 23 Mar 2009 12:44 -0500, Luther Baker lutherba...@gmail.com wrote: Yep - the sources came down. The problem is in automatically attaching them to the debugger. I have an Eclipse DEBUG configuration invoking mvn jetty:run and it breaks just fine into my own source code - but when I go to step into the Wicket source, it can't find it the source code. The sources are downloaded and located in the same directories as the jars in my maven repository. I can explicitly attach them via the screen I mentioned in the first post by adding them individually as External Archives ... but sounds like I'm missing something. I was thinking that the maven/jetty/m2eclipse combo would know where to look. Explicitly adding every source jar to my project is a bit painful ... and so it sounds like I'm doing something incorrectly. Is this just supposed to 'work'. -Luther On Mon, Mar 23, 2009 at 12:31 PM, francisco treacy francisco.tre...@gmail.com wrote: i'm not sure i'm using m2eclipse (but i think so). to download sources just right click on your eclipse project, go to maven download sources. if we're using the same plugin, this should work. francisco On Mon, Mar 23, 2009 at 6:23 PM, Luther Baker lutherba...@gmail.com wrote: I am having a slight bit of trouble getting Eclipse to step into the Wicket source code while using the m2eclipse plugin. The m2eclpse has successfully downloaded the Wicket 1.3.5 distribution. My application fires up and works just fine in Eclipse. I have also enabled the m2eclipse plugin to download sources - I can see the source jars in the m2 repository now as well. I am trying to implement a security/authentiation/authorization scheme and while debugging, anytime I step out of my workspace source code, I get a window in Eclipse that says Source not found and a button that says Edit Source Lookup Path... If I click that button, I can choose to explicitly add: *Archive*: a jar or zip in the workspace containing source files *External Archive*: a jar or zip in the local file system containing source files *File System Directory*: a directory in the local file system *Java Classpath Variable*: workspace folder, local directory, or archive referenced by a variable path *Java Library*: a collection of binary archives with attached source *Java Project*: source folders in a Java project *Project*: a project in the workspace *Working Set*: *Workspace*: all projects in the workspace *Workspace Folder*: a folder in the workspace And I can click External Archive and explicitly add every single source jar file --- but I was wondering - shouldn't this automatically happen? Does anyone have a suggestion? or confirmation that these source jars must be manually added to step into Wicket code while using the m2eclipse plugin in Eclipse? I think this is probably an m2eclipse question ... but hoping someone here has dealt with this already. Thanks much, -Luther - 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: Wicket Problems On Ubuntu
Your LoginPage.html has special (non-ascii) characters, and is stored in another encoding than you read it (probably a windows encoding). Save it in e.g. UTF-8, and tell wicket to use UTF-8 as the encoding for reading page templates. Or replace your special characters with HTML codes for those characters. On Tue, 17 Mar 2009 01:11 -0700, carloc carlo_ca...@yahoo.com wrote: Hi Everyone, I'm getting this error which causes my application to not work at all. It works perfectly fine on windows but when I transfer to Ubuntu Linux this happens. I am deploying to a websphere 6.1 in both scenarios and I am using Wicket version 1.3.5, PLease help thanks a lot. Thank you 3/09 16:02:25:336 PHT] 0022 SystemOut O ERROR - MarkupCache - Unable to read markup from file:/opt/IBM/WebSphere/AppServer/profiles/AppSrv02/installedApps/sxi-ubuntu2Node01Cell/courier-management_war.ear/courier-management.war/WEB-INF/classes/com/ccti/carnelian/web/login/LoginPage.html sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:262) at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:314) at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:364) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:250) at java.io.InputStreamReader.read(InputStreamReader.java:212) at java.io.BufferedReader.fill(BufferedReader.java:157) at java.io.BufferedReader.read1(BufferedReader.java:208) at java.io.BufferedReader.read(BufferedReader.java:282) at org.apache.wicket.util.io.XmlReader.read(XmlReader.java:240) at java.io.Reader.read(Reader.java:124) at org.apache.wicket.util.io.Streams.readString(Streams.java:219) at org.apache.wicket.util.io.FullyBufferedReader.init(FullyBufferedReader.java:64) at org.apache.wicket.markup.parser.XmlPullParser.parse(XmlPullParser.java:536) at org.apache.wicket.markup.MarkupParser.parse(MarkupParser.java:265) at org.apache.wicket.markup.loader.SimpleMarkupLoader.loadMarkup(SimpleMarkupLoader.java:52) at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:62) at org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:55) at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:458) at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:553) at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:319) at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:343) at org.apache.wicket.Page.onRender(Page.java:1463) at org.apache.wicket.Component.render(Component.java:2317) at org.apache.wicket.Page.renderPage(Page.java:904) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475) at
Re: resource cacheable firefox/opera
You use the same url for different images? Firefox uses a memory cache in addition to a disk cache. Check what headers are send with your image. No-store and no-cache headers will NOT prevent firefox3 from using its memory cache (at least not with pages). Your best bet is to use different urls. On Tue, 10 Mar 2009 14:56 +, Arthur Leigh Allen arthurleigh.al...@yahoo.de wrote: Hi folks, I've implemented a RemoteImage class which extends the Image class. The method setCacheable works with Internet Explorer but neither with Firefox nor with Opera. If I load an image the first time, the correct image is shown. When I try to load a different image (path is applied correctly), the old image is shown. What I'm doing wrong? I'm using wicket 1.3.5. === public classRemoteImage extendsImage { publicRemoteImage(String id, finalString path) { super(id); Resource resource = newWebResource() { publicIResourceStream getResourceStream() { IResourceStream stream = newFileResourceStream(newFile(path)); returnstream; } }; resource.setCacheable(false); setImageResource(resource); } } === Would appreciate any help. Thanks in advance Leigh - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: tinymce question: how to switch default language?
The default language is based on the locale of the session. Which is normally what you want (because it is influenced by the browser preferences, and the same as what wicket is using). You can override it by passing a language as second argument in the TinyMCESettings constructor. On Sat, 07 Mar 2009 07:22 -0800, rolandpeng rolandp...@cht.com.tw wrote: There are many languages supported by tinymce. The default lanuage of my tinymce is zh. -- TinyMCESettings settings = new TinyMCESettings( TinyMCESettings.Theme.advanced); Language language = settings.getLanguage(); System.out.println(language.name()); == result: zh -- I can't find setLanguage() method in TinyMCESettings class. How to switch the language from zh into en,or any others? Thanks. Roland. -- View this message in context: http://www.nabble.com/tinymce-question%3A-how-to-switch-default-language--tp22388584p22388584.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: a bit of topic but i couldnt resist ....
You are missing the point. With a string it will work, because the elements will actually be the same string objects, so the String.equals and the overridden compare method will give the same results in the example. Johan's point is that while set1.removeAll() is called, it is not the compare method of set1 that is used, which seems counterintuitive. On Thu, 05 Mar 2009 13:13 +0100, Dave Schoorl mailli...@cyber-d.com wrote: If I change every MyObject in a String, everything is fine. Perhaps the MyObject is not obeying the necessary contracts? See adjusted code below: import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import java.util.TreeSet; public class TestWithStrings { public static void main(String[] args) { TreeSetString set1 = getCleanSet(); HashSetString set2 = new HashSetString(); set2.add(johan); set1.removeAll(set2); System.err.println(this works: + set1.size() + == 1, and remaining object is + set1.iterator().next() + == rob); // add removed back in set1 = getCleanSet(); // increase the size of set2 with some other random others set2.add(random1); set2.add(random2); // now size is bigger then set1, call removeall again: set1.removeAll(set2); System.err.println(this doesnt work: + set1.size() + != 1, so now both objects stil remain! This is because + removeAll isnt overwritten by TreeSet and AbstractSet walks over the smallest set but then compare fails); // same for retainAll that also compares wrong. set1 = getCleanSet(); set1.retainAll(set2); System.err.println(set1 is now completely empty, but it should have 1 left: + set1); // so both methods should always iterator through the colleciton they get and do the compare on its self set1 = getCleanFixedSet(); set1.removeAll(set2); System.err.println(now this works: + set1.size() + == 1, and remainng object is + set1.iterator().next() + == rob); // add removed back in set1 = getCleanFixedSet(); set1.retainAll(set2); System.err.println(set1 is now correct, it has 1 left: + set1); } public static TreeSetString getCleanSet() { TreeSetString set1 = new TreeSetString(new ComparatorString(){ public int compare(String o1, String o2) { return o1.compareToIgnoreCase(o2); } }); set1.add(johan); set1.add(rob); return set1; } public static TreeSetString getCleanFixedSet() { TreeSetString set1 = new MyFixedTreeSetString(new ComparatorString(){ public int compare(String o1, String o2) { return o1.compareToIgnoreCase(o2); } }); set1.add(johan); set1.add(rob); return set1; } public static class MyFixedTreeSetE extends TreeSetE { public MyFixedTreeSet(Comparator? super E comparator) { super(comparator); } @Override public boolean retainAll(Collection? c) { ArrayListE list = new ArrayListE(); Iterator? e = c.iterator(); while (e.hasNext()) { Object next = e.next(); if (contains(next)) { list.add((E)next); } } boolean modified = list.size() size(); if (modified) { clear(); for (E item : list) { add(item); } } return modified; } @Override public boolean removeAll(Collection? c) { boolean modified = false; for (Iterator? i = c.iterator(); i.hasNext(); ) modified |= remove(i.next()); return modified; } } } - 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: a bit of topic but i couldnt resist ....
Sorry, I have to correct myself. According to the API-docs, the compare method in a TreeSet must be consistent with equals. In Johan's example it is not. On Thu, 05 Mar 2009 13:36 +0100, Pointbreak pointbreak+wicketst...@ml1.net wrote: You are missing the point. With a string it will work, because the elements will actually be the same string objects, so the String.equals and the overridden compare method will give the same results in the example. Johan's point is that while set1.removeAll() is called, it is not the compare method of set1 that is used, which seems counterintuitive. On Thu, 05 Mar 2009 13:13 +0100, Dave Schoorl mailli...@cyber-d.com wrote: If I change every MyObject in a String, everything is fine. Perhaps the MyObject is not obeying the necessary contracts? See adjusted code below: import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import java.util.TreeSet; public class TestWithStrings { public static void main(String[] args) { TreeSetString set1 = getCleanSet(); HashSetString set2 = new HashSetString(); set2.add(johan); set1.removeAll(set2); System.err.println(this works: + set1.size() + == 1, and remaining object is + set1.iterator().next() + == rob); // add removed back in set1 = getCleanSet(); // increase the size of set2 with some other random others set2.add(random1); set2.add(random2); // now size is bigger then set1, call removeall again: set1.removeAll(set2); System.err.println(this doesnt work: + set1.size() + != 1, so now both objects stil remain! This is because + removeAll isnt overwritten by TreeSet and AbstractSet walks over the smallest set but then compare fails); // same for retainAll that also compares wrong. set1 = getCleanSet(); set1.retainAll(set2); System.err.println(set1 is now completely empty, but it should have 1 left: + set1); // so both methods should always iterator through the colleciton they get and do the compare on its self set1 = getCleanFixedSet(); set1.removeAll(set2); System.err.println(now this works: + set1.size() + == 1, and remainng object is + set1.iterator().next() + == rob); // add removed back in set1 = getCleanFixedSet(); set1.retainAll(set2); System.err.println(set1 is now correct, it has 1 left: + set1); } public static TreeSetString getCleanSet() { TreeSetString set1 = new TreeSetString(new ComparatorString(){ public int compare(String o1, String o2) { return o1.compareToIgnoreCase(o2); } }); set1.add(johan); set1.add(rob); return set1; } public static TreeSetString getCleanFixedSet() { TreeSetString set1 = new MyFixedTreeSetString(new ComparatorString(){ public int compare(String o1, String o2) { return o1.compareToIgnoreCase(o2); } }); set1.add(johan); set1.add(rob); return set1; } public static class MyFixedTreeSetE extends TreeSetE { public MyFixedTreeSet(Comparator? super E comparator) { super(comparator); } @Override public boolean retainAll(Collection? c) { ArrayListE list = new ArrayListE(); Iterator? e = c.iterator(); while (e.hasNext()) { Object next = e.next(); if (contains(next)) { list.add((E)next); } } boolean modified = list.size() size(); if (modified) { clear(); for (E item : list) { add(item); } } return modified; } @Override public boolean removeAll(Collection? c) { boolean modified = false; for (Iterator? i = c.iterator(); i.hasNext(); ) modified |= remove(i.next()); return modified; } } } - 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
Re: a bit of topic but i couldnt resist ....
Yes it's stupid. If it was the only stupid thing sun did in the java specs, i might have understood why it is one of the most populair languages around... On Thu, 05 Mar 2009 13:46 +0100, Johan Compagner jcompag...@gmail.com wrote: that is then the wrong spec that i talk about That is completely stupid With a comparator you just OVERRIDE the equals, thats the whole point! johan On Thu, Mar 5, 2009 at 13:44, Pointbreak pointbreak+wicketst...@ml1.netpointbreak%2bwicketst...@ml1.net wrote: Sorry, I have to correct myself. According to the API-docs, the compare method in a TreeSet must be consistent with equals. In Johan's example it is not. On Thu, 05 Mar 2009 13:36 +0100, Pointbreak pointbreak+wicketst...@ml1.net pointbreak%2bwicketst...@ml1.net wrote: You are missing the point. With a string it will work, because the elements will actually be the same string objects, so the String.equals and the overridden compare method will give the same results in the example. Johan's point is that while set1.removeAll() is called, it is not the compare method of set1 that is used, which seems counterintuitive. On Thu, 05 Mar 2009 13:13 +0100, Dave Schoorl mailli...@cyber-d.com wrote: If I change every MyObject in a String, everything is fine. Perhaps the MyObject is not obeying the necessary contracts? See adjusted code below: import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import java.util.TreeSet; public class TestWithStrings { public static void main(String[] args) { TreeSetString set1 = getCleanSet(); HashSetString set2 = new HashSetString(); set2.add(johan); set1.removeAll(set2); System.err.println(this works: + set1.size() + == 1, and remaining object is + set1.iterator().next() + == rob); // add removed back in set1 = getCleanSet(); // increase the size of set2 with some other random others set2.add(random1); set2.add(random2); // now size is bigger then set1, call removeall again: set1.removeAll(set2); System.err.println(this doesnt work: + set1.size() + != 1, so now both objects stil remain! This is because + removeAll isnt overwritten by TreeSet and AbstractSet walks over the smallest set but then compare fails); // same for retainAll that also compares wrong. set1 = getCleanSet(); set1.retainAll(set2); System.err.println(set1 is now completely empty, but it should have 1 left: + set1); // so both methods should always iterator through the colleciton they get and do the compare on its self set1 = getCleanFixedSet(); set1.removeAll(set2); System.err.println(now this works: + set1.size() + == 1, and remainng object is + set1.iterator().next() + == rob); // add removed back in set1 = getCleanFixedSet(); set1.retainAll(set2); System.err.println(set1 is now correct, it has 1 left: + set1); } public static TreeSetString getCleanSet() { TreeSetString set1 = new TreeSetString(new ComparatorString(){ public int compare(String o1, String o2) { return o1.compareToIgnoreCase(o2); } }); set1.add(johan); set1.add(rob); return set1; } public static TreeSetString getCleanFixedSet() { TreeSetString set1 = new MyFixedTreeSetString(new ComparatorString(){ public int compare(String o1, String o2) { return o1.compareToIgnoreCase(o2); } }); set1.add(johan); set1.add(rob); return set1; } public static class MyFixedTreeSetE extends TreeSetE { public MyFixedTreeSet(Comparator? super E comparator) { super(comparator); } @Override public boolean retainAll(Collection? c) { ArrayListE list = new ArrayListE(); Iterator? e = c.iterator(); while (e.hasNext()) { Object next = e.next(); if (contains(next)) { list.add((E)next); } } boolean modified = list.size() size(); if (modified) { clear(); for (E item
Re: a bit of topic but i couldnt resist ....
I actually think the specs in the api doc are just worded very badly. They just mean to say that if the comparator is not consistent with equals, the Set-contract is broken, just because that contract is based on (and worded in terms of) equals. This may lead to odd behavior for other code that assumes the Set-contract on such collections. The removeAll/retainAll oddities you demonstrated are bugs. Somebody should file a bug report with sun... On Thu, 05 Mar 2009 14:05 +0100, Johan Compagner jcompag...@gmail.com wrote: yes i know but the TreeSet does also say that in the javadoc that it is an exception because of the Comparator And they could really just make it a black box. The only things they just need to fix then is the removeAll and retainAll methods Why the removeAll iterates by default over itself and ask for a contains on the other and then removes itself again is beyond me I wouldnt never implement it that way. Why would you do that in the first place? It wouldnt come into my mind to do it like that besides that AbstractSet.removeAll makes it even worse: public boolean removeAll(Collection? c) { boolean modified = false; if (size() c.size()) { for (Iterator? i = c.iterator(); i.hasNext(); ) modified |= remove(i.next()); } else { for (Iterator? i = iterator(); i.hasNext(); ) { if (c.contains(i.next())) { i.remove(); modified = true; } } } return modified; } see partly it does what i expect to happen (the if) but what sun wants to happen is the else.. So now we just have 2 behaviors depending on what size the collection has... nice.. On Thu, Mar 5, 2009 at 13:58, Maarten Bosteels mbosteels@gmail.comwrote: It is in the javadoc for Comparator Caution should be exercised when using a comparator capable of imposing an ordering inconsistent with equals to order a sorted set (or sorted map). Suppose a sorted set (or sorted map) with an explicit comparator c is used with elements (or keys) drawn from a set S. If the ordering imposed by c on S is inconsistent with equals, the sorted set (or sorted map) will behave strangely. In particular the sorted set (or sorted map) will violate the general contract for set (or map), which is defined in terms of equals. http://java.sun.com/javase/6/docs/api/java/util/Comparator.html On Thu, Mar 5, 2009 at 1:50 PM, Johan Compagner jcompag...@gmail.com wrote: For example. You want a tree set with a case insensitive comparator.. Because you want to order case insensitive.. That breaks the equals contract. So that note in the doc just makes the TreeSet completely worthless johan On Thu, Mar 5, 2009 at 13:46, Johan Compagner jcompag...@gmail.com wrote: that is then the wrong spec that i talk about That is completely stupid With a comparator you just OVERRIDE the equals, thats the whole point! johan On Thu, Mar 5, 2009 at 13:44, Pointbreak pointbreak+wicketst...@ml1.net pointbreak%2bwicketst...@ml1.net pointbreak%2bwicketst...@ml1.net pointbreak%252bwicketst...@ml1.net pointbreak%2bwicketst...@ml1.net pointbreak%252bwicketst...@ml1.net pointbreak%252bwicketst...@ml1.net pointbreak%25252bwicketst...@ml1.net wrote: Sorry, I have to correct myself. According to the API-docs, the compare method in a TreeSet must be consistent with equals. In Johan's example it is not. On Thu, 05 Mar 2009 13:36 +0100, Pointbreak pointbreak+wicketst...@ml1.net pointbreak%2bwicketst...@ml1.net pointbreak%2bwicketst...@ml1.net pointbreak%252bwicketst...@ml1.net pointbreak%2bwicketst...@ml1.net pointbreak%252bwicketst...@ml1.net pointbreak%252bwicketst...@ml1.net pointbreak%25252bwicketst...@ml1.net wrote: You are missing the point. With a string it will work, because the elements will actually be the same string objects, so the String.equals and the overridden compare method will give the same results in the example. Johan's point is that while set1.removeAll() is called, it is not the compare method of set1 that is used, which seems counterintuitive. On Thu, 05 Mar 2009 13:13 +0100, Dave Schoorl mailli...@cyber-d.com wrote: If I change every MyObject in a String, everything is fine. Perhaps the MyObject is not obeying the necessary contracts? See adjusted code below: import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import java.util.TreeSet; public class TestWithStrings { public static void main(String[] args
Re: a bit of topic but i couldnt resist ....
Dave, you are missing the point completely. The issue raised by Johan is that if you call TreeSet.removeAll(otherSet), then in some cases the comperator/equals contract of otherSet is used, in other cases the comperator/equals contract of the treeset. Which is a bit strange, and even by Sun considered a bug (although low priority). You are just making both comperators the same, which of course will not demonstrate this problem. Make the comperator of the TreeSet use str.compareTo instead of compareToIgnoreCase, while keeping your implementation of MyObject the same, and you will have the same problem that Johan illustrated. On Thu, 05 Mar 2009 16:51 +0100, Dave Schoorl mailli...@cyber-d.com wrote: I do understand your point. However you are dealing with multiple contracts and not all of them are satisfied. And sometimes contracts are conflicting and it is impossible to meet all contracts, but I believe this is not the case in your scenario. A TreeSet is an implementation of a Set and must obey the Set contract. Adding order to the Set should not break the Set contract, because if I have a Set, I should not be concerned with the implementation details (is it a TreeSet or a HashSet or whatever). I believe the Set contract takes precedence over the Comparator contract, but in your case, by providing an equals method to MyObject that is in line with the Comparator, there still is no problem. See the code below, where MyObject implements the equals method with by comparing case insensitive: import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import java.util.TreeSet; public class CorrectedMyObjectTest { public static class MyObject { private final String aString; MyObject(String str) { aString = str; } @Override public String toString() { return aString; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((aString == null) ? 0 : aString.toLowerCase().hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof MyObject)) return false; MyObject other = (MyObject) obj; if (aString == null) { if (other.aString != null) { return false; } } else if (other.aString == null) { return false; } return aString.compareToIgnoreCase(other.aString) == 0; } } public static void main(String[] args) { TreeSetMyObject set1 = getCleanSet(); HashSetMyObject set2 = new HashSetMyObject(); set2.add(new MyObject(johan)); set1.removeAll(set2); System.err.println(this works: + set1.size() + == 1, and remaining object is + set1.iterator().next() + == rob); // add removed back in set1 = getCleanSet(); // increase the size of set2 with some other random others set2.add(new MyObject(random1)); set2.add(new MyObject(random2)); // now size is bigger then set1, call removeall again: set1.removeAll(set2); System.err.println(this doesnt work: + set1.size() + != 1, so now both objects stil remain! This is because + removeAll isnt overwritten by TreeSet and AbstractSet walks over the smallest set but then compare fails); // same for retainAll that also compares wrong. set1 = getCleanSet(); set1.retainAll(set2); System.err.println(set1 is now completely empty, but it should have 1 left: + set1); // so both methods should always iterator through the colleciton they get and do the compare on its self set1 = getCleanFixedSet(); set1.removeAll(set2); System.err .println(now this works: + set1.size() + == 1, and remainng object is + set1.iterator().next() + == rob); // add removed back in set1 = getCleanFixedSet(); set1.retainAll(set2); System.err.println(set1 is now correct, it has 1 left: + set1); } public static TreeSetMyObject getCleanSet() { TreeSetMyObject set1 = new TreeSetMyObject(new ComparatorMyObject() { public int compare(MyObject o1, MyObject o2) { return o1.aString.compareToIgnoreCase(o2.aString); } }); set1.add(new MyObject(johan)); set1.add(new MyObject(rob)); return set1; } public static
Re: error messages due to hack/search-bots
Not an answer to your question, but why fight this kind of stuff? It's an invalid request, so it should result in an error. If you don't want these entries in your log, you could just add a filter to your logger (e.g. filtering out error messages from org.apache.wicket.request.target.resource.SharedResourceRequestTarget where the message equals unable to lazily register shared resource). On Mon, 22 Dec 2008 14:05 +0100, Antoine van Wel antoine.van@gmail.com wrote: Heya, we're trying to catch all errors caused by hack search-bots on our wicket-app. AFAIK these bots take existing links, chop 'em up in smaller chunks and try to append all kind of . We've caught most of the errors which result due to these bots, but this one still stands: XXX.XXX.XXX.XXX - - [22/Dec/2008:00:03:37 +0100] GET /resources/org.apache.wicket.markup.html.WicketEventReference_false_61497/ HTTP/1.1 404 952 - - - Causing errors such as 2008-12-22 00:03:41,654 ERROR - [TP-Processor7][org.apache.wicket.request.target.resource.SharedResourceRequestTarget:172] unable to lazily register shared resource org.apache.wicket.ajax.WicketAjaxReference_false_61497/ java.lang.ClassNotFoundException: org.apache.wicket.ajax.WicketAjaxReference_false_61497 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) [...snip...] So... any ideas to catch these errors? Antoine -- We don't see things as they are, we see things as we are. - Anais Nin Whether you think you can or whether you think you can't, you're right. - Henry Ford - 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: TinyMCE ajax load
If by load with ajax you mean that the javascript sources are loaded on ajax requests, instead of with the initial page, then no, that is not supported. The ajax parameter that was available in old 1.3 snapshots did not work properly. It has been removed for some time now (also in latest 1.3-snapshots). There is ajax support (e.g. an InPlaceEditComponent), but all javascript will be loaded normally. On Wed, 17 Dec 2008 17:57 +0330, Omid Alamdar Milani omil...@gmail.com wrote: Hi, Is there a way to load tiny mce editor with ajax? 1.3 snapshot has an ajax parameter and works correctly on firefox but doesn't work on IE. The latest 1.4 snapshot works fine with IE but the ajax parameter is gone and I couldn't find a way to load it with ajax. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: how to reuse a label in the same page?
- No you will not save a lot of memory. Wicket components are fairly small. Memory usage will/should mostly be in the application models, and they are easy to share between components. - It will introduce a complexity nightmare with no real benefits (imho) in the framework though. On Fri, 12 December 2008 12:37, Bruno Cesar Borges wrote: lol... Alright, I agree with you, but think about. There are some cases where creating a fragment or a panel to reuse, wouldn't address the main advantage. We could save a *lot* of memory usage this way, and I think it would be a cool feature. Even with Ajax wouldn't be a problem. -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: Friday, December 12, 2008 10:33 AM To: users@wicket.apache.org Subject: Re: how to reuse a label in the same page? The fact that you want to bind a component in two places and complain that you can't, is a code smell: you should extract that component to a panel or fragment and reuse the panel (/fragment). Martijn On Fri, Dec 12, 2008 at 1:32 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: ieuw On Fri, Dec 12, 2008 at 1:30 PM, Bruno Cesar Borges brunobor...@cetip.com.br wrote: Martijn, it is possible to create nodes inside a DOM tree refering to another DOM node. What if it was possible to do the same with Wicket? div wicket:id=myPanel span wicket:id=foolabel/span span wicket:ref=fooagain/span /div span wicket:ref=myPanel.fooagain but outside panel!/span Regards, Bruno -Original Message- From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] Sent: Friday, December 12, 2008 5:18 AM To: users@wicket.apache.org Subject: Re: how to reuse a label in the same page? Nope, wicket:id is a 1-1 mapping at the same dom tree level. You can reuse id's at different levels or in different branches of the dom tree, but not as siblings. a href=# wicket:id=foospan wicket:id=foo/span/a works but another a href=# wicket:id=foo/a will fail (and rightfully so) Martijn On Fri, Dec 12, 2008 at 6:20 AM, Jeremy Thomerson jer...@wickettraining.com wrote: I'm pretty sure that you can just add it once in Java and multiple times in the HTML, although I've never pondered the (potential) side-effects of this. Give it a shot and let us know how it works for you. With something as stateless / simple as a BookmarkablePageLink, there probably couldn't be much in the way of side-effects, although with very complex, stateful components, I could see that maybe there would be an issue... (maybe??) -- Jeremy Thomerson http://www.wickettraining.com On Thu, Dec 11, 2008 at 3:29 PM, novotny novo...@gridsphere.org wrote: Basically I need two of the same links on the page, and it looks like I have to do this which just seems kinda lame... add(new BookmarkablePageLinkString(personaldetails, PersonalDetailsPage.class)); add(new BookmarkablePageLinkString(personaldetails2, PersonalDetailsPage.class)); Click Here Profile page jWeekend wrote: Jason, What are you trying to achieve? Here are some ideas that may give the desired effect, depending on what that is ... 1 - Make a model for your data and give that to all the Label instances as required, (but each with their unique id and separate markup). 2 - Use a repeater (like a ListView) to render several labels (no repetition of Java code or markup). 3 - Write a method that takes a model (or just a String) and an id, that returns an appropriately configured Label instance (saves on repeating Java code - still need markup per component and your own unique ids). Regards - Cemal http://www.jWeekend.co.uk http://www.jweekend.co.uk/ jWeekend novotny wrote: I have a simple label hello and I want to display it twice in the same page, but wicket complains the wicket:id needs to be unique in my page what do I need to do, is there an alias or something? Thanks, Jason -- View this message in context: http://www.nabble.com/how-to-reuse-a-label-in-the-same-page--tp20964351p20964551.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 -- 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: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TinyMCE init method rendering twice
Yes, it looks like TinyMceSettings does not have methods to remove the toolbars. I'll add those as soon as TeamCity deploys jars again... But you could work around that by adding a method overload for toJavaScript() to your custom MyTinyMceSettings, something like: public String toJavaScript(Mode mode, CollectionComponent components) { StringBuffer buffer = new StringBuffer(super.toJavaScript(mode, components)); buffer.append(,\n\ttheme_advanced_buttons2: \\); buffer.append(,\n\ttheme_advanced_buttons3: \\); return buffer.toString(); } Then you can also remove most of your disableButton calls. Or use the simple theme instead. On Tue, 9 Dec 2008 14:06:54 -0800 (PST), jchappelle [EMAIL PROTECTED] wrote: I downloaded the latest snapshot from the wicket-stuff repository and did the setStatusbarLocation(null) and that fixed that problem. However, now I have three toolbars in the top instead of one. All of my buttons are on the top toolbar but underneath it is two others that only have separators in them so it looks pretty weird. Here is my custom settings class: public class MyTinyMceSettings extends TinyMCESettings { private static final long serialVersionUID = 1L; public MyTinyMceSettings () { super(TinyMCESettings.Theme.advanced); add(TinyMCESettings.bullist, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after); add(TinyMCESettings.numlist, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after); disableButton(TinyMCESettings.styleselect); disableButton(TinyMCESettings.sub); disableButton(TinyMCESettings.sup); disableButton(TinyMCESettings.charmap); disableButton(TinyMCESettings.image); disableButton(TinyMCESettings.anchor); disableButton(TinyMCESettings.help); disableButton(TinyMCESettings.code); disableButton(TinyMCESettings.link); disableButton(TinyMCESettings.unlink); disableButton(TinyMCESettings.formatselect); disableButton(TinyMCESettings.indent); disableButton(TinyMCESettings.outdent); disableButton(TinyMCESettings.undo); disableButton(TinyMCESettings.redo); disableButton(TinyMCESettings.cleanup); disableButton(TinyMCESettings.hr); disableButton(TinyMCESettings.visualaid); disableButton(TinyMCESettings.separator); disableButton(TinyMCESettings.formatselect); disableButton(TinyMCESettings.removeformat); setToolbarAlign(TinyMCESettings.Align.left); setToolbarLocation(TinyMCESettings.Location.top); setStatusbarLocation(null); setVerticalResizing(true); setHorizontalResizing(true); } } Any idea of how to remove those toolbars? Thanks, Josh pointbreak+wicketstuff wrote: You seem to be using an old version of tinymce. AFAIK, the latest version does not use mode: specific_textareas, but mode: exact in the tinyMCE.init call. Update to the latest version, and you should be fine I guess. You can remove the statusbar via TinyMceSettings.setStatusbarLocation(null) (which by the way is the default). See http://wiki.moxiecode.com/index.php/TinyMCE:Configuration#Layout for a comprehensive list and documentation on all available options. On Mon, 8 Dec 2008 10:45:40 -0800 (PST), jchappelle [EMAIL PROTECTED] wrote: I have a TinyMCE component in one of my pages and I am trying to remove the Path: toolbar at the bottom. I have noticed that the init method renders on my page twice. I only have one textarea on my page and I am adding a custom TinyMceBehavior to it. I am trying to disable the visualaid button(i assume that is how you remove the Path: at the bottom). On one of the init methods rendered it has that button disabled and on the other one it doesn't. I wonder if that could be causing it. Here is part of the html rendered: tinyMCE.init({ mode : specific_textareas, editor_selector : 70fa4bd0-497a-4eb3-8de5-a3fbc13bedf3, theme : advanced, language : en, plugins : contextmenu, save, paste, searchreplace, insertdatetime, preview, zoom, table, emotions, iespell, flash, print, directionality, fullscreen, theme_advanced_buttons1_add_before : save, newdocument, separator, theme_advanced_buttons1_add : fontselect, fontsizeselect, theme_advanced_buttons2_add_before: cut, copy, paste, pastetext, pasteword, separator, search, replace, separator, theme_advanced_buttons2_add : separator, inserttime, insertdate, separator, preview, zoom, separator, forecolor, backcolor, theme_advanced_buttons3_add_before : tablecontrols, theme_advanced_buttons3_add : emotions, iespell, flash, separator, print, separator, ltr, rtl, separator, fullscreen
Re: TinyMCE init method rendering twice
You seem to be using an old version of tinymce. AFAIK, the latest version does not use mode: specific_textareas, but mode: exact in the tinyMCE.init call. Update to the latest version, and you should be fine I guess. You can remove the statusbar via TinyMceSettings.setStatusbarLocation(null) (which by the way is the default). See http://wiki.moxiecode.com/index.php/TinyMCE:Configuration#Layout for a comprehensive list and documentation on all available options. On Mon, 8 Dec 2008 10:45:40 -0800 (PST), jchappelle [EMAIL PROTECTED] wrote: I have a TinyMCE component in one of my pages and I am trying to remove the Path: toolbar at the bottom. I have noticed that the init method renders on my page twice. I only have one textarea on my page and I am adding a custom TinyMceBehavior to it. I am trying to disable the visualaid button(i assume that is how you remove the Path: at the bottom). On one of the init methods rendered it has that button disabled and on the other one it doesn't. I wonder if that could be causing it. Here is part of the html rendered: tinyMCE.init({ mode : specific_textareas, editor_selector : 70fa4bd0-497a-4eb3-8de5-a3fbc13bedf3, theme : advanced, language : en, plugins : contextmenu, save, paste, searchreplace, insertdatetime, preview, zoom, table, emotions, iespell, flash, print, directionality, fullscreen, theme_advanced_buttons1_add_before : save, newdocument, separator, theme_advanced_buttons1_add : fontselect, fontsizeselect, theme_advanced_buttons2_add_before: cut, copy, paste, pastetext, pasteword, separator, search, replace, separator, theme_advanced_buttons2_add : separator, inserttime, insertdate, separator, preview, zoom, separator, forecolor, backcolor, theme_advanced_buttons3_add_before : tablecontrols, theme_advanced_buttons3_add : emotions, iespell, flash, separator, print, separator, ltr, rtl, separator, fullscreen, theme_advanced_toolbar_location : top, theme_advanced_statusbar_location : bottom, theme_advanced_toolbar_align : left, theme_advanced_resizing : true, theme_advanced_resize_horizontal : false, plugin_insertdate_timeFormat : Time: %H:%M, plugin_insertdate_dateFormat : Date: %m-%d-%Y, fullpage_default_xml_pi : false }); /*--]]*//script script type=text/javascript id=init!--/*--![CDATA[/*!--*/ tinyMCE.init({ mode : specific_textareas, editor_selector : 679c2b60-3c42-47e0-986e-3d653f7a28d6, theme : advanced, language : en, theme_advanced_disable : styleselect, sub, sup, charmap, image, anchor, help, code, link, unlink, formatselect, bullist, numlist, indent, outdent, undo, redo, cleanup, hr, visualaid, separator, removeformat, theme_advanced_buttons1_add : bullist, numlist, theme_advanced_toolbar_location : top, theme_advanced_statusbar_location : bottom, theme_advanced_toolbar_align : left, theme_advanced_resizing : true, theme_advanced_resize_horizontal : true }); Could someone please help? Thanks, Josh -- View this message in context: http://www.nabble.com/TinyMCE-init-method-rendering-twice-tp20901160p20901160.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clearing Cache after Logout
That you get back to your last page when hitting the back button has nothing to do with Wicket. It's just what browsers do when you hit the back button. I guess you are using firefox (3), and firefox 3 will show a page from its in-memory cache, even if the page headers tell it the page is expired long ago, must be reloaded, and must be revalidated (which is what wicket tells it by default). Google on firefox cache reload or something for how firefox caches pages and for suggestions on how to force a page reload. On Thu, 04 Dec 2008 18:35:09 +0200, Serkan Camurcuoglu [EMAIL PROTECTED] said: you can set your application's home page as your expired page or throw a restartresponseexception (to home page) from the constructor of your page expired page.. at least I do it that way.. vishy_sb wrote: Thanks for the reply there Nino. I have set up a custom expired page and have set the following in Application class getApplicationSettings().setPageExpiredErrorPage(PageExpired.class); Now the page expired is set to this page. But still on hitting the back button I get back to the page. I tried using the SimplePageAuthorizationStrategy in my Application.init() method. The code that put in there looks something like this SimplePageAuthorizationStrategy authorizationStrategy = new SimplePageAuthorizationStrategy( LimitManagerPage.class, PageExpired.class) { protected boolean isAuthorized() { // Authorize access based on user authentication in the session if(((WebSession) Session.get()).isSessionInvalidated()){ return false; } else { return true; } } }; getSecuritySettings().setAuthorizationStrategy(authorizationStrategy); But this doesn't provide the desired result as well. This doesn't even show my custom PageExpired web page. Any ideas about why this is not working or something else that I can do to get this to work. Thanks in advance, vishy - 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: Progress Bar
http://cwiki.apache.org/WICKET/everything-about-wicket-internationalization.html On Wed, 12 Nov 2008 12:37:07 -0300, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] said: Hi all, I am using the progress bar found at extensions. Is it possible to translate the words of the message that appear at the status (Upload Starting... and 34% finished, 71.3M of 209.7M at 5.9M/s; 23 seconds) ?? Or put my own version of messages? f(t) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default locale / resource language problem
You can make your own subclass of Session, and make it call setLocale in the contructor, then override getWebSessionClass in your application class. On Fri, 7 Nov 2008 14:45:57 +0100, Rutger Jansen [EMAIL PROTECTED] said: You were just ahead of me as I saw that the given Locale in one of my custom validators was en_EN. Is there a way to force the locale of the session globaly so I don't have to check the session's locale on each page? On 11/7/08, Pointbreak [EMAIL PROTECTED] wrote: You have to set an explicit locale for your session (call setLocale() in the session) to force a language. Defaultlocale is just what it says it is: a default. Your browser probably asks for englis pages (see your browser settings). On Fri, 7 Nov 2008 14:06:46 +0100, Rutger Jansen [EMAIL PROTECTED] said: Hi, I can't seem to get default error/validation messages in my own language (Dutch) even though my default Locale is correct (java.util.Locale.getDefault() = nl_NL). They keep showing up in English. Is there another place where the default converters get the localization of their messages, should I do more configuration? Can't seem to find it in the book (Wicket in action) I know how to override my own expected messages but want to be sure that any unforseen message is in the correct language as well. I tried wicket 1.3.4 and 1.3.5 Rutger - 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: Default locale / resource language problem
You have to set an explicit locale for your session (call setLocale() in the session) to force a language. Defaultlocale is just what it says it is: a default. Your browser probably asks for englis pages (see your browser settings). On Fri, 7 Nov 2008 14:06:46 +0100, Rutger Jansen [EMAIL PROTECTED] said: Hi, I can't seem to get default error/validation messages in my own language (Dutch) even though my default Locale is correct (java.util.Locale.getDefault() = nl_NL). They keep showing up in English. Is there another place where the default converters get the localization of their messages, should I do more configuration? Can't seem to find it in the book (Wicket in action) I know how to override my own expected messages but want to be sure that any unforseen message is in the correct language as well. I tried wicket 1.3.4 and 1.3.5 Rutger - 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: Basic print.css question
Is this a quiz? Your #navlist is not inside a #footer and your #noprint is not an id but a class. On Thu, 6 Nov 2008 19:55:37 -0500, Jim Pinkham [EMAIL PROTECTED] said: Sorry this isn't so wicket specific, but I think I'm doing this media type thing correctly - what am I missing? Here's the view-source of my wicket page: head titleFirst Unitarian Universalist Church of Columbus Auction 2009/title link href=app.css rel=stylesheet type=text/css media=all/ link href=print.css rel=stylesheet type=text/css media=print/ /head body div id=navcontainer h2 align=centerFirstUU Auction span wicket:id=year22009/span/h2 ul id=navlist wicket:link lia href=./Home Page/a/li lia href=?wicket:bookmarkablePage=:org.firstuucolumbus.auction.page.CatalogPageAuction Catalog/a/li lia href=CalendarPage.htmlEvent Calendar/a/li lia href=?wicket:bookmarkablePage=:org.firstuucolumbus.auction.page.StatementPageMy Statement/a/li /wicket:link /ul span class=noprint wicket:id=helloWelcome Jim Pinkham/span yadda yadda yadda. For some reason, when I do print-preview, I'm still seeing the ul id=navlist element and the last line span class=noprint ... Welcome ... app.css and print.css are in the same folder, and print.css starts with: div#footer ul#navlist, #noprint { display: none; } All the app.css styles are applied properly, but the display:none doesn't seem to be taking effect on the class=noprint or the ul#navlist. Thanks, -- Jim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket and 508 compilance
I don't understand why you keep insisting that a title attribute should always be included in an anchor. In most cases the text within the anchor tag is enough information for what the purpose of the link is, certainly if you think a minute about that text. In such cases a title attribute will just confuse users with an overload of unnecessary information. Which by the way is especially irritating for users that use screenreaders. Yes some accessibility guideline checkers will generate warnings or errors if you omit the title tag, but what do they know, they are just stupid programs. On Tue, 28 Oct 2008 16:15:12 +, Steve Swinsburg [EMAIL PROTECTED] said: Well the last post was unclear about which patch he was referring to (Javadoc or codebase). From the previous discussions, it's clear that a patch for a new constructor won't be considered. I will, however, get some information to extend the Javadocs and submit that. Javadco improvement Jira here: https://issues.apache.org/jira/browse/WICKET-1899 Interestingly enough, a ticket was created last year to get the ball rolling with accessibility: https://issues.apache.org/jira/browse/WICKET-982 Steve On 28 Oct 2008, at 16:06, James Carman wrote: I don't think Martijn is intentionally being vague. DDC is a common abbreviation for DropDownChoice among folks within the Wicket community. As for the request for a patch, that's the best way to get your code suggestions merged into the codebase, providing a patch. Please make sure you include test cases with your patch that exercise the new code. On Tue, Oct 28, 2008 at 12:02 PM, Steve Swinsburg [EMAIL PROTECTED] wrote: For the Javadoc? (please stop being so vague!) No worries, I'll do this up and submit it into a general accessibility Javadoc improvement Jira ticket. Steve On 28 Oct 2008, at 15:57, Martijn Dashorst wrote: On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg [EMAIL PROTECTED] wrote: So my vision for wanting to enforce a bit of accessibility on the web is narrow(?), but no one wants to move forward with the most simple of modifications to make it easier to implement accessibility. The most basic of things to do would be to update the JavaDocs for the API to say: NOTE: you should always include an AttributeModifier/Appender (or roll your own implementation) to include the title attribute on every link. here's some examples, etc Where's your patch then? Martijn - 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: AjaxRequestTarget is null in Internet Explorer 6
Override onClick for your link. Your code defines an onClick in the panel, it doesn't override your Link's onclick. On Mon, 22 Sep 2008 03:16:47 -0700 (PDT), mahone9 [EMAIL PROTECTED] said: I still have that problem and why is sb. responding to another thread... mahone9 wrote: Hi all I´m struggeling with the AjaxFallbackLink the target object is null, if it runs to the onClick() method. In Firefox and Opera it works fine!!! class MyPanel extends Panel { private AjaxFallbackLink link; public MyPanel() { this.link = AjaxFallbackLink(link); add(link); } public void onClick(AjaxRequestTarget target) { if (target == null) { System.out.println(my target is: + target); //target is null } else { System.out.println(my target is: + target); target.appendJavascript(alert('is working');); } } ... } class MyPage extends WebPage { private MyPanel myPanel; public MyPage() { this.myPanel = new MyPanel(myPanel); add(myPanel); } } If I add the AjaxFallbackLink to a WebPage instead to a Panel it works pretty fine. What I do is: - call the page and click the link - refresh the page through F5 - once again click the link __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com I still have that problem and why is sb. responding to another thread... -- View this message in context: http://www.nabble.com/AjaxRequestTarget-is-null-in-Internet-Explorer-6-tp19597723p19605102.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IgnoreAjaxRequestException/EmptyAjaxRequestTarget: a way around it?
I have a page that in a piece of javascript code does some updates to the page dom, and then does a wicketajaxpost request. This all works fine, unless the dom updates trigger loading of page-bound resources (e.g. images). As it turns out wicket detects during the ajax requests that other requests are made for the page (the images with their resourceimage). In that case it just plainly substitutes the ajax request with an EmptyAjaxRequestTarget, ignoring the original request without warning. Is there a way around this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynamicImageResource and urls
I am trying to attach a number of on the fly created images to a page. The images are created by a subclass of DynamicImageResource. They need to be referenced from html code that is not part of a page template (i.e. I do not use an img tag in the page template with an webcomponent that references it, because the html comes from html-code that is edited by users via a rich text editor). I do not see how I can create reusable urls for the images. Can somebody explain this? Which method to follow to attach to images to my webpage, and get urls for them that make wicket serve the images. The alternative route is that I serve the image via a custom implementation of WebPage, but it seems that it is possible to make a reference to an ImageResource directly, I am just missing the final steps. By the way, the images should be session specific, they are not shared resources. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Automated testing of Wicket applications
Also, have you successfully tested Ajax applications using Selenium-RC and Junit? I have, and Selenium works really well for testing wicket ajax applications. Only thing I had to do was to add a script to the pages that helps selenium figure out when ajax requests are finished. See this thread: http://www.nabble.com/Ajax-testing-with-Selenium-td19204133.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Associating label tags with input elements in RepeatableViews etc.
Hi, Is there an easy way to set the for attribute of a label tag to the (generated) markup id of an form input element? I cannot set the for attr. directly in the html template, because the id's are generated dynamically by wicket (because part of RepeatableViews). Right now I am doing it programmatically by overriding onComponentTag on the label and setting it to the markupId of the form component there. But this seems like something that may have a better solution in wicket itself, is there? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Making a Behavior that adds a script after a component?
I have a couple of behaviors that add javascript to the header of a document, to change attributes or add event scripts to components (using jquery onready, but that's not the point). This all works fine. There is just one problem: when I use such components in an ajax request/response, it won't have the javascript added attributes anymore, because the component gets replaced by the wicket ajax call. I'm looking for a way to make the behaviors add the necessary javascript to add the attributes again, when an ajax response is created. E.g. a way to let behaviors add a script to every ajax response, or let them add script tags after the rendering of the component. Is there a way to do this in Wicket? I know I could make a custom panel/component that just has an extra script tag, but that's far to intrusive, and makes it really difficult to make different combinations of these behaviors. Example behavior class: public class DatePickerBehavior extends AbstractBehavior { private String createOnReadyScript(String markupId) { return $(document).ready(function(){\n + createPickerScript(markupId) + \n});; } private String createPickerScript(String markupId) { return $('# + markupId + ').datepicker();; } public void bind(Component component) { super.bind(component); component.add(new HeaderContributor(new IHeaderContributor() { public void renderHead(IHeaderResponse response) { response.renderJavascript(createOnReadyScript(component.getMarkupId()), null); } })); //Is there a way to instead of contributing to the header, add the script to the document body after the rendering of // the component itself. //Or a way to add a script to every ajax request? } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making a Behavior that adds a script after a component?
Perfect. Thanks! On Fri, 5 Sep 2008 15:53:12 +0200, Matej Knopp [EMAIL PROTECTED] said: if you use renderOnDomReadyJavascript method of IHeaderResponse it will be invoked after ajax request. -Matej On Fri, Sep 5, 2008 at 3:41 PM, Pointbreak [EMAIL PROTECTED] wrote: I have a couple of behaviors that add javascript to the header of a document, to change attributes or add event scripts to components (using jquery onready, but that's not the point). This all works fine. There is just one problem: when I use such components in an ajax request/response, it won't have the javascript added attributes anymore, because the component gets replaced by the wicket ajax call. I'm looking for a way to make the behaviors add the necessary javascript to add the attributes again, when an ajax response is created. E.g. a way to let behaviors add a script to every ajax response, or let them add script tags after the rendering of the component. Is there a way to do this in Wicket? I know I could make a custom panel/component that just has an extra script tag, but that's far to intrusive, and makes it really difficult to make different combinations of these behaviors. Example behavior class: public class DatePickerBehavior extends AbstractBehavior { private String createOnReadyScript(String markupId) { return $(document).ready(function(){\n + createPickerScript(markupId) + \n});; } private String createPickerScript(String markupId) { return $('# + markupId + ').datepicker();; } public void bind(Component component) { super.bind(component); component.add(new HeaderContributor(new IHeaderContributor() { public void renderHead(IHeaderResponse response) { response.renderJavascript(createOnReadyScript(component.getMarkupId()), null); } })); //Is there a way to instead of contributing to the header, add the script to the document body after the rendering of // the component itself. //Or a way to add a script to every ajax request? } } - 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: controlling td colspan=? number with wicket?
google and find http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html On Wed, 27 Aug 2008 20:52:56 +0100, Sami [EMAIL PROTECTED] said: Hello, I have been trying to control the colspan in a table but no luck :( any one has an example of how to do it? code: - tr td colspan=2a href=# wicket:id=categoryHrefspan wicket:id=categoryName[Category]/span/a/td wicket:enclosure child=Info td align=center nowrapspan wicket:id=Info[Info]/span/td td align=centerspan wicket:id=Type[Type]/span/td td align=centerspan wicket:id=Date[Date]/span/td /wicket:enclosure /tr - I want to control the number in the colspan markup? I tried td colspan=# wicket:id=colNum but didnt work. Many thanks Sami - 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: Ajax validation error messages
Why not just put a filter on your 'global' feedbackpanel and filter out the messages that you already display for each component? E.g. I have the following code in a form: private void addGlobalSubmitPanel() { final ListFormComponent components = getFormComponents(); final FeedbackPanel feedback = new FeedbackPanel(FEEDBACK); feedback.setFilter(new IFeedbackMessageFilter() { public boolean accept(FeedbackMessage message) { return !components.contains(message.getReporter()); } }); add(feedback); } private ListFormComponent getFormComponents() { final ListFormComponent components = new ArrayListFormComponent(); visitFormComponents(new FormComponent.IVisitor() { public Object formComponent(IFormVisitorParticipant formComponent) { final FormComponent fc = (FormComponent)formComponent; components.add(fc); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); return components; } Hi. Can anyone recommend a good strategy for handling and dislplaying validation error messages when using Ajax? I want my basic field validation error to show next to the relevant input text boxes, and have used my own FormComponentFeedbackBorder to do this. I still want a feedback panel for more fatal backend errors - eg, record already exists, concurrent record modification, etc. Problem. If I put a feedback panel on the page, and repaint this in my button's onError with target.addComponent(feedback) - then I get duplicates of my field validation errors in my panel. Not what I want. If I only repaint the feedback onSubmit then I can catch the backend error and display my message. But subsequent Ajax form submissions don't refresh the page, so the error message in the feedback panel sticks on the page. Not sure how to clear out existing errors in the feedback panel when using Ajax, so have now used a label on my page instead, and manually clean up after myself. But is this the best way to go? -- View this message in context: http://www.nabble.com/Ajax-validation-error-messages-tp19190006p19190919.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Links Issue with TinyMce
Yes I introduced those dependencies. So people are really still using stone age java versions. I will have a look at it later this week. For now, you could of course just check out the latest snapshot from svn, and build against java 1.4. The only thing you need to change is the SetComponent textArea member of TinyMCESettings. The other stuff (including the dependencies you list below) should compile fine against 1.4, except for the testcases. (If UUID really is available in Java5 only: just remove the UUID member, you won't need it for your project). On Mon, 25 Aug 2008 15:28:17 -0700 (PDT), rajdhan [EMAIL PROTECTED] said: I got the latest TinyMce-SNAPSHOT.jar, but couldn't compile my project as the distributed jar was compiled with JDK 1.5 and we are having to use 1.4 (other project dependencies). So, Checked-out the latest from SVN to try compiling with 1.4 and sure enough, there were 1.5 dependencies, and the compile failed as well. The dependencies I found: UUID in TinyMceSettings.java StringBuilder TinyMceBehavior.java Any recommendations as to how I can work around this? pointbreak+wicketstuff wrote: FWIW, I cannot reproduce your problem in the latest tinymce snapshot. The latest snapshot has tinymce updated to version 3.1.0.1, so that might solve your problem. Otherwise you may have more luck posting your problem in the tinymce forums, as the plugin really doesn't do anything special to plugins and setup of tinymce. And I guess posting your problem once is more than enough ;-). On Mon, 25 Aug 2008 10:24:41 -0700 (PDT), rajdhan [EMAIL PROTECTED] said: Hi All, We are using TinyMce to post Rich Text onto a website with the possibility of providing hyper links. We are having issues posting links into the Text Area, example issue below: When I paste something like http://localhost:8080/doc?id=093102ce8004ffeell=f into the Text area, I see the following as the link URL if I highlight the text and click on the link button. doc?id=093102ce8004ffeell=f The posted text appears on the page http://localhost:8080/mypage when we submit from the TinyMce panel. If I hover on the link on the posted text, I see the hyper link as http://localhost:8080/mypage/doc?id=093102ce8004ffeell=f which is not right. To correct this, we are having the users edit the hyperlink manually by changing it to either /doc?id=093102ce8004ffeell=f Or http://localhost:8080/doc?id=093102ce8004ffeell=f Has anybody come across this issue? Is it possible to eliminate the manual step of adjusting the Link URL value? Thanks, Raj -- View this message in context: http://www.nabble.com/Links-Issue-with-TinyMce-tp19148029p19148029.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Links-Issue-with-TinyMce-tp19148029p19152856.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Links Issue with TinyMce
FWIW, I cannot reproduce your problem in the latest tinymce snapshot. The latest snapshot has tinymce updated to version 3.1.0.1, so that might solve your problem. Otherwise you may have more luck posting your problem in the tinymce forums, as the plugin really doesn't do anything special to plugins and setup of tinymce. And I guess posting your problem once is more than enough ;-). On Mon, 25 Aug 2008 10:24:41 -0700 (PDT), rajdhan [EMAIL PROTECTED] said: Hi All, We are using TinyMce to post Rich Text onto a website with the possibility of providing hyper links. We are having issues posting links into the Text Area, example issue below: When I paste something like http://localhost:8080/doc?id=093102ce8004ffeell=f into the Text area, I see the following as the link URL if I highlight the text and click on the link button. doc?id=093102ce8004ffeell=f The posted text appears on the page http://localhost:8080/mypage when we submit from the TinyMce panel. If I hover on the link on the posted text, I see the hyper link as http://localhost:8080/mypage/doc?id=093102ce8004ffeell=f which is not right. To correct this, we are having the users edit the hyperlink manually by changing it to either /doc?id=093102ce8004ffeell=f Or http://localhost:8080/doc?id=093102ce8004ffeell=f Has anybody come across this issue? Is it possible to eliminate the manual step of adjusting the Link URL value? Thanks, Raj -- View this message in context: http://www.nabble.com/Links-Issue-with-TinyMce-tp19148029p19148029.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting copy of html source
Hi, Is there an easy way to retrieve a copy of the html that is send to the browser as part of a response. I would like to be able to e.g. send the source of requested pages to an xhtml validating parser when the website is run in development mode. Any suggestions? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]