Re: Populating a model with form data from external site

2009-08-17 Thread bgooren
Sophia, There are a number of solutions to this. I will name two: 1) Use a stateless form, take a look at the HTML (and form action) it generates, and post to that form from an external site. I have not tested this myself, but I expect it will work like a charm. Since the form is stateless, it

Re: Enforcing CSS Styles to be Loaded From Server ?

2009-08-17 Thread bgooren
Farhan, Please take a look at IResourceSettings (accessible from the application object). More specifically at http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/settings/IResourceSettings.html#setAddLastModifiedTimeToResourceReferenceUrl(boolean)

Re: Controlling the order of resource files

2009-08-17 Thread bgooren
Arie, This is possible out-of-the-box using Session.setStyle(); Setting a style will make wicket consider resource files and property files with the style you've specified. The following is from the Component javadoc: Style - The style (skin) for a component is available through getStyle(),

Re: [tinymce] problem adding/removing TinyMceBehavior dinamically

2009-09-30 Thread bgooren
It's not possible to add TinyMCE dynamically due to the way TinyMCE works. What you can do however, is pre-load TinyMCE, and dynamically enable/disable it on a component. Daniele Dellafiore wrote: Hi. I have a problem with this example code: tinyMceBehavior = new TinyMceBehavior();

Re: [tinymce] problem adding/removing TinyMceBehavior dinamically

2009-09-30 Thread bgooren
to be on path, then you can pretty much do whatever you want. Could be what your definition of preloading are :) I have a panel that are added by ajax so I had to make sure the resources used by that panel always where on the containing page. regards 2009/9/30 bgooren b...@iswd.nl It's

Re: [tinymce] problem adding/removing TinyMceBehavior dinamically

2009-10-05 Thread bgooren
I'll show you some parts of my code so you get an idea of how I do things. First of all, I have used AjaxEditableLabel from wicket-extensions as a starting point. TinyMCE's javascripts should always be loaded: // Preload TinyMCE add( new AbstractBehavior() {

Re: [tinymce] problem adding/removing TinyMceBehavior dinamically

2009-10-12 Thread bgooren
javascript is executed. What is the javascript to call a refresh on a component like is done when I use target.addComponent()? From the start. I make that work with bgooren suggestion, using the javascript to remove the editor. No need to remove the behavior on java side. That works

Re: setResponsePage chaining

2009-10-28 Thread bgooren
Well, new P2() is executed _before_ it's result (a P2 instance) is passed to setResponsePage(), so this behavior is perfectly normal: setResponsePage( new P3() ) is executed before the resulting P2 instance is passed to setResponsePage(). Timeline: 1. new P2() is executed 2. P2 constructor is

Re: AjaxLink and component visibility

2009-11-15 Thread bgooren
Hi, The answer to your question is simple: component replacement over ajax needs to be able to find the old component so it can be replaced with new content. Since you set panel B to be invisible, it simply is not in the page, and therefore cannot be replaced. Simple solution: if you want to

Re: AjaxFallBackLink driving me nuts!

2009-11-17 Thread bgooren
For starters, I'd try to eliminate possible causes. E.g. make sure the model change is seen from QuestionEditPanel. A way to do this is either run your app in a debugger and set some checkpoints around onRender and/or onBeforeRender, or simply override onBeforeRender() and log the model contents.

Re: WicketSessionFilter and several domains

2009-11-25 Thread bgooren
If you are using session cookies, the answer is simple: your browser only sends the cookie for the domain from which it was set. Simply put: if a cookie gets set from the .com, it is not available on the .com.ar Bas Fernando Wermus-2 wrote: Hi all, I have several domain for a site:

Re: onclick auto-added to script tags?

2009-11-25 Thread bgooren
I'm using wicket:link/ blocks around javascript references as well and have never observed the behavior you describe. Do you auto-add a behavior to components which adds the onclick value? It's being added from somewhere, and is not default Wicket behavior. So it's either a browser plugin or an

RE: onclick auto-added to script tags?

2009-11-26 Thread bgooren
Well, I don't use Spring integration in my projects, so I cannot tell you for sure if that could be the reason for this. I do however find it unlikely that Spring integration would alter html tags. What you could try is step through the rendering process with a debugger and see what's happening

Re: WicketSessionFilter and several domains

2009-11-26 Thread bgooren
Did you check if a session is actually created, e.g. do you see a cookie? I cannot imagine that if you use the exact same flow, and the only difference is the domain name, it would work in the one case but not the other. What happens exactly? Getting the session returns null? I suggest you try

Re: WicketSessionFilter and several domains

2009-11-27 Thread bgooren
There are serveral options; The easiest is probably to append the sessionId to the URL you are accessing from the flash file; If that is not an option, host both the flash and the website on the same domain. Cross-domain issues are a hassle ;-) What's your reason for working with two domain

Re: WicketSessionFilter and several domains

2009-11-28 Thread bgooren
the .com.ar and only the flash part from the .com? Bas Fernando Wermus-2 wrote: Bas, The site is regional. It is for LATAM. I will try to append the session id to the flash post. thanks On Fri, Nov 27, 2009 at 1:17 PM, bgooren b...@iswd.nl wrote: There are serveral options

Re: Wizard and confirmation screens

2009-11-30 Thread bgooren
Sounds like you are using static models instead of dynamic models. E.g. if you use Model.of(test), the model is essentialy self-contained. Whereas if you have a property called value in your wizard and you use new PropertyModel( Wizard.this, value ) , the model will depend on the value of the

Re: Modal Window Problems On Internet Explorer.

2009-11-30 Thread bgooren
I don't have this problem with the Modal Window, so my guess is that you have some custom javascript which tries to set the focus to an element which is either invisible or inactive. Bas carlo c wrote: Hi, I keep on experiencing this when I try to open a modal window in IE6, 7 and 8.

Re: How to return specific HTTP result code on HTTP request

2009-12-05 Thread bgooren
See http://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html In particular (in your webpage): @Override protected void configureResponse() { super.configureResponse();

Re: Remote Image Generation Null Pointer

2009-12-05 Thread bgooren
If you want to generate the URL yourself and want to keep using the code you have already written, use a WebComponent instead of an Image: WebComponent dynamicImage = new WebComponent(image); dynamicImage.add(new AttributeModifier(src, true, new AbstractReadOnlyModel() {} ) ); Otherwise, as

Re: Adding components to page (dynamically)

2009-12-22 Thread bgooren
with setOutputMarkupId to true since you cannot refresh a RepeatingView itself through AJAX. You can (re-) populate the RepeatingView manually in the onClick( AjaxRequestHandler ) method and add it so it get's re-rendered. marioosh.net wrote: bgooren wrote: Well, you need to have some html

Re: Anybody know what is this situation?

2009-07-03 Thread bgooren
I got the same error today, seems totally random. The only possible explanation I have is that maybe the subclass (LoginPage$1 in your case) stores a PageHolder class instead of the actual page (LoginPage) when serialized, and when LoginPage$1 is deserialized, the PageHolder retrieves/points to

Re: how to get some data from servlet

2009-07-28 Thread bgooren
Thanks Fernando, I was looking for some code like this! Fernando Wermus-2 wrote: Hi, Instead using a servlet you could try the following (you can find the whole code at wicketstuff pickwick ) This way you will have the session because your are into the requestCycle On your

Re: Model to use for static Label text

2010-02-22 Thread bgooren
Well, a couple of strings more or less usually don't make that much of a difference. I personally prefer to save some typing and have better readability then to save a few bytes here and there. Furthermore, if you were to create an implementation of IModel specifically for this case, you would

Re: W.: serializable problem

2010-02-26 Thread bgooren
It looks like you are serializing the MySQL connection. You should not keep it around in the session, but rather create a connection when you need it, or use a connection pool. exceptionist wrote: hello, i´ve got a problem with serialization. my application is connected to a mysql-db and

Re: How to encrypt/obfuscate resource reference?

2010-03-01 Thread bgooren
The easiest way around this is to specify http://wicket.apache.org/docs/1.4/org/apache/wicket/SharedResources.html#putClassAlias(java.lang.Class, java.lang.String) class aliases . The upside is that you control the generated URL, the downside is that you have to make sure the alias is unique.

Re: How to encrypt/obfuscate resource reference?

2010-03-02 Thread bgooren
code to avoid headaches when upgrading. bgooren wrote: The easiest way around this is to specify http://wicket.apache.org/docs/1.4/org/apache/wicket/SharedResources.html#putClassAlias(java.lang.Class, java.lang.String) class aliases . The upside is that you control the generated URL

Re: How to encrypt/obfuscate resource reference?

2010-03-02 Thread bgooren
to shared resource -- the only thing it'll require is to modify Application class so that e.g. getSharedResources() is not final. But I'm still hoping for some 'easy' solution that doesn't entail modifying Wicket source code to avoid headaches when upgrading. bgooren wrote: The easiest way

Re: Ajax File Upload (Safari and Chrome)?

2010-03-02 Thread bgooren
Possibly this is related to http://issues.apache.org/jira/browse/WICKET-2657 WICKET-2657 ? That bug only mentions Chrome though, so it is unclear if it also occurs on Safari. Did you check if AjaxButton.onSubmit() gets called to isolate the problem area (server vs client)? Corbin, James-2

Re: Ajax File Upload (Safari and Chrome)?

2010-03-02 Thread bgooren
/browse for projects. Regards, Pierre On Tue, Mar 2, 2010 at 1:27 PM, bgooren b...@iswd.nl wrote: Possibly this is related to http://issues.apache.org/jira/browse/WICKET-2657 WICKET-2657http://issues.apache.org/jira/browse/WICKET-2657%0AWICKET-2657? That bug only mentions Chrome

Re: How to encrypt/obfuscate resource reference?

2010-03-02 Thread bgooren
Good to know I contributed something useful to this thread haha. The code looks like the stuff I had in mind. You gotta love Wicket for making it quite easy to do this stuff; Although the URL encoding/decoding can be quite complex for beginners, but that is likely to be fixed in the future

Re: URL coding strategies

2010-03-18 Thread bgooren
You cannot have a seo-friendly url _and_ pass objects. If you want to pass an object to another page (say a Product), then you need to create a constructor on the target page which accepts a Product or an IModelProduct. You can then call setResponsePage( new TargetPage( product ) ); The upside is