Re: Adding a header contribution as the first in the head tag

2012-03-02 Thread Bas Gooren
Josh, You can use an application-wide IResponseFilter for this. Have a look at how ServerHostNameAndTimeFilter (in wicket-examples (*)) does it. *) E.g. look at http://grepcode.com/file/repo1.maven.org/maven2/org.apache.wicket/wicket-examples/1.5.3/org/apache/wicket/examples/ServerHostNameAnd

Re: 1.5.4 error handling with web.xml issue

2012-02-17 Thread Bas Gooren
It's documented here: https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html Op 17-2-2012 2:39, schreef pkc: I have no idea if this is documented and why it is needed but it works after changing web.xml to wicket /* REQUEST ERROR -- View this message in context:

Re: Architectural question

2012-02-12 Thread Bas Gooren
y independently of the UI. -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Monday, 13 February 2012 4:40 AM To: users@wicket.apache.org Subject: Re: Architectural question Well setters/getters somewhat go against ddd. We just have to figure out what

Re: Architectural question

2012-02-12 Thread Bas Gooren
on in view. You can still retrieve stuff outside a transaction. I explicitly call update to persist. On Feb 12, 2012 7:54 AM, "Bas Gooren" wrote: Hi All, I have an architectural question about wicket, DDD and the service layer. Let's say we have a simple JPA entity (Customer),

Re: Architectural question

2012-02-12 Thread Bas Gooren
persist them on service layer overriding service layer state (standard locking techniques here). ** Martin 2012/2/12 Bas Gooren: Ok, so you mean detaching entities when returning them to the view layer (wicket)? How do you propose updating the underlying entities? Send the detached entities back

Re: Architectural question

2012-02-12 Thread Bas Gooren
: Why don't you just detach the entity/data objects with deep or shallow clone or similar? Minimal duplication... ** Martin 2012/2/12 Bas Gooren: Hi All, I have an architectural question about wicket, DDD and the service layer. Let's say we have a simple JPA entity (Customer), and a

Architectural question

2012-02-12 Thread Bas Gooren
Hi All, I have an architectural question about wicket, DDD and the service layer. Let's say we have a simple JPA entity (Customer), and a few simple CRUDL screens. For database access, we have a DAO layer (CustomerDao) which delegates to an EntityManager, and provides some convenience methods

Re: Wicket 'hook' point for page render timing

2012-02-11 Thread Bas Gooren
FYI: I'd skip the part where you build something manually, and simply use new relic's RPM tool for a month to dig into your app's performance. They give you a breakdown of slow requests so you can see how much time is spent in database calls, and even which sql queries are run. Op 11-2-2012 6:2

Re: Contributing comments to the head section

2012-02-10 Thread Bas Gooren
You can always opt for a either - a label (with setRenderBodyOnly(true)) which renders it - a header contributor Both of these could use either a hardcoded bit of html in which you replace ${urlForCss} with the result of a call to urlFor(...). You can also store this html as a text template, i

Re: Communication (in-vm) between webapps

2012-02-05 Thread Bas Gooren
Thanks Jeremy! Since I needed something up & running quickly I have implemented the "flush cache" operation through a page with pre-shared key auth for now. Op 4-2-2012 15:04, schreef Jeremy Thomerson: I agree a messaging queue is a nice scalable system. But I also think pragmatic approaches

Re: Communication (in-vm) between webapps

2012-02-04 Thread Bas Gooren
you deploy your web app to a cluster François Meillet Le 4 févr. 2012 à 12:17, Bas Gooren a écrit : Yeah, I was thinking the same thing. The only thing I need to take care of then is access control, normal users should not be able to invoke a cache clear by calling the url. But since

Re: Communication (in-vm) between webapps

2012-02-04 Thread Bas Gooren
Yeah, I was thinking the same thing. The only thing I need to take care of then is access control, normal users should not be able to invoke a cache clear by calling the url. But since the call made from the admin to the frontend will not go over a public network I can simply use a pre-shared

Communication (in-vm) between webapps

2012-02-03 Thread Bas Gooren
Hi All, Maybe a fellow wicketeer can help me with this: We deploy one of our apps in two components: a frontend and an admin. We recently implemented a StringResourceLoader which fetches translations from a database. So far so good. Now we face the following problem: the frontend uses this

Re: wicket appl architecture

2012-01-19 Thread Bas Gooren
When he wrote "wtf" he probably mean "ftw" (for the win), to indicate it's a solid combination ;-) Op 19-1-2012 2:19, schreef nazeem: Russell Pitre wrote Separate front-end sounds fine. Use a REST architecture with JSON as the data exchange format. I'm pretty Spring MVC supports this through t

Re: Avoid creating an HttpSession before login

2011-12-09 Thread Bas Gooren
rade off of not requiring the HttpSession (apart from the obvious effort needed to save the original URL client side, and then retrieve it through a request parameter)? Any insight into this would be great!! Thanks 2011/12/9 Bas Gooren: Hi, It's certainly possible, with some additional

Re: Avoid creating an HttpSession before login

2011-12-09 Thread Bas Gooren
Hi, It's certainly possible, with some additional work by you. The easiest way: - redirect the user to your login page, add a variable to the PageParameters which helps you redirect them back - after logging in, check for said variable in PageParameters and redirect the user back Now the eas

Re: new blog on leveraging cdi conversations to simplify wicket code

2011-12-01 Thread Bas Gooren
Just a quick email to say: thanks! I appreciate your blog posts a lot, it's very helpful to see usage examples like yours. Sebastian Op 1-12-2011 17:25, schreef Igor Vaynberg: here is a follow up demonstrating a more complex example: https://www.42lines.net/2011/12/01/simplifying-non-trivia

Re: Mounting page to mutliple urls with different pageparameter

2011-11-06 Thread Bas Gooren
Another way is to override some methods in MountedMapper (thus creating your AnotherPageMapper or something like that). Methods of interest: - getCompatibilityScore(): should only return 1 if the url starts with "b" or "c" See the default MountedMapper implementation, you could simply say: i

Re: MIgration to 1.5.2 seems a disaster

2011-11-05 Thread Bas Gooren
See https://issues.apache.org/jira/browse/WICKET-4163 for your first issue. You can ignore it (it's harmless) or use the workaround until 1.5.3 is released. Your second issue rings a bell (maybe other people reported this recently). It could also be related to https://issues.apache.org/jira/br

Re: Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread Bas Gooren
Well, the simplest solution would be: - set Index.class as your homepage (through the corresponding method in your application class) - use mount(new MountedMapper("/${param}", AnotherPage.class)); that should at least get "/b" and "/c" working. Unfortunately (?) that will also allow /xyz and

Re: Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread Bas Gooren
pper which maps AnotherPage.class and handles encoding/decoding of url properly before handing the request off to the rest of the mappers. TS: Can you link to e.g. pastebin and put the RootMapper you built online there? Op 4-11-2011 14:37, schreef Martin Grigorov: On Fri, Nov 4, 2011 at 3:17 PM, Bas Goor

Re: Mounting page to mutliple urls with different pageparameter

2011-11-04 Thread Bas Gooren
The latter problem is logical: your mapping is focused on incoming requests. When wicket renders a link to AnotherPage.class, which url should be generated? My guess is that a request for /b comes in, wicket then checks if the url is valid for AnotherPage.class by generating a url for it, whic

Re: Handling form ajax submit on enter key in form field

2011-11-02 Thread Bas Gooren
Cool, thanks! How about browser support for this? We've tested with current Firefox and Chrome releases and it works like a charm. But how about IE < 9 ? Op 2-11-2011 12:33, schreef Martin Grigorov: On Wed, Nov 2, 2011 at 1:29 PM, Bas Gooren wrote: Hi, Yes we currently do form.

Re: Handling form ajax submit on enter key in form field

2011-11-02 Thread Bas Gooren
Hi, Yes we currently do form.add( new AjaxFormSubmitBehavior(form, "onsubmit")); I've been testing what you describe (enter keys calls submit button), and this works. 99% of the time we only have one submit button, so that's good enough for us. Thanks! Op 1-11-2011 23:54, schreef Andrea De

Handling form ajax submit on enter key in form field

2011-11-01 Thread Bas Gooren
Hi all, To handle the case where somebody hits enter in a form field which has an (Ajax)Button to submit the entire form by ajax, we used an AjaxFormSubmitBehavior attached to the form's onsubmit in wicket 1.4.x After upgrading to 1.5 our ajax indicator was not hidden after the ajax request,

Re: private "Logger log" property in WebPage and Component

2011-10-14 Thread Bas Gooren
Out of curiosity: why would you want the component logger? If you create one locally (private static final Logger log = LoggerFactory.getLogger(YourClass.class);), you have the benefit of controlling log output since the logger is bound to the actual component and not the superclass. E.g. at r

Re: Recommended way for wicket:for and markupIDs

2011-10-13 Thread Bas Gooren
Wicket will automatically use your id if you specify one in the markup. So if you have id="xyz" in the markup, wicket will not overwrite it. In other words: specify whatever ID you need so you can access the correct tag from javascript. Op 13-10-2011 21:34, schreef Matthias Keller: On 2011-10

Re: W 1.5: templates added to head on ajax reload ...

2011-10-10 Thread Bas Gooren
Override Component#renderHeader(IHeaderResponse response) and call response.renderOnDomReadyJavascript() The above assumes wicket 1.5, although this is also possible in 1.4. OnDomReady javascript code is handled properly for both regular and ajax requests. Op 10-10-2011 17:27, schreef armand

Re: Authentication and sessions - the right way?

2011-10-03 Thread Bas Gooren
In our apps we use a request-scoped guice provider. This makes the scoping explicit, and as an added benefit you get looser coupling: @Inject Provider userProvider; When no user is logged in, we return a Null object (which also works since we use domain driven design extensively). E.g. User

Re: RuntimeException when a stateless page throws a 404 which is also handled by wicket

2011-09-30 Thread Bas Gooren
there a cleaner way to handle this that anyone is aware of? Op 29-9-2011 14:28, schreef Bas Gooren: We have the following situation: The wicket filter is configured to handle 404 responses (by a page mounted at /404), this is set in web.xml; We have a stateless (product) page at /shop/product

RuntimeException when a stateless page throws a 404 which is also handled by wicket

2011-09-29 Thread Bas Gooren
We have the following situation: The wicket filter is configured to handle 404 responses (by a page mounted at /404), this is set in web.xml; We have a stateless (product) page at /shop/product, which contains a Stateless form which offers the customer the possibility to order. Some crawler

Re: AttributeModifier and AjaxLink in 1.5

2011-09-21 Thread Bas Gooren
Since you want to decorate the javascript generated by the AjaxLink, why not override AjaxLink#getAjaxCallDecorator() and override the generated javascript in #decorateScript()? This is how we do it, albeit internally since we've created an AjaxConfirmLink subclass: @Override protected I

Re: Wicket 1.5: request mapper to make all urls absolute

2011-09-19 Thread Bas Gooren
icket.html . On Mon, Sep 19, 2011 at 1:57 AM, Bas Gooren wrote: After quite a lot of searching and testing, I've finally been able to get things working. In the end, I was able to solve my problem in the most logical place, which once again shows how great Wicket is! I've created an

Re: Wicket 1.5: request mapper to make all urls absolute

2011-09-18 Thread Bas Gooren
What is a good place to share this code so other wicket users can save themselves the time? Op 16-9-2011 1:20, schreef Bas Gooren: Ok, I've been playing around with this, and it doesn't work. WebPageRenderer#respond() compares the current url to the target url. The current url

1.5 bug: nested component ids cannot start with dash when dealing with links

2011-09-16 Thread Bas Gooren
See https://issues.apache.org/jira/browse/WICKET-4061 for further details. Just thought I'd send it to the group. I guess more people are upgrading to 1.5 right now, and this can cause applications to break in an unexpected fashion. When dealing with ids that start with one or more dashes (e.g.

Re: Wicket 1.5: request mapper to make all urls absolute

2011-09-15 Thread Bas Gooren
ly, all that is required there is to prefix the context path and filter path. Op 15-9-2011 1:58, schreef Igor Vaynberg: that sounds correct. essentially this is the same as running the url through requestcycle.geturlrenderer().renderFullUrl(url) but with a different prefix -igor On Wed, Sep 14, 2011

Re: Panel Loop

2011-09-15 Thread Bas Gooren
Have a look at repeaters (e.g. RepeatingView and ListView). Op 15-9-2011 17:10, schreef Fred: Hello, I have a panel to which I want to add multiple items. I have put it into a loop and as long as I have only one panel I am good, with more than one it errorsI get why it errors, it has a panel wi

Re: LocaleFirstMapper in wicket 1.5

2011-09-15 Thread Bas Gooren
relative is executed after #mapHandler(IRequestHandler) On Thu, Sep 15, 2011 at 2:49 PM, Bas Gooren wrote: Another question regarding LocaleFirstMapper: in mapHandler() it always adds the locale as the first segment. In wicket 1.4 a url could start with "../"-stri

Re: LocaleFirstMapper in wicket 1.5

2011-09-15 Thread Bas Gooren
irstMapper always puts the locale at the front, is this no longer the case in 1.5? Sebastian Op 14-9-2011 21:32, schreef Igor Vaynberg: yes, good catch Bas. please open a jira ticket. -igor On Wed, Sep 14, 2011 at 12:12 PM, Bas Gooren wrote: Hi all, I'm in the process of migrating ou

Wicket 1.5: request mapper to make all urls absolute

2011-09-14 Thread Bas Gooren
Hi, Another wicket 1.5 migration question: In 1.4 we created a IRequestCodingStrategy decorator which, in encode(), translates all urls to be absolute. We did this by checking if the url started with "/", and if not, removing all occurrences of "../" and "./". To handle being behind a reverse

Re: LocaleFirstMapper in wicket 1.5

2011-09-14 Thread Bas Gooren
Ok, done: https://issues.apache.org/jira/browse/WICKET-4055 Sebastian Op 14-9-2011 21:32, schreef Igor Vaynberg: yes, good catch Bas. please open a jira ticket. -igor On Wed, Sep 14, 2011 at 12:12 PM, Bas Gooren wrote: Hi all, I'm in the process of migrating our internal code libra

LocaleFirstMapper in wicket 1.5

2011-09-14 Thread Bas Gooren
Hi all, I'm in the process of migrating our internal code library to 1.5. So far the main feeling is: wow, most things became a lot easier and cleaner. In other words: thanks wicket team! Now on to my question: If I look at the LocaleFirstMapper [1] in wicket-examples, I see that in #getCompa

Re: onClick on Image

2011-08-15 Thread Bas Gooren
If the image is inside the link, your code should read: add(link); link.add(new Image(...)); Bas Op 15-8-2011 12:28, schreef Charles Moulliard: Hi, I would like to change the Locale setting when we click on a Image (flag corresponding to the Locale - France, UK, ...). So in my HTML page, I h

Re: tomcat eats memory

2011-08-05 Thread Bas Gooren
Actually, I think mounting a custom resource _is_ the way to go. To keep things simple, let me suggest two options: (1) Create a custom resource which serves the correct image based on a url parameter (see WebResource) This will allow you to generate user-friendly urls to your images (2) Crea

Re: What does this syntax say?

2011-07-28 Thread Bas Gooren
This syntax is for use when you need a generic placeholder. In this case, it means that is determined by the call site: IModel model = OtherModel.wrapOnInheritance( Component ); The above means that W is checked to be "BusinessObject" for all occurrences of W. A better to understand example

Re: [OT] Configure wicket.configuration outside web.xml in Tomcat 6

2011-07-04 Thread Bas Gooren
Hi, As suggested on the mailing list once, what I've been using for a while now is having "deployment" in web.xml, and adding -Dwicket.configuration=development to my tomcat command line from Eclipse. This way you always package a production-ready jar/war/ear and can run in development mode

Re: Use pageparameters from authorized page to login

2011-05-25 Thread Bas Gooren
Hi, You can always get the PageParameters from the page itself (given you received them in the constructor). In case you do not want to handle this on a page-by-page basis, they are also available through the RequestCycle (in wicket 1.4). You could check if the params contain "login" and "pas

Re: IStringResourceLoader database implementation

2011-05-19 Thread Bas Gooren
You could always preload all strings, or preload sets of strings. This way you'll have fewer database requests, and faster lookups since you'll have everything you need in a local map. Bas Op 19-5-2011 8:23, schreef Mathias Nilsson: Thanks, My concern is also name component collition. The or

Re: Serializing restfb DefaultFacebookclient in a wicket facebook application

2011-05-15 Thread Bas Gooren
No, since a session will also be serialized at some point, you will have the same problem, only less frequent. What you can do is manage the client per request, either through a custom RequestCycle, or if you use google guice or something similar you can use a request-scoped provider. Either

Re: Serializing restfb DefaultFacebookclient in a wicket facebook application

2011-05-15 Thread Bas Gooren
I assume you create the fbclient within the AppPage class? If so, you'll need to store a serializable value/object in the page (or session) with which you can re-create the FacebookClient. Your authToken variable would be a good starting point, see if that is serializable. If so, store the authT

Re: Back button problem in wicket

2011-04-28 Thread Bas Gooren
Hi, It sounds like you use spring dependency injection directly, which will indeed cause serialization issues. Instead, use the wicket spring integration, which will inject serializable proxies. See https://cwiki.apache.org/WICKET/spring.html for more info. Bas Op 28-4-2011 8:36, schreef mad

Re: DropDownChoice sorted choice rendered Values

2011-04-21 Thread Bas Gooren
A simple solution is to create a custom model which stores the result of Locale.getAvailableLocales() in a list, and you sort that list with a custom comparator. You can then pass this model to your DropDownChoice and have the result you were looking for. Bas Op 21-4-2011 16:46, schreef xF

Re: Listview gives mysterious log info

2011-03-30 Thread Bas Gooren
Sounds like you are calling setOutputMarkupId on a container. So I googled your error message and founr WICKET-3237 (https://issues.apache.org/jira/browse/WICKET-3237) Bas Op 30-3-2011 8:54, nino martinez wael schreef: Listview gives mysterious log info what does it mean? This feels a bit li

Re: Need a CodingStrategy to parse parameter from prefix

2011-03-18 Thread Bas Gooren
Yes it is, e.g. have a look at https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html In your case, you would need to strip the first path parameter from the url and store it in the request for later retrieval. Bas Op 17-3-2011 23:58, Steve Mactaggart schreef: I guess I'll have a lo

Re: mountSharedResource() on huge amount of images

2011-03-15 Thread Bas Gooren
flag them for inappropriate content, copyright infringement, etc. What if there is an open file handle when you try to delete the image? Just seems to me a much smoother solution to put in a db. But with that I'm bowing out because as you said it's a heated debate and comes down to personal pre

Re: mountSharedResource() on huge amount of images

2011-03-15 Thread Bas Gooren
ituation there is user with more than 3.000 images in one photoalbum. Or -how to do it better way? Thanks, Laco -Original Message- From: Bas Gooren [mailto:b...@iswd.nl] Sent: Thursday, March 10, 2011 11:32 PM To: users@wicket.apache.org Subject: Re: mountSharedResource() on huge amount o

Re: How to block browser Suggestion ?

2011-03-14 Thread Bas Gooren
See https://developer.mozilla.org/en/how_to_turn_off_form_autocompletion Using an attribute: autocomplete="off". This is something originally implemented by IE, so it works there as well. Also have a look here: http://stackoverflow.com/questions/175951/how-do-i-stop-chrome-from-yellowing-my-si

Re: mountSharedResource() on huge amount of images

2011-03-10 Thread Bas Gooren
The general idea is to mount a single handler, which takes the filename from the url. There is no reason to mount all images by such a handler one-by-one. Bas Op 10-3-2011 23:01, Ladislav DANKO schreef: Hi all, what is the recommended way to mount huge amount of an images (thousands) in app?

Re: entity manager in webapp

2011-03-10 Thread Bas Gooren
Which is basically warp-persist, but integrated into guice. But as far as I know, it will be only be integrated as of guice 3.0; Bas Op 10-3-2011 15:29, nino martinez wael schreef: I'd go for guice persist if thats an option.. 2011/3/10 Bas Gooren Have a look at databinder or warp-pe

Re: entity manager in webapp

2011-03-10 Thread Bas Gooren
Have a look at databinder or warp-persist for a better implementation. Should you go with your own implementation, do not forget to clear the ThreadLocal at the end of the request to prevent: a) leaking b) re-using an EntityManager from a previous request (most if not all application servers u

Re: LoadableDetachableModel small issue

2011-03-04 Thread Bas Gooren
reef: Bas, This is what I wanted to find out if you guys use a different model for new items(before saving them). I had previously headed in the wrong way by not using LDM so I wanted to be sure I'm doing it correctly now. Thanks, Alexandru On 03/04/2011 04:19 PM, Bas Gooren wrote: Hi,

Re: LoadableDetachableModel small issue

2011-03-04 Thread Bas Gooren
Hi, I use a custom refreshingview which uses a LDM for existing items, and a serializing model for new items. When converting the input in my custom refreshingview (which is the component that "owns" the list) I handle both types of models. On refresh (re-display) it "replaces" the serializin

Re: Problem while passing TextField value as parameter to other page

2011-02-17 Thread Bas Gooren
2011 11:32, Jehan schreef: Thanks Bas Gooren, Passing values other pages using PageParameter is like Query String. What are other ways in wicket of passing values from one page to other. On Thu, Feb 17, 2011 at 3:08 PM, Ernesto Reinaldo Barreiro< reier...@gmail.com> wrote: I think the

Re: Problem while passing TextField value as parameter to other page

2011-02-17 Thread Bas Gooren
Hi Jehan, You'll need to provide your TextField with a model where it can load/store it's value. This is easy to do: new TextField("atext", Model.of("")); Kind regards, Bas Op 17-2-2011 10:56, Jehan schreef: -HelloWorld.Html --

Re: Modify element attribute, preserve content

2011-01-26 Thread Bas Gooren
Or, come to think of it, since you want to generate a href yourself on a link tag, use ExternalLink . Since it's a WebMarkupContainer underneath it will leave whatever is inside your a-tag intact. Bas

Re: Modify element attribute, preserve content

2011-01-26 Thread Bas Gooren
Use a WebMarkupContainer and add a SimpleAttributeModifier behavior to it. It will not touch the contents of the tag it's attached to, leaving your own html as it is. Bas Op 26-1-2011 22:38, Alexandros Karypidis schreef: Hello, I have the following case which I do not know how to handle with

Re: TextField Double type introduces commas

2011-01-15 Thread Bas Gooren
Wicket uses converters to convert form fields from object -> string and back from string -> object. This is done in a locale-aware fashion (so local users can use their preferred decimal separator etc). Have a look at class DoubleConverter in the wicket sources (which is used in your case, sin

Re: Handling OnKeyPress event

2010-12-29 Thread Bas Gooren
Hi Josh, Have a look at http://databinder.net/javadoc/net/databinder/components/AjaxOnKeyPausedUpdater.html It's a Java + Javascript ready-to-run component, of which the source is available. Bas - Original Message - From: "Martin Grigorov" To: Sent: Wednesday, December 29, 2010 9

Re: Localized mount points for BookmarkablePages?

2010-12-23 Thread Bas Gooren
I think in wicket 1.4.x this is only possible with a custom mount point; In other words: Override/implement a version of bookmarkable page handling which takes into accoun the locale. Have a look at BookmarkablePageRequestTargetUrlCodingStrategy. You could implement this class, overriding it's

Re: URL coding strategies

2010-12-16 Thread Bas Gooren
Well, look at it this way: when the user enters your application without any known state (session or other), how can you differentiate? Only by what you know/get from the url. So yes, if the name itself is not enough input to make a textual identifier unique, you'll have to include more inform

Re: How to tackle field labels when using CompoundPropertyModels?

2010-12-16 Thread Bas Gooren
Hi Matthias, There are several options, but most importantly: there is special handling for this on FormComponent (see LabeledWebMarkupContainer). You could either scope the fields by setting translations per page/panel, but this can get rather tedious. Another option is to create specialized

Re: URL coding strategies

2010-12-16 Thread Bas Gooren
There are two ways to achieve what you are looking for: 1) store a stable, unique textual identifier per product (e.g. "Ford-Ranger-Model-2005"), and lookup the product from this identifier 2) store a textual identifier -> ID mapping in your session and do the lookup when the page is accessed;

Re: Basic Webpage security

2010-12-10 Thread Bas Gooren
Well, since your page will never be constructed when the user is not logged in, it is secure. Even when your page is stateless, a user will never be able to reference components on the page. So if the isLoggedIn() method on your UserLoggedInSession works (and is tested!) you should be good to

Re: get localized string from Model class?

2010-10-30 Thread Bas Gooren
The component parameter can be null. e.g. if you look at getObject() in the ResourceModel class: return Application.get().getResourceSettings().getLocalizer().getString(resourceKey,(Component)null, defaultValue); It calls Localizer#getString with the resource key and optionally a component.

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread Bas Gooren
AFAIK onConfigure() is _always_ called, also when a Component is invisible; If I recall correctly this was done to remove the "callOnBeforeRenderIfInvisble()" method and switching visibility in onBeforeRender(). Bas - Original Message - From: "Jeremy Thomerson" To: Sent: Thursday,

Re: The Long, Long Dependency Trail

2010-09-23 Thread Bas Gooren
Sent: Thursday, September 23, 2010 2:49 PM Subject: Re: The Long, Long Dependency Trail I would not add those external repositories to your own pom, but rely on a repository manager instead to retrieve the dependencies. See: * artifactory * nexus * archiva Martijn On Thu, Sep 23, 2010 at 2:48 PM, Ba

Re: The Long, Long Dependency Trail

2010-09-23 Thread Bas Gooren
More recent versions of hibernate are available in the JBoss maven repo (which I do not see in your pom.xml): jboss https://repository.jboss.org/nexus/content/repositories/releases Sebastian - Original Message - From: "Josh Kamau" To: Sent: Thursday, September 23, 2010 2:44 PM

Re: using IOC in panels?

2010-09-23 Thread Bas Gooren
I'd be curious to hear for what "other classes" you have in mind. You'll always need to call the instantiation listener at some point to invoke the injector. So simply implementing IInstantiable will not be enough to have injection magically work. I think the reason it's currently implemented

Re: Replacing content in

2010-09-20 Thread Bas Gooren
tainer") { /** * @see org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag) */ @Override protected void onComponentTag(ComponentTag tag) { tag.setName(STYLE); super.onComponentTag(tag); } }); ** Martin 2010/9/20 Bas Gooren : M

Re: Replacing content in

2010-09-20 Thread Bas Gooren
Martin, Wicket tags need to be part of a valid (x)html tree. So what you want can be achieved by giving the tag a wicket:id and generating the CSS including the ".container { ... }" code.

Sebastian

- Original Message - From

Re: Replicating tinyMCE

David, You can see an example (plus javascript code required to remove the editor in the page source) of removing TinyMCE on the following page: http://tinymce.moxiecode.com/examples/example_01.php Try prepending the necessary javascript code to the AJAX request to fix your problem. Bas -

Re: Replicating tinyMCE

David, Sounds like you're not removing the previous editor instance. You probably need to call a TinyMCE function to remove the previous instance before initializing the new one. TinyMCE simply hooks into the textarea, but the editor itself is separate from that textarea. So when you replace

Re: Wicket + Guice + other framework (e.g. Jersey)

Johannes, yes, this is no problem, see http://code.google.com/p/wicket-guice-jaxws/ Bas - Original Message - From: "Johannes Schneider" To: Sent: Thursday, September 02, 2010 3:58 PM Subject: Wicket + Guice + other framework (e.g. Jersey) -BEGIN PGP SIGNED MESSAGE- Hash:

Re: Selectively ignoring required fields

of Form that I would need to call. Has anyone perhaps had a similar issue somewhere else? Thanks again, Phil. 2009/9/15 Bas Gooren : Phil, The way we deal with this is by using an ajax behavior on radiobuttons, and update the required flag on dependant fields from there. Another way (without

Re: Selectively ignoring required fields

Phil, The way we deal with this is by using an ajax behavior on radiobuttons, and update the required flag on dependant fields from there. Another way (without ajax) could be to update the required flag on the form components on submit, prior to validation. E.g. by overriding Form.process() (

Re: Wicket + Webservice

tance, as long as I can @Inject stuff. I've generated the webservice stub with wsimport so all I need to do is to hook it up so it can handle requests. Bas - Original Message - From: "Uwe Schäfer" To: Sent: Friday, August 28, 2009 3:12 PM Subject: Re: Wicket + Web

Re: Wicket + Webservice

es that you are accessing..? like warp? guiceFilter com.wideplay.warp.servlet.WebFilter Then just map it to everything: guiceFilter /* 2009/8/28 Bas Gooren : Yeah, I've built Wicket pages which return XML responses before, so that's not the problem. But since I have to adhere t

Re: Wicket + Webservice

g, it's already described there.. So you know that wicket can return XML 2009/8/28 nino martinez wael : Ahh ok, you can also make a web page return xml. Im not sure how SOAP communicates. But this might be the way for you... 2009/8/28 Bas Gooren : Nino, I read a blog post by Bruno borges on th

Re: Wicket + Webservice

"nino martinez wael" To: Sent: Friday, August 28, 2009 1:16 PM Subject: Re: Wicket + Webservice Going for the web page, you could in theory do REST... But how smooth it are i do not know.. regards Nino 2009/8/28 Bas Gooren : I would like to integrate a webservice callable by others in

Wicket + Webservice

I would like to integrate a webservice callable by others into my existing Wicket application. The reason is that I'm integration a third-party payment provider and they provide a callback mechanism in the form of a WSDL I need to implement. Now I've taken a look at enunciate, which looks great

Re: How to detect model "leakage" into session

that shouldn't be, is to make sure that the objects you don't want sticking around are not serializable, and you'll see stacktraces soon enough. If that's an options, it's a useful hack... Eelco On Wed, Aug 26, 2009 at 12:29 PM, Bas Gooren wrote: Hi all, My problem is a

Re: How to detect model "leakage" into session

ot;me"){ if( foo.getX() ) add( new Label("x", new PropertyModel( getModel(), "x" ) ); else add( new Label("x", new PropertyModel( getModel(), "y" ) ); }; add(bigBox); Scott Any time you make an object final it is potentially bound into the context

Re: How to detect model "leakage" into session

Obviously that's going to increase session size as it's a direct reference to an object. Thanks for giving me some pointers! Bas ----- Original Message - From: "Bas Gooren" To: Sent: Wednesday, August 26, 2009 10:27 PM Subject: Re: How to detect model "leakage&quo

Re: How to detect model "leakage" into session

den 26.08.2009, 21:29 +0200 schrieb Bas Gooren: Hi all, My problem is as follows: I use LoadableDetachableModels throughout my application, and have made sure I never use a model without it being attached to a component to prevent models which never get their detach() method called. Nonethele

Re: How to detect model "leakage" into session

ble(){return foo.isPurple();}}); // now foo is bound to the label, and will end up in the session Scott On Wed, Aug 26, 2009 at 12:51 PM, Bas Gooren wrote: Sven, I've been using wicket for over a year, so I'm quite familiar with Model usage. So thanks for the explanation, but I'm

Re: How to detect model "leakage" into session

etModel(new CompoundPropertyModel(ldm)); add(new Label("foo")); // -> getFoo() add(new Label("bar")); // -> getBar() add(new Label("baz")); // -> getBaz() HTH Sven On Mi, 2009-08-26 at 21:29 +0200, Bas Gooren wrote: Hi all, My problem is as follows: I use

How to detect model "leakage" into session

Hi all, My problem is as follows: I use LoadableDetachableModels throughout my application, and have made sure I never use a model without it being attached to a component to prevent models which never get their detach() method called. Nonetheless, after hitting two fairly simple pages which lis

Re: How do I get my DropDownChoice to refresh the list of choices with Ajax?

Linda, Without looking at your question very long I noticed that you supply your component with a static List. This means that this list is only retrieved once (at initialization). It sounds like you want it to be refreshed when other components change their input. This would mean you need t

Re: How to use DynamicWebResource?

The idea is as follows, for as far as I know: - you either mount your resource (dynamic, static) as a shared resource (1), or - you set it as the request target when the user clicks a link (2) Now let me explain both: 1) Basically, what you do is mount your DWR through Application.get().getSha

Re: Handle file uploads in Behavior and respond using AjaxRequestTarget

not use an ajax request the form contains its multipart data. i tested it on a small example and it works like a charm save javascript problems. -igor On Wed, Aug 5, 2009 at 8:16 PM, Bas Gooren wrote: Interesting, it looks like you simply POST the form to the AJAX url using an IFRAME. How do

<    1   2   3   4   >