Serialize exceptions

2012-03-21 Thread nino martinez wael
Hi I get a serialize exception in a panel of mine its correct that one of the contained fields cannot be serialized, however this field are injected and should not be touched by the checker, the field are marked with the @inject annotation. I'm using guice for injection.. Any thing obvious wrong

RE: Serialize exceptions

2012-03-21 Thread Wilhelmsen Tor Iver
Hi I get a serialize exception in a panel of mine its correct that one of the contained fields cannot be serialized, however this field are injected and should not be touched by the checker, the field are marked with the @inject annotation. I'm using guice for injection.. Any thing obvious

Re: support for L10N in templates

2012-03-21 Thread Martin Grigorov
Create a ticket about this. With a patch will be even better! On Wed, Mar 21, 2012 at 12:55 AM, infiniter infini...@gmail.com wrote: I can't use that TextTemplateResourceReference 'cause the style and locale are set to null by default in the constructors and the filename passed to

Re: How to set HTTP Header Content-Length in IResourceListener?

2012-03-21 Thread Martin Grigorov
On Tue, Mar 20, 2012 at 8:12 PM, eugenebalt eugeneb...@yahoo.com wrote: As I wrote in other messages, I have a custom widget that implements IResourceListener. I override onResourceRequested(). When rendering the resource I need to set the ContentLength of the response that sends the binary

Re: Serialize exceptions

2012-03-21 Thread Martin Grigorov
Wicket-Guice will inject serializable Proxy. It seems Guice's plain Injector injects the binding. Check why. On Wed, Mar 21, 2012 at 9:55 AM, Wilhelmsen Tor Iver toriv...@arrive.no wrote: Hi I get a serialize exception in a panel of mine its correct that one of the contained fields cannot be

Re: How to set HTTP Header Content-Length in IResourceListener?

2012-03-21 Thread Martijn Dashorst
Response is there to provide an abstraction for e.g. portlets, and other types of requests. As long as you are working in a web container and don't install or use extensions (that I am unaware of exist), casting is fine. Martijn On Wed, Mar 21, 2012 at 9:56 AM, Martin Grigorov

Two submit buttons in a form, one of them does not trigger validation

2012-03-21 Thread stoupa
I have a form that has two submit buttons. One is a Save button that just persists the model object of the form and the other is a Send for approval button that causes the data in the form to be processed in the application. I need to make some of the fields mandatory, but there is a requirement

Re: Two submit buttons in a form, one of them does not trigger validation

2012-03-21 Thread Martin Grigorov
Hi, We needed once to do something similar and we came with the following solution: override FormComponent#validate() for the components which have validators and do: public void validate() { if (getForm().findSubmittingButton() != saveButton) { super.validate() } } i.e. validate for

Wicket 1.4.20 : error message Access denied to (static) package resource

2012-03-21 Thread Pierre Goiffon
Hello, After upgrading from Wicket 1.4.19 to Wicket 1.4.20 I get exceptions in TinyMCE. We're using the Wicketstuff integration. When opening TinyMCE lightboxes I get exception like : org.apache.wicket.markup.html.PackageResource$PackageResourceBlockedException: Access denied to (static)

Re: Wicket 1.4.20 : error message Access denied to (static) package resource

2012-03-21 Thread Martin Grigorov
Hi, Yes, in 1.4.20 Wicket uses SecurePackageResourceGuard by default because there was a security related issue. We will send an official mail soon. Many of the common extensions are allowed by default but .htm is not one of them. You need to add this to YourApp#init():

Re: Wicket 1.4.20 : error message Access denied to (static) package resource

2012-03-21 Thread Antoine Angenieux
Hi ! I faced a similar issue, but with PDF files used as PackageResource. It boils down to wicket relying now by default on SecurePackageResourceGuard which only authorizes file with some extensions (defined in the SecurePackageResourceGuard constructor). What I did was create my own

Re: Wicket 1.4.20 : error message Access denied to (static) package resource

2012-03-21 Thread Pierre Goiffon
Martin and Antoine, thanks very much for your quick answers, it solves of course my problem ! SecurePackageResourceGuard has already a lot of common extensions, and it's easy to add the ones you eventualy need ! Martin, I still can't see in the 1.4.20 changelog

Re: Wicket 1.4.20 : error message Access denied to (static) package resource

2012-03-21 Thread Martin Grigorov
As I said this change is due to a security related problem. An official announcement will come very soon. We haven't sent it so far because we wanted to give you some time to upgrade to 1.4.20/1.5.5 before making the problem public. Sorry for the troubles! On Wed, Mar 21, 2012 at 1:19 PM, Pierre

[1.5] unwanted page refresh

2012-03-21 Thread Pierre Goupil
Good afternoon, I have a couple of ModalWindow s in my code that respond to closing using an AjaxButton and its AjaxRequestTarget. My problem is that, in 1.5, after the page displays its components added to the target, the page refreshes itself. Which I don't want, indeed. The problem is weird

Re: [1.5] unwanted page refresh

2012-03-21 Thread Bas Gooren
Hi, Sounds like you have a redirect somewhere. Do you have any components on the page which at some point in time call setResponsePage or an equivalent? Bas Op 21-3-2012 12:49, schreef Pierre Goupil: Good afternoon, I have a couple of ModalWindow s in my code that respond to closing using

Re: [1.5] unwanted page refresh

2012-03-21 Thread Pierre Goupil
Sounds like you have a redirect somewhere. Yes, but one which didn't triggered in 1.4! Do you have any components on the page which at some point in time call setResponsePage or an equivalent? I have no setResponsePage. I'll look through the js to see if there is any window.location but

Re: Wicket 1.4.20 : error message Access denied to (static) package resource

2012-03-21 Thread Pierre Goiffon
Le 21/03/2012 12:24, Martin Grigorov a écrit : As I said this change is due to a security related problem. An official announcement will come very soon. We haven't sent it so far because we wanted to give you some time to upgrade to 1.4.20/1.5.5 before making the problem public. Sorry for the

Mysterious application crash

2012-03-21 Thread Jürgen Lind
Hi, I've run into a very odd situation and I have no idea, how to find out what is going on... The situation is as follows: 1. I have a base page that contains some markup and components. 2. I have a second page, that extends the base page but does not add any markup or components, i.e the

RE: Error in dynamic form with any number of drop down ,enu

2012-03-21 Thread Michal Wegrzyn
Hi, You should add organizationList to the registerForm object. Best regards, Michal Wegrzyn -Original Message- From: kshitiz [mailto:k.agarw...@gmail.com] Sent: Wednesday, March 21, 2012 15:57 To: users@wicket.apache.org Subject: Error in dynamic form with any number of drop down

Re: Error in dynamic form with any number of drop down ,enu

2012-03-21 Thread kshitiz
Sorry..I missed to add *registerForm.add(organizationList);* in java class. After adding that with proper getters and setters..I am getting the error: WicketMessage: No get method defined for class: class domain.UserDomain expression: organizationList Root cause:

Re: Dynamically sized image

2012-03-21 Thread jarnis
Hey Dan, sorry for the late reply and thanks for your suggestion. If it is necessary with ajax for a good solution, I'm not fanatic in resisting it. I would prefer to wrap it in a reusable wicket component, thou, and I have not yet figured out to do this. It seems that depending on

Re: Two submit buttons in a form, one of them does not trigger validation

2012-03-21 Thread Martin Grigorov
On Wed, Mar 21, 2012 at 6:10 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: button.setdefaultformprocessing(false) ? He needs to save the values without validation. Calling button.setdefaultformprocessing(false) wont update the models. -igor On Wed, Mar 21, 2012 at 3:30 AM, Martin

Re: Two submit buttons in a form, one of them does not trigger validation

2012-03-21 Thread Igor Vaynberg
yeah, but its pretty easy to visit all formcomponents and call convertinput()/updatemodel() from one place rather then changing every form component to be aware of the button...just sayin... -igor On Wed, Mar 21, 2012 at 9:22 AM, Martin Grigorov mgrigo...@apache.org wrote: On Wed, Mar 21, 2012

Re: Dynamically sized image

2012-03-21 Thread Dan Retzlaff
Nice, I share the vision. There's definitely room for something reusable there. Keep us posted. :) On Wed, Mar 21, 2012 at 9:03 AM, jarnis jarnis.bertel...@exedio.com wrote: Hey Dan, sorry for the late reply and thanks for your suggestion. If it is necessary with ajax for a good solution, I'm

Streaming a zip file then going back to previous BreadCrumbPanel

2012-03-21 Thread Josh Chappelle
Hi, I have a Wizard that is inside a BreadCrumbPanel. I have implemented a method in the onCancel that goes back to the previous BreadCrumbPanel. This is how it is implemented: ListIBreadCrumbParticipant participants = crumbModel.allBreadCrumbParticipants();

LDM - correct construction

2012-03-21 Thread Jeffrey Schneller
Is this the correct construction of a LDM where I need to use a service bean to access my database? The IMyService bean is injected on the page and passed to the LDM. Does this make the LDM hold a reference to the IMyService bean and possibly keep a connection from being put back into the

Re: LDM - correct construction

2012-03-21 Thread Dan Retzlaff
Jeffrey, That won't prevent a connection from being released. The LDM holds a reference to the page, and the page has a serializable proxy to the service implementation. No problem there. Injecting the service into the LDM is only an advantage if you want to share it among pages; then the LDM can

OSIV with requestCycleListener

2012-03-21 Thread grazia
Would you recommend using a requestCycleListener to implement the OSIV pattern and storing the hibernate session in a threadlocal ? Any comments ? tips ? public class MyRequestCycleListener extends AbstractRequestCycleListener { private static final ThreadLocalSession requestCycleThread =

RE: LDM - correct construction

2012-03-21 Thread Jeffrey Schneller
My service implementation uses hibernate dao objects which should be managing its own connections via the c3p0 connection pool. All my service objects and Dao objects are marked as singletons in my Spring applicationContext.xml file. I don't think any of my transactions are failing as it

Re: LDM - correct construction

2012-03-21 Thread Dan Retzlaff
That sounds like a good strategy. Generally speaking, applications use an open-session-in-view pattern which makes it easy to ensure that the Hibernate session gets closed. As long as that happens, the (mis)handling of transactions shouldn't cause your symptoms. On Wed, Mar 21, 2012 at 2:31 PM,

RE: LDM - correct construction

2012-03-21 Thread Jeffrey Schneller
The application is using the open-session-in-view pattern which is what makes this so troubling to figure out. -Original Message- From: Dan Retzlaff [mailto:dretzl...@gmail.com] Sent: Wednesday, March 21, 2012 5:44 PM To: users@wicket.apache.org Subject: Re: LDM - correct

Re: OSIV with requestCycleListener

2012-03-21 Thread Dan Retzlaff
Grazia, Those are good lifecycle events, but consider configuring org.hibernate.context.ManagedSessionContext and using its ThreadLocal. Then client code can use the more conventional SessionFactory#getCurrentSession(). Dan On Wed, Mar 21, 2012 at 2:28 PM, grazia

Re: OSIV with requestCycleListener

2012-03-21 Thread grazia
Thank you for the suggestion, I will try it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/OSIV-with-requestCycleListener-tp4493806p4493927.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Streaming a zip file then going back to previous BreadCrumbPanel

2012-03-21 Thread Dan Retzlaff
Can you initiate the download *after* your redirect? Otherwise I think you can have your resource set a session variable when the upload is complete, and poll for that with AJAX. Dan On Wed, Mar 21, 2012 at 10:53 AM, Josh Chappelle jchappe...@4redi.comwrote: Hi, I have a Wizard that is

After upgrading from wicket 1.5.0 to 1.5.1+ we have a simple problem

2012-03-21 Thread Bas Gooren
We have the following simple setup: BasePage checks if user is logged in, if not (and this is not the LoginPage), RestartResponseException(LoginPage.class); LoginPage extends BasePage; contains a form to login; The application runs in the root context. Now on 1.5.0 this works like a charm;

Re: Streaming a zip file then going back to previous BreadCrumbPanel

2012-03-21 Thread jchappelle
When you say Can you initiate the download *after* your redirect? I'm guessing you mean this: ListIBreadCrumbParticipant participants = crumbModel.allBreadCrumbParticipants(); crumbModel.setActive(participants.get(participants.size() - 2));