Re: Iterate over Pages in Pagemap

2009-11-10 Thread Ernesto Reinaldo Barreiro
Why not make your pages consult some kind of service that builds the navigation? And then have some a timer that get back to the server and looks for a flag newEntriesAdded and then repaint part of the page via AJAX? Another possibility is get changes pushed to your pages using reverse AJAX, but

Re: Combination CompoundPropertyModel and ChoiceRenderer on DropDownChoice gives problems

2009-11-10 Thread Xavier López
Hi Alex, Expose description and id on your model's object. If I understand what you're saying, this was the problem, we did want the Component's Model to be i.e. a String, while giving the choices an id-descr-like bean... But this is not working (must have same object type on choices and

AW: Iterate over Pages in Pagemap

2009-11-10 Thread Giambalvo, Christian
Well, i don't want a timer in the page. This causes unneeded checks. That's why I thought of the simplest solution. The basepage gets its navigation from session (which gets rebuild upon changes to stay up2date). Now I need a way to notify the page that navigation changed. So I implemented

Re: Iterate over Pages in Pagemap

2009-11-10 Thread Ernesto Reinaldo Barreiro
Hi, On Tue, Nov 10, 2009 at 9:36 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Well, i don't want a timer in the page. This causes unneeded checks. That's why I thought of the simplest solution. The basepage gets its navigation from session (which gets rebuild upon

AW: Iterate over Pages in Pagemap

2009-11-10 Thread Giambalvo, Christian
So, your Application object will act as a factory of components? I wouldn't follow that approach myself. At most the application would contain the data for the navigation and then the navigation component will fetch that data and rebuild itself. Well, no. The session holds the navigation and

Re: Iterate over Pages in Pagemap

2009-11-10 Thread Ernesto Reinaldo Barreiro
I haven't used wicketstuff-push myself so I can't be of much help there. I once had to implement some push functionality and I used DWR in combination with Wicket. Going the reverse AJAX can complicate things a lot (or so I believe). Thus, think carefully if what you want to achieve cannot be

Re: Force page reload/re-render

2009-11-10 Thread Pedro Santos
if(userSetWasChanged){ target.appendJavascript(window.location.reload()); or setResponsePage(getPage()); or setResponsePage(getPage().getClass()); } On Tue, Nov 10, 2009 at 5:19 AM, pieter claassen pieter.claas...@gmail.comwrote: I have a link on a panel that is included in many pages. When

AW: Iterate over Pages in Pagemap

2009-11-10 Thread Giambalvo, Christian
I agree that i should be carefully. But, back to the timer, let's assume I have 16 versions of one page in pagemap and each of 16 versions has a timer. Then there are 16 timers polling information from server, well if there are only 16 versions of one page, the traffic is low, but if the page

Re: Iterate over Pages in Pagemap

2009-11-10 Thread Ernesto Reinaldo Barreiro
It all depends on how often your navigation will change? Anyway the timer could only check for a boolean (navigationChanged) and only in case you have changes do something as heavy as repainting a component... No, I'm not planning to visit London any time soon : for a start I'll need to ask for a

RE: Getting the Choose Option on page reload

2009-11-10 Thread vinay.karmarkar
Thank you for the responses. theDropdownComponent.nullValid=Choose one worked. Regards, Vinay Karmarkar -Original Message- From: Wilhelmsen Tor Iver [mailto:toriv...@arrive.no] Sent: Monday, November 09, 2009 6:37 PM To: users@wicket.apache.org Subject: Re: Getting the Choose Option on

Re: Force page reload/re-render

2009-11-10 Thread pieter claassen
Hi Pedro, I tried setResponsePage(getPage()) but the problem is it does not re-render controls on the page. setResponsePage(getPage().getClass()) only works for stateless pages and on most of my pages, I pass params via the constructor. The javascript option will be a last resort, but it seems

Re: Force page reload/re-render

2009-11-10 Thread Ernesto Reinaldo Barreiro
Isn't AJAX refresh an option to consider here? For instance, defining some contexts which need to be re-rendered (e.g. marking them with an interface) and them having and IVisitor that collects all those contexts and add them to the AjaxRequestTarget? Best, Ernesto On Tue, Nov 10, 2009 at 8:19

Re: Force page reload/re-render

2009-11-10 Thread pieter claassen
Both of the suggestions I think requires me to modify the logic of the controls (either to keep track of which ones need to be updated or by placing the rendering logic in onBeforeRender()). I think this is a lot of work for something relative straight forward and also any changes to permission

Re: Unnecessary method calls in IDataProvider?

2009-11-10 Thread Michael Sparer
done: https://issues.apache.org/jira/browse/WICKET-2568 regards, igor.vaynberg wrote: jira issue please -igor On Mon, Nov 9, 2009 at 5:53 AM, Michael Sparer michael.spa...@gmx.at wrote: Hey, I could have sworn that if a IDataProvider used in a DataView returns 0 as size, the

Re: Force page reload/re-render

2009-11-10 Thread pieter claassen
Hi Ernesto, To recap, I have a control panel visible on each and every page and in that control panel, you can select the appropriate role you want to use. Based on that role some menu items will be visible or not (example below is correct). I am sure this problem has been solved before :-0 as

Re: Force page reload/re-render

2009-11-10 Thread Matthias Keller
Hi Pieter Due to the Java-Nature of Wicket, things done in the constructor are only executed once for this instance. Since F5 only re-renders the instance, the expression setVisible(whatever()) is only executed once. The most dynamic implementation would be to override isVisible() for

Re: Force page reload/re-render

2009-11-10 Thread Pedro
The page will be re-rendered... Implement your menu item componentes isVisible method to return true due your context Enviado de meu iPhone Em 10/11/2009, às 11:39, pieter claassen pieter.claas...@gmail.com escreveu: Hi Ernesto, To recap, I have a control panel visible on each and every

Re: Force page reload/re-render

2009-11-10 Thread Michael O'Cleirigh
Hi Pieter, Components that have .setVisible(false) will never be evaluated again automatically. You need to call .setVisible(true) on all that apply. One way would be control visibility in the base panel by overriding onBeforeRender() to handle all the cases in one place. e.g. class

Mapping an association with Models

2009-11-10 Thread Xavier López
Hi, I'm wondering if I'm doing things straight regarding this subject. I have an Entity A with PK properties a1, a2. There is another entity B with PK properties b1, b2. Between them there is an association class AB (with PK a1, a2, b1, b2). Let's suppose I have a Form for editing A objects, in

Re: Mapping an association with Models

2009-11-10 Thread Xavier López
Hi, Sorry, posted the previous one by error, this is what's missing in the code: class APanel extends Panel(){ private ListB selectedBs; public APanel(){ A a = getA(); ListB choices = getBChoices(); cbmc = new CheckBoxMultipleChoice(id, choices); cbmc.setModel(new

Re: Force page reload/re-render

2009-11-10 Thread pieter claassen
Thanks for all the feedback. onBeforeRender() works like a charm. Pieter On Tue, Nov 10, 2009 at 2:51 PM, Michael O'Cleirigh michael.ocleir...@rivulet.ca wrote: Hi Pieter, Components that have .setVisible(false) will never be evaluated again automatically.  You  need to call

Re: Inheritance strips XML header

2009-11-10 Thread Neil Curzon
Reported WICKET-2569: https://issues.apache.org/jira/browse/WICKET-2569 . I worked around this issue by using a label to render the xml header. On Mon, Nov 9, 2009 at 5:40 PM, Neil Curzon neil.cur...@gmail.com wrote: Hi all, It seems that Wicket 1.4.3 is stripping the XML header when using

Re: Iterate over Pages in Pagemap

2009-11-10 Thread Igor Vaynberg
are you looking to build a breadcrumb-like system? -igor On Mon, Nov 9, 2009 at 11:54 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Hi all, how to iterate over latest version of all pages in pagemap? All my Pages have the ability to reload the navigation, but to

Transaction error dont reach onRuntimeException(Page page, RuntimeException e) method

2009-11-10 Thread Fernando Wermus
Hi all, I am testing transactionability in a site which I am developing. I got to roll back the app in case of a Hibernate DataException, but I couldnt reach my custom request cycle method onRutimeException @Override public Page onRuntimeException(Page page, RuntimeException e) Why is this?

column in listview that is combination of two fields

2009-11-10 Thread Swarnim Ranjitkar
I have a ListView with a requirement that I display one one the column as combination of two fields eg. my cnameID should be cname:id. Is there a way to get the model so that it is Label is combination of two fields or do I have to create a wrapper object for this purpose. ListView = new

Re: column in listview that is combination of two fields

2009-11-10 Thread Pedro Santos
I think you can use an AbstractReadOnlyModel like: getObject{ return testObj.getCname()+testObj.getId(); } On Tue, Nov 10, 2009 at 4:02 PM, Swarnim Ranjitkar swarn...@hotmail.comwrote: I have a ListView with a requirement that I display one one the column as combination of two fields eg. my

org.apachewicket.protocol.http.WebRequestCycleProcessor

2009-11-10 Thread Pamir Erdem
From wicket source code WebRequestCycleProcessor has a lock on session. (Look at the source code below). From a profiler we can easily observe that %57 of the time is spent on this function especially on lock region. Is there any way to speed it up this source code ? /** * @see

Newbie: add spring to wicket quickstart

2009-11-10 Thread Владимир Михайленко
Hello. I just created wicket quickstart project via maven and want add Spring DI to Wicket. So I added to WicketApplication: @Override protected void init() { super.init(); addComponentInstantiationListener(new SpringComponentInjector(this)); } In web.xml I

Re: Newbie: add spring to wicket quickstart

2009-11-10 Thread Pieter Degraeuwe
You are getting this exception from a unittest. When you use WicketTester in combination with Spring injection, you have to tweak it a bit: You have to add the spring applicationContext to the mock ServletContext: Soe here a expect that you already did construct the spring applicationContext.

Re: Autogenerating HTML files ...?

2009-11-10 Thread Ashley Aitken
Thanks All. Igor - I'm a Wicket newbie. When I get more experience I'll see if I can do something along the lines you suggest. For now I just wished to know if it would be possible / sensible. Casper - Sorry I'm a Wicket newbie as well (but I do have experience with some other Web

Re: Scala, dependency injection and wicket

2009-11-10 Thread Ashley Aitken
On 08/10/2009, at 4:42 AM, Alex Rass wrote: And so far: ajax is a pain in the ass that requires explicit work even for a simple form verification (bad architecture there). Is this true? One of my attractions to Wicket was that, hopefully, AJAX was easy (or at least easier) than other

Re: Scala, dependency injection and wicket

2009-11-10 Thread Jeremy Thomerson
On Tue, Nov 10, 2009 at 12:42 PM, Ashley Aitken mrhat...@mac.com wrote: On 08/10/2009, at 4:42 AM, Alex Rass wrote: And so far: ajax is a pain in the ass that requires explicit work even for a simple form verification (bad architecture there). Is this true? One of my attractions to

Proxying SSL on Apache to HTTP on Jetty + Wicket

2009-11-10 Thread Rangel Preis
The situation here is: https http - Apache --- Jetty Using wicket in my WicketApplication I put private static final HttpsConfig HTTPS_CONFIG = new HttpsConfig(HTTP_PORT, HTTPS_PORT); @Override protected IRequestCycleProcessor

Re: Newbie: add spring to wicket quickstart

2009-11-10 Thread Владимир Михайленко
Thank you, now it works. On Tue, Nov 10, 2009 at 8:29 PM, Pieter Degraeuwe pieter.degrae...@systemworks.be wrote: You are getting this exception from a unittest. When you use WicketTester in combination with Spring injection, you have to tweak it a bit: You have to add the spring

Re: DataTable: Can a Cell Know of Its Row or Row Number?

2009-11-10 Thread keithrbennett
Igor - Thanks for the help. I couldn't find a getParent() on the item's class that took a class as a parameter. However, I wrote this, and it worked: /** * Returns the ancestor (Wicket component hierarchy ancestor, not class hierarchy ancestor) * of the specified component that

Re: Transaction error dont reach onRuntimeException(Page page, RuntimeException e) method

2009-11-10 Thread Igor Vaynberg
where is your exception is thrown from? also, check that its not being wrapped in another exception such as a WicketRuntimeException. -igor On Tue, Nov 10, 2009 at 9:57 AM, Fernando Wermus fernando.wer...@gmail.com wrote: Hi all,    I am testing transactionability in a site which I am

Re: org.apachewicket.protocol.http.WebRequestCycleProcessor

2009-11-10 Thread Igor Vaynberg
can you submit a quickstart that reproduces this? the lock on session only blocks concurrent requests from the browser, which is usually not a big deal because most users operate one window at a time. also we do not get the same results in our wicket-threadtest project. -igor On Tue, Nov 10,

editing objects, backed by LoadableDetachableModels

2009-11-10 Thread Pieter Degraeuwe
Hi, I can't imagine that I'm the only one with the following situation. I have a page which edits an 'Employee'. Since I use hibernate and spring I use the LDM togeather with the OpenSessionInView. This works great (==No more LazyLoadExceptions at all...) But The Employee has a propertie

Re: editing objects, backed by LoadableDetachableModels

2009-11-10 Thread pieter claassen
Hi Pieter, I don't use Hibernate, but db4o. The principle however might help you. I inject my factory methods into my pages using Spring (but that is a minor detail) and when I make a change to a domain object, I always store the object first before reloading the page (or in this case,

Re: editing objects, backed by LoadableDetachableModels

2009-11-10 Thread Pieter Degraeuwe
Thanks for your reply. In some situations your solution might be sufficient, but in my situation I'm affraid not... I cannot commit an empty Account in the db due constraint reasons. And, I actually only want to save the Employee in the database when the user presses the ' Save' button, not when

Re: editing objects, backed by LoadableDetachableModels

2009-11-10 Thread Pedro Santos
You can keep the transient account beans in an list on your LDM, and add then to your Employee property on every load... LDM{ List transientAccounts;// get serialized with LDM load(){ Employee e = service.search(id); e.add(transientAccounts); } } On Tue, Nov 10, 2009 at 6:31 PM, Pieter Degraeuwe

Re: editing objects, backed by LoadableDetachableModels

2009-11-10 Thread Pieter Degraeuwe
This is indeed a solution, but I still think I'm doing something wrong. Even simple properties of the Employee (like name) are reloaded from the database for each Ajax request I do (so, I mean: when I change first the name of the Employee and I click on the 'add Account' link, my name-change

Re: Iterate over Pages in Pagemap

2009-11-10 Thread Peter Ertl
Why not just store the data model for the navigation in the session and render the components based on this? Basically you just change the navigation model via CustomSession.get ().getNavigation() and the navigation, breadcrumbs etc. render themselves properly ... Am 10.11.2009 um 17:49

Re: editing objects, backed by LoadableDetachableModels

2009-11-10 Thread pieter claassen
Hi Pieter, Ok, what I do in situations like this is to create a new transient, serializable object (not stored in the DB) and pass it between wicket pages as needed. With db4o, any java object can be stored at some point by calling factory.store(object). Not sure about hibernate. Imagine you

Re: Iterate over Pages in Pagemap

2009-11-10 Thread Igor Vaynberg
nah. the problem with storing navigation in session is that it will get out of sync when the user uses the backbutton. a proper way to construct breadcrumbs is to pass the previous crumb into the new page. the crumb should contain a name and a pagereference to its page. -igor On Tue, Nov 10,

HTTP Status 400 - There are some problems in the request: invalid URLPatternSpec

2009-11-10 Thread David Skuben
Hellou everyone, I use StatelessForm on GlassFish Ent Server 2.1 and I have this prob. When I submit form with method POST and Action url: http://xyz.sk/mymount/wicket:interface/:0:form::IFormSubmitListener:: server send me back status code 400 (There are some problems in the request: invalid

Re: org.apachewicket.protocol.http.WebRequestCycleProcessor

2009-11-10 Thread Pamir Erdem
Hi There are parts in web which make ajax calls. In this situtation on request blocks the piece of code till it returns a value. Do you recommend anything about ajax calls in a web page? Thanks Pamir On Tue, Nov 10, 2009 at 9:28 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: can you submit a

getPage question

2009-11-10 Thread Pamir Erdem
In the attachment you'll see that the regions that intersect with each other indicates that the slowest method execution on stack trace. If you look at Count Delta on getPage method you will see that it equals to 37 which means thatgetPage is executed 37 times in a request. There are too many

Re: org.apachewicket.protocol.http.WebRequestCycleProcessor

2009-11-10 Thread Pamir Erdem
Could you please send me a link that how i can achieve this over wicket ? On Wed, Nov 11, 2009 at 1:18 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: well, its either we lock on the page, or you have to make sure all your code is threadsafe. yes, this can be a problem for a lot of

Re: Proxying SSL on Apache to HTTP on Jetty + Wicket

2009-11-10 Thread Rangel Preis
The unique solution that i found is extends HttpsRequestCycleProcessor to change only the protocol. Any other ideia? Thanks All. 2009/11/10 Rangel Preis rangel...@gmail.com: The situation here is: https                          http -   Apache   --- Jetty Using wicket in my

Re: getPage question

2009-11-10 Thread Pamir Erdem
Again it's related with ajax calls. It coud solve this issue when implementing ajax polls. Thanks On Wed, Nov 11, 2009 at 1:18 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: your attachment never made it through. -igor On Tue, Nov 10, 2009 at 3:12 PM, Pamir Erdem pamir.er...@gmail.com

Re: getPage question

2009-11-10 Thread Igor Vaynberg
37 getpage() calls should be no big deal. even a 100. -igor On Tue, Nov 10, 2009 at 3:27 PM, Pamir Erdem pamir.er...@gmail.com wrote: Again it's related with ajax calls. It coud solve this issue when implementing ajax polls. Thanks On Wed, Nov 11, 2009 at 1:18 AM, Igor Vaynberg

Re: org.apachewicket.protocol.http.WebRequestCycleProcessor

2009-11-10 Thread Igor Vaynberg
search this list, google it. this has been answered on this list multiple times. -igor On Tue, Nov 10, 2009 at 3:22 PM, Pamir Erdem pamir.er...@gmail.com wrote: Could you please send me a link that  how i can achieve this over wicket ? On Wed, Nov 11, 2009 at 1:18 AM, Igor Vaynberg

Re: getPage question

2009-11-10 Thread Igor Vaynberg
your attachment never made it through. -igor On Tue, Nov 10, 2009 at 3:12 PM, Pamir Erdem pamir.er...@gmail.com wrote: In the attachment you'll see that the regions that intersect with each other indicates that the slowest method execution on stack trace. If you look at Count Delta on getPage

Re: org.apachewicket.protocol.http.WebRequestCycleProcessor

2009-11-10 Thread Igor Vaynberg
well, its either we lock on the page, or you have to make sure all your code is threadsafe. yes, this can be a problem for a lot of concurrent ajax requests, you just have to make sure your responses are fast. eg if you have a time-consuming operation do it in a background thread and make ajax

Re: HTTP Status 400 - There are some problems in the request: invalid URLPatternSpec

2009-11-10 Thread Igor Vaynberg
there should be a way for you to relax your server's checks, that is a little crazy. -igor On Tue, Nov 10, 2009 at 2:02 PM, David Skuben david.sku...@gmail.com wrote: Hellou everyone, I use StatelessForm on GlassFish Ent Server 2.1 and I have this prob. When I submit form with method POST and

another serialization question

2009-11-10 Thread Sam Barrow
One more question about serializing objects. I have a page in the application that I'm working on that calls an application service which returns a collection of objects of a type I'll call ValueObject (not serializable). ValueObject has many subclasses (which are of no concern to my wicket ui,

Re: another serialization question

2009-11-10 Thread James Carman
ValueObjects (if you're following the design pattern) should be serializable. On Tue, Nov 10, 2009 at 10:03 PM, Sam Barrow s...@sambarrow.com wrote: One more question about serializing objects. I have a page in the application that I'm working on that calls an application service which

Re: another serialization question

2009-11-10 Thread Sam Barrow
But some the ValueObject classes contain a reference to an entity. Keep in mind I mean ValueObject in the context of domain driven design, not a DTO / data transfer object. On Tue, 2009-11-10 at 22:12 -0500, James Carman wrote: ValueObjects (if you're following the design pattern) should be

correct way to call necessary javascript initialization when a component is added via ajax

2009-11-10 Thread Peter Ross
Hi, I'm implementing a control which consists of an integer field and a slider where the slider comes from jquery UI. My question is that whenever the component is refreshed via ajax, you need to call the js initialization function. I've done this by adding a behaviour which determines the

Re: another serialization question

2009-11-10 Thread James Carman
Are you designing these value objects from scratch? Do you have control over them? Then, why are you averse to making them serializable? If you have a valid reason to not make them serializable, then why not go with the DTO pattern and just figure out a way to copy the attributes back and forth

Re: another serialization question

2009-11-10 Thread Sam Barrow
I cannot make them serializable I don't have control over them. But even if I did I couldn't because the valueobject has a reference to an entity which cannot be serializable. The project also uses db4o which would make it much harder to use a serialized version. Is dtos the best/only way? It

Re: correct way to call necessary javascript initialization when a component is added via ajax

2009-11-10 Thread Jeremy Thomerson
Yes - this looks fine. There are multiple ways of accomplishing it, but this one is fine. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Nov 10, 2009 at 10:38 PM, Peter Ross p...@missioncriticalit.comwrote: Hi, I'm implementing a control which consists of an integer field and a

Re: correct way to call necessary javascript initialization when a component is added via ajax

2009-11-10 Thread Peter Ross
On Wed, Nov 11, 2009 at 3:48 PM, Jeremy Thomerson jer...@wickettraining.com wrote: On Tue, Nov 10, 2009 at 10:38 PM, Peter Ross p...@missioncriticalit.comwrote: Hi, I'm implementing a control which consists of an integer field and a slider where the slider comes from jquery UI. My

Re: another serialization question

2009-11-10 Thread James Carman
Can you go through the entity to get to these objects? Meaning, can you set up and LDM to get the root entity object and then traverse to get to the value object you're interested in? If so, then you can try to come up with some property path to get you there and use that to refer to the

Re: Wicket and JQuery

2009-11-10 Thread Peter Ross
On Wed, Oct 28, 2009 at 5:08 PM, Jason Novotny wrote: Martin Makundi wrote: ... and expect trouble with ajaxifying jquery plugins that skin html components. They will not work properly if you replace your components via ajax - or at least you might have to work hard on it. Bingo!! I've

Re: another serialization question

2009-11-10 Thread Sam Barrow
The value objects are not simple attributes of an entity. Let me explain what they do (a little simplified but the fundamentals are there). We have a research module that performs pricing research. ResearchItem CellPhoneResearchItem IPodResearchItem LaptopResearchItem Etc Since the