Re: Wicket 1.5.1 image resource not available if parent component is disabled

2011-10-03 Thread cellis
ok, so its the parent.isEnabledInHierarchy that's forcing the RequestListenerInterface - component not enabled or visible; ignoring call. Any chance I could override that somehow, or should I/we refactor our design to not have view/edit forms (groan) -- View this message in context: http://apac

Wicket 1.5.1 image resource not available if parent component is disabled

2011-10-03 Thread cellis
Got an odd issue since upgrading to 1.5.1. An image in a form is somehow unable to determine it's resource when the form is disabled (eg read-only "view" of a detail form). When the form is "enabled" (ie into edit mode), the image becomes visible just fine. Something to do with the anticache value

Re: Wicket Wizard -- how to force a wizardstep to redraw or refresh

2011-10-03 Thread bad boy
Hi Sven Thanks a lot for your help. That worked !! Regards - Original Message - From: Sven Meier To: users@wicket.apache.org Cc: Sent: Monday, October 3, 2011 3:18 PM Subject: Re: Wicket Wizard -- how to force a wizardstep to redraw or refresh Hi, you could move you

Re: Wicket Dynamic Navigation

2011-10-03 Thread Nelson Segura
To be fair, there is code in the web site he pointed at. Look under "Beispielcode" link. I don't speak a lick of german, but it is not hard to figure out that is the code, and under the web apps directory there is some code that can be useful wicket-praxis-code\de.wicketpraxis--webapp\src\main\jav

RE: Wicket Dynamic Navigation

2011-10-03 Thread leaosou
Hi Kai Mütz, Why don't you show some code? Don't you think this is better than advertising a book? The site your link point to does not show any code but only talk about the book. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Dynamic-Navigation-tp2228587p38

Re: Version 1.5 event model

2011-10-03 Thread Dan Retzlaff
Hi Jeffrey, Whether or not events are helpful for your application really depends on your application. If you have components that know about each others' existence for the sole purpose of notifications, abstracting those exchanges into events is a clean way to decoupled those components. The def

Version 1.5 event model

2011-10-03 Thread Jeffrey Schneller
I am currently converting an app to version 1.5.1 and am starting to look into/work with the event model. What is the suggested approach for using the event model? Should all Ajax be moved to the event model (anywhere where in 1.4 the code had target.addComponent or target.addJavascript calls)?

[SOLVED] Re: Incorrect resource urls when 404 occurs

2011-10-03 Thread Russell Pitre
SOLVED: I had to remove the following method in my Error404Page class: @Override protected void configureResponse(WebResponse response) { super.configureResponse(response); ((HttpServletResponse)response.getContainerResponse()) .setStatus(HttpServletResponse.SC_NOT_FOUND); } After removing th

Re: Migration to 1.5.1 -- unable to render page because of tag

2011-10-03 Thread Sven Meier
Ah, just read that you solved it: Have fun Sven On 10/03/2011 09:22 PM, Sven Meier wrote: > You're probably missing a close tag somewhere here: [bunch of html] > > What's at line 196, column 27 ? > > Sven > > > On 10/03/2011 09:17 PM, Jeffrey Schneller wrote: >> Been migrating an app to 1.5.

Re: Migration to 1.5.1 -- unable to render page because of tag

2011-10-03 Thread Sven Meier
You're probably missing a close tag somewhere here: [bunch of html] What's at line 196, column 27 ? Sven On 10/03/2011 09:17 PM, Jeffrey Schneller wrote: > Been migrating an app to 1.5.1 and wanted to test a simple first page. > I continue to run into problems rendering the page. I continue to

RE: Migration to 1.5.1 -- unable to render page because of tag

2011-10-03 Thread Jeffrey Schneller
I solved my problem. I had a double quote in the title tag. Removing that resolved the problem. -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Monday, October 03, 2011 3:18 PM To: users@wicket.apache.org Subject: Migration to 1.5.1 -- unable to re

Re: Wicket Wizard -- how to force a wizardstep to redraw or refresh

2011-10-03 Thread Sven Meier
Hi, you could move you fragment setup into onBeforeRender(): if (abModel.getObject().getQryType() == 1 && !(EasyQueryFragment.class.isInstance(get("querySpan"))) { addOrReplace(new EasyQueryFragment("querySpan", "easyQueryFragment", abModel)); } else ... Sven On 10/03/2011 06:54 PM, ba

Migration to 1.5.1 -- unable to render page because of tag

2011-10-03 Thread Jeffrey Schneller
Been migrating an app to 1.5.1 and wanted to test a simple first page. I continue to run into problems rendering the page. I continue to get the following exception: Caused by: java.text.ParseException: No matching close bracket at (line 196, column 27) at org.apache.wicket.ma

Incorrect resource urls when 404 occurs

2011-10-03 Thread Russell Pitre
Hi- Just upgraded to 1.5.1 from 1.4.18 and was not seeing this behavior described below. In our application, the Wicket filter and error page is setup in the web.xml like so: wicket.filter /app/* REQUEST ERROR 404 /app/404 In my WicketApplication class I am mounting the 404 [ *mountPage("

Re: What is the right way to identify the second login for the same user?

2011-10-03 Thread vineet semwal
in a non wicket request ,you will have a non wicket session .. is your this question related to previous question? for a wicketsession there is a httpsession ,cant exist without it,when you will invalidate the session like in previous case both will get invalidated .. On Mon, Oct 3, 2011 at 9:1

Wicket Wizard -- how to force a wizardstep to redraw or refresh

2011-10-03 Thread bad boy
Hi I have a wicket wizard with 5 steps and in the confirmation  step, I have a panel which contains 3 Fragments. This panel will render one of these fragments based on the  state of the Model. The problem is the that this panel is getting cached wen the wizard model is initialized . Is it pos

Re: Show feedback message from modal window in parent page

2011-10-03 Thread Dan Retzlaff
I'm looking at 1.4's WebSession#cleanupFeedbackMessages(), and it looks like only feedback messages associated with a component are always cleared. So if you associate the message with the Session itself (Session#info(...)), and make sure no FeedbackPanels are rendered in the onSubmit() response, t

Re: AbstractTransformerBehavior does not support ajax in wicket 1.5.1

2011-10-03 Thread Andrea Del Bene
I confirm the problem. I'm opening an issue on jira. Hi, Using ajax to update a component that has an AbstractTransformerBehavior attached throws a ClassCastException (see below). I can only assume that this is not intentional? Root cause: java.lang.ClassCastException: org.apache.wicket.ajax.Aj

Re: Show feedback message from modal window in parent page

2011-10-03 Thread heapifyman
Ok, that I understand. Do you have an idea how to circumvent this and get the feedback message into the parent page? Am 03.10.2011 um 17:51 schrieb Dan Retzlaff: We use our own modal window class so I'm not sure what the best way to go is. But I can probably explain what's happening. The

Re: Show feedback message from modal window in parent page

2011-10-03 Thread Dan Retzlaff
We use our own modal window class so I'm not sure what the best way to go is. But I can probably explain what's happening. The onSubmit request renders the feedback into the modal, then clears the messages from the session. Then in a separate close button callback request you're re-rendering the pa

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: What is the right way to identify the second login for the same user?

2011-10-03 Thread donx...@yahoo.com
Vineet, Thanks for the help. I also need to handle non Wicket Request. Is the session is Wicket Session or HttpSession? Thanks Don -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/What-is-the-right-way-to-identify-the-second-login-for-the-same-user-tp3867590p3867

Re: Show feedback message from modal window in parent page

2011-10-03 Thread heapifyman
In the ModalWindow I have an AjaxButton in whose onSubmit method I call ModalWindow.closeCurrent(target); Is that not the right way to go? 2011/9/30 Dan Retzlaff > Each FeedbackPanel rendered in a response includes all messages generated > during that request. The messages are then cleared fro

Re: Authentication and sessions - the right way?

2011-10-03 Thread Dan Retzlaff
Isn't it a bad idea to keep any non-thread-safe objects in the session? Sharing entities sounds particularly risky since any persistence session other than the original that, say, tries to initialize a lazy collection will result in a runtime exception. Because of this, our application maintains t

Re: Does PagingNavigation render the entire page and would AjaxPagingNavigation render only its assigned pageableView?

2011-10-03 Thread Bruno Borges
Could you provide some snippet of your code? Have you setOutputMarkupId on your PageableListView? *Bruno Borges* (21) 7672-7099 *www.brunoborges.com* On Wed, Sep 28, 2011 at 9:27 AM, Martin A wrote: > Thanks, but strangely, clicking on a AjaxNavigationLink returns empty > response. Do you ha

AbstractTransformerBehavior does not support ajax in wicket 1.5.1

2011-10-03 Thread Jon Jaatun
Hi, Using ajax to update a component that has an AbstractTransformerBehavior attached throws a ClassCastException (see below). I can only assume that this is not intentional? Root cause: java.lang.ClassCastException: org.apache.wicket.ajax.AjaxRequestTarget$AjaxResponse cannot be cast to org.apac

Re: What is the right way to identify the second login for the same user?

2011-10-03 Thread vineet semwal
correcting a typo i made retrieve the previous session by *userid* On Mon, Oct 3, 2011 at 7:54 PM, vineet semwal wrote: > you can store sessionid corresponding to a particular user , > if he tries to login from different browser,you can retrieve the > previous session by session id >  kill the

Re: What is the right way to identify the second login for the same user?

2011-10-03 Thread Christian Huber
I might be wrong, but this does not seem like a Wicket related problem. Here a spontaneous idea what I would try: To track sessions of a user I would try to use a database table that associates sessions with users and a boolean flag "isvalid". A new session would have to create an entry in that

Re: What is the right way to identify the second login for the same user?

2011-10-03 Thread vineet semwal
you can store sessionid corresponding to a particular user , if he tries to login from different browser,you can retrieve the previous session by session id kill the old session when the user logs in from different browser... 1) sessionid=findsessionbyuserid() 2)application.sessionUnbound(session

Unit Testing Application with custom HttpServletResponse

2011-10-03 Thread Jan Ferko
Hi everyone, We use proxy around HttpServletResponse in our application. I would like to test components/pages using WicketTester, but when WicketTester tries to startPage it throws following exception: java.lang.ClassCastException: myPackage.HttpServletResponseProxy cannot be cast to org.ap

Re: Redering to to file in wicket1.5

2011-10-03 Thread Martin Grigorov
On Mon, Oct 3, 2011 at 12:39 PM, Marco wrote: > public String renderTemplate(WebPage webPage) { >        BufferedWebResponse bufferedWebResponse = new > BufferedWebResponse(null); >        webPage.getRequestCycle().setResponse(bufferedWebResponse); >        webPage.render(); > >        return buf

Re: Redering to to file in wicket1.5

2011-10-03 Thread Marco
public String renderTemplate(WebPage webPage) { BufferedWebResponse bufferedWebResponse = new BufferedWebResponse(null); webPage.getRequestCycle().setResponse(bufferedWebResponse); webPage.render(); return bufferedWebResponse.getText().toString(); } Martin,

Re: Redering to to file in wicket1.5

2011-10-03 Thread Martin Grigorov
Hi Marco, On Mon, Oct 3, 2011 at 12:22 PM, Marco wrote: > You can also use: > > > You paste didn't make it. > I prefer this solution. Using a class which is intended for testing > (WicketTester) to produce results in a production environment is strange. > > -- > View this message in context: > h

Re: Redering to to file in wicket1.5

2011-10-03 Thread Marco
You can also use: I prefer this solution. Using a class which is intended for testing (WicketTester) to produce results in a production environment is strange. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redering-to-to-file-in-wicket1-5-tp3854891p3867053.html Se

Re: Ajax : Modifying CallBackUrl in OnEvent()

2011-10-03 Thread Andrea Del Bene
Hi, when onEvent is triggered the callback script has been already executed, so it's too late to re-generate it. Maybe I didn't understand right your problem. Hi, I have an overridden the AbstractDefaultAjaxBehavior.getCallbackScript(boolean onlyTargetActivePage) method. I have also overridde

Re: Authentication and sessions - the right way?

2011-10-03 Thread Marco Springer
Each browser opens up a new session, that's no actual problem. Sessions are pretty thread safe (correct me if I'm wrong) when they're accessed from request threads (normal Wicket application flow). If Browser #1 changes something to user data or some other db data, and Browser #2 fires a new r

Re: Authentication and sessions - the right way?

2011-10-03 Thread Martin Grigorov
On Mon, Oct 3, 2011 at 10:41 AM, Zeldor wrote: > Marco: > > And it works without problems? There is no issue with user trying to log > from 2 browser on same time, trying to cheat the system? I am just wondering > if there is any risk of that. > How does your code look then in session and how do y

Re: Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
I'd say it's mostly a cache. >From estimates I can say that 80-90% of the time data will be read-only. Only remaining 10-20% will be data manipulation. My current implementation is that I use setters on data in Session and then persist whole User. Like that: MySession.get().getUser().setFree_la

Re: Authentication and sessions - the right way?

2011-10-03 Thread Carl-Eric Menzel
On Mon, 3 Oct 2011 10:31:38 +0200 Martin Grigorov wrote: > > Yes, just put a field in your Session and add getter/setter. > This is not good. > This is error prone. This way you'll have to keep the instance in the > Session in sync with the data DB. Additionally the memory size will > increase f

Re: Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
Marco: And it works without problems? There is no issue with user trying to log from 2 browser on same time, trying to cheat the system? I am just wondering if there is any risk of that. How does your code look then in session and how do you fetch your data? Martin: I was trying to save on cos

Re: Authentication and sessions - the right way?

2011-10-03 Thread Martin Grigorov
On Mon, Oct 3, 2011 at 10:24 AM, Carl-Eric Menzel wrote: > On Mon, 3 Oct 2011 01:10:58 -0700 (PDT) > Zeldor wrote: > >> But would it be possible to store User data in the session without >> having to fetch it from datastore on every request? My users don't >> interact with each other and they ope

Re: Authentication and sessions - the right way?

2011-10-03 Thread Marco Springer
I sort of use the same thing, storing the user in the Session. Only I store a LoadableDetachableModel in the Session, representing the user. In my scenario, the LDM is a custom Model and the key identifier is a Long number, but that shouldn't be a difference. And the injection happens in the

Re: Authentication and sessions - the right way?

2011-10-03 Thread Carl-Eric Menzel
On Mon, 3 Oct 2011 01:10:58 -0700 (PDT) Zeldor wrote: > But would it be possible to store User data in the session without > having to fetch it from datastore on every request? My users don't > interact with each other and they operate only on their own data. So > it'd be most efficient to store

Re: Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
So it's normal that I lose User data when I move from login to main page and I will have to fetch it from db quite often. When will it happen? I have users browsing around my app, doing most often nothing. Plenty of labels with gets. Will browsing like that trigger fetching user data from db? Or w

Re: Authentication and sessions - the right way?

2011-10-03 Thread Martin Grigorov
On Mon, Oct 3, 2011 at 10:10 AM, Zeldor wrote: > But would it be possible to store User data in the session without having to > fetch it from datastore on every request? My users don't interact with each > other and they operate only on their own data. So it'd be most efficient to > store User dat

Re: Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
But would it be possible to store User data in the session without having to fetch it from datastore on every request? My users don't interact with each other and they operate only on their own data. So it'd be most efficient to store User data in the session and interact with db only when some dat

Re: Authentication and sessions - the right way?

2011-10-03 Thread Martin Grigorov
Hi, On Mon, Oct 3, 2011 at 9:54 AM, Zeldor wrote: > Hi, > > I have a problem with designing authentication and session properly. I asked > for help some time ago, but I was not able to fix the problem. > > I have a standard situation - I have an app that has bunch of pages and only > main page wi

Re: Authentication and sessions - the right way?

2011-10-03 Thread Carl-Eric Menzel
On Mon, 3 Oct 2011 00:54:31 -0700 (PDT) Zeldor wrote: > 2. How to fetch data from Guice in Session? I have a Repository > Inject, but when it is used in Session it throws nullpointer > exception. Should I have it in session at all? I guess repopulating > user data like that is not the best idea,

Re: Authentication and sessions - the right way?

2011-10-03 Thread Carl-Eric Menzel
On Mon, 3 Oct 2011 00:54:31 -0700 (PDT) Zeldor wrote: > It all works fine on my computer, but when I deploy it, it stops > working. Session gets detached on the way and I cannot fetche the > data to my models. Yes, I keep user data in my session, I could do it > with datastore queries, but sessio

Authentication and sessions - the right way?

2011-10-03 Thread Zeldor
Hi, I have a problem with designing authentication and session properly. I asked for help some time ago, but I was not able to fix the problem. I have a standard situation - I have an app that has bunch of pages and only main page with login form should be accessible for everyone. Everything else