Layering / Data-access with Wicket

2008-02-18 Thread Bert Radke
Hi all, i 'm evaluating wicket right now with a small project using JPA (Hibernate) as datalayer. Together with the "Wicket in Action" (great book so far, thanks), i could implement most of the wished features (templating, custom components, ..) but i 'm kind of stuck with the proper layering of t

Re: comunication between panels

2008-02-18 Thread Matthijs Wensveen
Timo Rantalaiho wrote: On Mon, 18 Feb 2008, Mazzanti Luca wrote: i have a question: how can i comunicate between panels in wicket? The normal Wicket way is to share models, pass references etc, but it has its limitations. You can find an example of a push-type mechanism here htt

Re: Tabular form validation problem

2008-02-18 Thread Igor Vaynberg
first step is to call listview.setreuseitems(true), that will get rid of the disappearing input on invalidation. please read listview javadoc. -igor On Feb 18, 2008 9:23 PM, Martin Makundi <[EMAIL PROTECTED]> wrote: > Hi! > > I have a simple html table with checkboxes and input text fields. My >

Tabular form validation problem

2008-02-18 Thread Martin Makundi
Hi! I have a simple html table with checkboxes and input text fields. My goal is to validate that if the checkbox on the row is selected, the respective input field should contain text. And vice versa, if the input field contains text, the checkbox should be checked. I have now constructed a near

Re: AJAX validation and multiple requests

2008-02-18 Thread Timo Rantalaiho
On Mon, 18 Feb 2008, Federico Fanton wrote: > I have an Ajax "editable table" made with rows of custom components > similar to AjaxEditableLabel, that while in "edit mode" use a behavior ... > Any hint on how I could handle this? Should I put a flag somewhere? Or > maybe there's a way to stop the s

Re: [wicket-spring] Best Practices...

2008-02-18 Thread Timo Rantalaiho
On Mon, 18 Feb 2008, James Carman wrote: > Doesn't that go against the whole idea of Dependency Injection (the > "Hollywood Principle")? Objects needing their dependencies shouldn't > have to ask to be injected. I thought so at first, but later on (and after using this extensively) I have realise

Re: Spring injecting beans into non-component classes

2008-02-18 Thread Igor Vaynberg
add this to the constructor of the class you want injected: InjectorHolder.getInjector().inject(this); -igor On Feb 18, 2008 7:37 PM, Warren <[EMAIL PROTECTED]> wrote: > I am using Spring to manage my Services and DAOs. Is there a special Wicket > way of injecting my beans into non component cla

Spring injecting beans into non-component classes

2008-02-18 Thread Warren
I am using Spring to manage my Services and DAOs. Is there a special Wicket way of injecting my beans into non component classes? I've seen the example in Kent Ka Iok Tong's book of extending SpringWebApplication: public class MyApp extends SpringWebApplication { ... @Override protected void init(

Re: Form.getMethod() throws Exception

2008-02-18 Thread [EMAIL PROTECTED]
Ah. Thank you very much. /Jörgen Martijn Dashorst skrev: Remember: Wicket is a stateful framework, so you don't have to apply REST-like stuff. if you don't want to. setResponsePage(new MySuperSecretHidingPage(supersecretpassword)); with: public class MySuperSecretHidingPage extends WebPage {

Re: Form.getMethod() throws Exception

2008-02-18 Thread Martijn Dashorst
Remember: Wicket is a stateful framework, so you don't have to apply REST-like stuff. if you don't want to. setResponsePage(new MySuperSecretHidingPage(supersecretpassword)); with: public class MySuperSecretHidingPage extends WebPage { public MySuperSecretHidingPage(String password) { }

Re: Form.getMethod() throws Exception

2008-02-18 Thread [EMAIL PROTECTED]
Sorry that I was not clear enough. Even though I have a specific scenario in my application, the question is more general. Let me rephrase what I'm after. I want to avoid whatever parameters I submit to my response page from being displayed in the browsers url field. For instance, if my submi

Re: Where is DatePicker in 1.3.1?

2008-02-18 Thread Alan Romaniuc
DatePicker is located in wicket-datetime package. Same goes for 1.3.0 On Feb 18, 2008 8:16 PM, MYoung <[EMAIL PROTECTED]> wrote: > > Hello, I'm using 1.3.1 and I cannot find > org.apache.wicket.extensions.yui.calendar.DatePicker. What happen to it? > -- > View this message in context: > http:/

Where is DatePicker in 1.3.1?

2008-02-18 Thread MYoung
Hello, I'm using 1.3.1 and I cannot find org.apache.wicket.extensions.yui.calendar.DatePicker. What happen to it? -- View this message in context: http://www.nabble.com/Where-is-DatePicker-in-1.3.1--tp15550392p15550392.html Sent from the Wicket - User mailing list archive at Nabble.com. -

Re: inmethod grid links?

2008-02-18 Thread madx
Is there an example to see how i can add a link to a cell item? Thanks ryantxu wrote: > > yes, latest from svn > mvn clean install > > thanks > ryan > > > Matej Knopp wrote: >> Hi, >> >> that would be a bug, are you using latest svn version? >> >> -Matej >> >> On Feb 5, 2008 12:16 AM, Ryan

Re: Form.getMethod() throws Exception

2008-02-18 Thread Martijn Dashorst
I don't understand what you are trying to achieve. setResponsePage goes to another page. If you don't want to go to another page, then don't set response page. Martijn On 2/18/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Ah, so I was half correct ;) > > What is the best practice to get aro

Re: Form.getMethod() throws Exception

2008-02-18 Thread [EMAIL PROTECTED]
Ah, so I was half correct ;) What is the best practice to get around this? Should I store my parameters in my Session class and pick them up again when in MyResponseClass? And one more thing. Sorry for not signing my earlier mails. Thanks for your help. BR, Jörgen Henrik Lundahl skrev: H

Re: Form.getMethod() throws Exception

2008-02-18 Thread Henrik Lundahl
Hi The parameters are left out of the request URL in the request that brings you to the onSubmit method, but the response URL will contain the PageParameters you set for the MyResponseClass page. BR, Henrik Lundahl 2008/2/18, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Hello. > > It was just f

Re: Form.getMethod() throws Exception

2008-02-18 Thread [EMAIL PROTECTED]
Hello. It was just for debugging purposes. I wanted to see if I used GET or POST. I know from the code that POST is used as default (unless stated otherwise in the markup), but I just wanted it confirmed. With my very limited (next to nothing) knowledge about web coding in general I thought

Re: Form.getMethod() throws Exception

2008-02-18 Thread Martijn Dashorst
Don't call this method in a constructor. The component isn't added to the page yet, and therefore doesn't know its markup causing it to fail to find the method="foo" tag. Why do you want to call this method in a constructor? Martijn On 2/18/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hel

Form.getMethod() throws Exception

2008-02-18 Thread [EMAIL PROTECTED]
Hello all. When calling the getMethod from a subclass of a Form component an exception is thrown. When looking in the code I see the following comment just before the exception is thrown in Component.java: // This should never happen since Page always has associated markup If I out comment th

Re: wicket-security Custom Access Denied Page

2008-02-18 Thread Maurice Marrink
I am updating the hive api to allow this sort of questions and in the process am making most of the methods final. This means the HiveExtensionTest won't compile anymore so i have copied the relevant bits here and in the process rewritten the test so that it should work on 1.3.0 as well public voi

Re: [wicket-spring] Best Practices...

2008-02-18 Thread James Carman
I like the fact that it's unmanaged out of the box since it doesn't tie you to an IoC/DI container (one of the big gripes about Tapestry from folks), but I would like some of that managed part back (for those of us who actually like it). It would be nice if the Application class was more bean-like

Re: [wicket-spring] Best Practices...

2008-02-18 Thread Igor Vaynberg
wicket, unlike tapestry, is an unmanaged framework. that means you instantiate objects yourself when you need them using the new operator, not ask some factory for an instance. we are big on using constructors in wicket, cause you know...object and all that junk. di frameworks pretty much kill cons

Re: Error handling for RuntimeExceptions during page construction

2008-02-18 Thread Martijn Dashorst
It depends on the deployment setting what you will see. Take a look at the wicket in action examples (http://wicketinaction.googlecode.com), currently chapter 15 (soon to become chapter 14). Martijn On 2/18/08, Doug Leeper <[EMAIL PROTECTED]> wrote: > > I would like to display a common error pag

Re: [wicket-spring] Best Practices...

2008-02-18 Thread James Carman
Doesn't that go against the whole idea of Dependency Injection (the "Hollywood Principle")? Objects needing their dependencies shouldn't have to ask to be injected. On 2/18/08, Timo Rantalaiho <[EMAIL PROTECTED]> wrote: > On Mon, 18 Feb 2008, James Carman wrote: > > Some of the things that I need

Re: [wicket-spring] Best Practices...

2008-02-18 Thread Timo Rantalaiho
On Mon, 18 Feb 2008, James Carman wrote: > Some of the things that I need to have injected aren't being injected > into "components." For instance, I'm working on an In those cases you can do still use @SpringBean from wicket-spring in that class and call InjectorHolder.getInjector().inject(t

Re: [wicket-spring] Best Practices...

2008-02-18 Thread James Carman
Some of the things that I need to have injected aren't being injected into "components." For instance, I'm working on an AcegiAuthorizationStrategy which is going to require an AuthenticationProvider from Acegi. I suppose I could look up the AuthenticationProvider in my web application class and

Re: [wicket-spring] Best Practices...

2008-02-18 Thread Timo Rantalaiho
On Mon, 18 Feb 2008, James Carman wrote: > If I want to use wicket-spring, but I want to try to let Spring wire > everything together, what is the best way to do so? I realize that I think that it's not a good idea to try to configure Wicket using Spring (what would be the added value?) but just

Error handling for RuntimeExceptions during page construction

2008-02-18 Thread Doug Leeper
I would like to display a common error page when ever there is a problem (aka RuntimeException) in a Page's constructor. I thought by calling getApplicationSettings().setInternalErrorPage(ErrorPage.class); in the Application.init class would do the trick...but that is not the case. Our scenario

[wicket-spring] Best Practices...

2008-02-18 Thread James Carman
If I want to use wicket-spring, but I want to try to let Spring wire everything together, what is the best way to do so? I realize that there is the SpringWebApplicationFactory class, but that merely looks up the application in the Spring context. The WebApplication class isn't very "beany" thoug

Customizing Palette

2008-02-18 Thread Fernando Wermus
Hi all, I've customized the Palette component. I need the items with some images and some text boxes inside each of it. Therefore, I replaced the select and option tag for ul and li ones. But I realized that the recorder get the value property from the 'li'. Despite I add the attribute va

Re: Exception redirecting to source page

2008-02-18 Thread Igor Vaynberg
good. there are some internals that do not count on a runtime exception being thrown because of user code...for example throwing it out of something like validator will abort entire form processing, and might leave that particular form component in an inconsistent state. but throwing it out of oncl

Re: AJAX validation and multiple requests

2008-02-18 Thread Igor Vaynberg
one way would be to keep a boolean somewhere that marks if the component is valid or not...but if i were you i would figure out why the two requests are fired and how to avoid it. can it be that your enter key handler does not return false as the last thing and so doesnt cancel browser's processing

Re: IDataProvider and Hibernate Search

2008-02-18 Thread Java Programmer
Finally I got it - I use such DataProvider: private class SearchDataProvider implements IDataProvider { private String query; private int resultsPerPage; private SearchDAO.SearchResults search

Re: Exception redirecting to source page

2008-02-18 Thread Cristiano Kliemann
Igor, It seems to work with Link.onClick also. Cristiano Kliemann wrote: > > Yes, it works, at least when the exception is thrown in Button.onSubmit. I > haven't tried with Link.onClick. > > > igor.vaynberg wrote: >> >> have you tried it and does it work? >> >> -igor >> >> >> On Feb 15,

Re: IDataProvider and Hibernate Search

2008-02-18 Thread Java Programmer
On Mon, Feb 18, 2008 at 4:29 PM, Ryan Gravener <[EMAIL PROTECTED]> wrote: > You could keep an instance of the search results in the dataprovider. > Then on size() and iterator() check to see if results is null. If it > is perform the query and store the results Yes, I tried this before and I wo

Re: IDataProvider and Hibernate Search

2008-02-18 Thread Ryan Gravener
You could keep an instance of the search results in the dataprovider. Then on size() and iterator() check to see if results is null. If it is perform the query and store the results ie: add this to your searchdataprovider private transient SearchResults results; private void searchIfNecessary(

Re: comunication between panels

2008-02-18 Thread Martijn Dashorst
On 2/18/08, Mazzanti Luca <[EMAIL PROTECTED]> wrote: > > i don't understand your phrase: 'why are you shouting' > please repeate. http://www.google.com/search?hl=en&client=safari&rls=en&q=using+uppercase+in+email+message&btnG=Search -- Buy Wicket in Action: http://manning.com/dashorst Apache Wic

AJAX validation and multiple requests

2008-02-18 Thread Federico Fanton
Hi everyone! I'm having a little problem.. I have an Ajax "editable table" made with rows of custom components similar to AjaxEditableLabel, that while in "edit mode" use a behavior like this one: protected class EditorBehavior extends AbstractDefaultAjaxBehavior{ @Override protected void o

IDataProvider and Hibernate Search

2008-02-18 Thread Java Programmer
Hello, I want to use DataView to present Search Results from Hibernate Search, but I got stuck with implementation of DataProvider - maybe first I show you classes: private class SearchDataProvider implements IDataProvider { private String query;

Re: self refreshing table with effects

2008-02-18 Thread Maurice Marrink
If you have your dao always return the top x rows ordered by creation date the newest will always be at index 0. in onpopulate you can check if the creation date is within the last 5 sec and then apply a css style or whatever to achieve your effect. Attach the AjaxSelfUpdatingTimerBehavior to a Web

self refreshing table with effects

2008-02-18 Thread okrohne
Hi, I am new to Wicket and I think of how to achieve the following: I need a table which refreshes itself every 5 sec. This could be done with AjaxSelfUpdatingTimerBehavior. The refresh mechanismen shall only insert new rows at the beginning (there will be always only 1 new row in a 5 sec perio

Re: comunication between panels

2008-02-18 Thread Thomas Lutz
Mazzanti Luca schrieb: i don't understand your phrase: 'why are you shouting' please repeate. writing uppercase -> shouting have a look at http://www.dtcc.edu/cs/rfc1855.html and search for shouting... regards, tom - To

Re: comunication between panels

2008-02-18 Thread Timo Rantalaiho
On Mon, 18 Feb 2008, Mazzanti Luca wrote: > ok i store in session only objects that contain the state of the page, and i > pass it to the model of the page. Wicket components (including Page) are stateful, you don't need to do that by yourself. To keep the state you just need to use the same page

Re: comunication between panels

2008-02-18 Thread Mazzanti Luca
ok i store in session only objects that contain the state of the page, and i pass it to the model of the page. what about PageState? i must watch WebPage source to find where is used and i modify it to load only data that i really need or there's yet an implementation of this that i can use? and

Re: comunication between panels

2008-02-18 Thread Timo Rantalaiho
On Mon, 18 Feb 2008, Mazzanti Luca wrote: > on the left i have a page containg a wicket tree. on the right another page > containing a panel. > on click of a node in the tree, i need to send the object in the node to the > panel ( called panel2 ) in the other page, and reload panel with new > infor

Re: comunication between panels

2008-02-18 Thread Timo Rantalaiho
On Mon, 18 Feb 2008, Mazzanti Luca wrote: > i have a question: how can i comunicate between panels in wicket? The normal Wicket way is to share models, pass references etc, but it has its limitations. You can find an example of a push-type mechanism here https://issues.apache.org/jira/browse

Re: comunication between panels

2008-02-18 Thread Ayodeji Aladejebi
Panel A puts the state information in the session during Link.onClick() Panel B uses Session.getSession() to retrieve the state information during render() this simple technique is what i use and its very efficient. On 2/18/08, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote: > > panels in session

Re: comunication between panels

2008-02-18 Thread Ayodeji Aladejebi
panels in session is a bad idea. Why not just keep the panel state information in the session and then let them just pull it from there when they instantiate? By the way, what are you trying to achieve with your panels cuz it is a bad idea to be stuffing up panels in your session when you can si

Re: comunication between panels

2008-02-18 Thread Mazzanti Luca
i don't understand your phrase: 'why are you shouting' please repeate. sorry i don' have a very large vocaboulary. But please help me solving this. the situation is: on the left i have a page containg a wicket tree. on the right another page containing a panel. on click of a node in the tree,

Re: comunication between panels

2008-02-18 Thread Martijn Dashorst
WHY ARE YOU SHOUTING? Martijn On 2/18/08, Mazzanti Luca <[EMAIL PROTECTED]> wrote: > > i have a question: how can i comunicate between panels in wicket? > > my application contains a frameset of 2 pages, each of these has a > tabbedPanel containing many panels: > structure

comunication between panels

2008-02-18 Thread Mazzanti Luca
i have a question: how can i comunicate between panels in wicket? my application contains a frameset of 2 pages, each of these has a tabbedPanel containing many panels: structure-- APP PAGE1 PAG2 panel panel pane

Re: annotated class

2008-02-18 Thread freak182
Hello, Thank you guys for the reply...I finally got to work...i have same configuration but there is one jar file not imported by the maven tool...that might be the problem bcoz when i removed it, it run smoothly..Thanks a lot..anyway, i have a copy of Wicket in Action MEAP to guide me :) Cheers.

Re: AjaxEditableLabel in 1.3.0

2008-02-18 Thread Johan Compagner
yes i see that https://issues.apache.org/jira/browse/WICKET-1239 is really only fixed for 1.3.2 johan On Feb 18, 2008 10:27 AM, Per Ejeklint <[EMAIL PROTECTED]> wrote: > > Yes: > > java.lang.IllegalAccessError: tried to access method > org.apache.wicket.Component.onModelChanging()V from class

Re: AjaxEditableLabel in 1.3.0

2008-02-18 Thread Per Ejeklint
Yes: java.lang.IllegalAccessError: tried to access method org.apache.wicket.Component.onModelChanging()V from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 Aha, I just downloaded the source for 1.3.1 and checked. The 1.3.1 release does NOT contain the small fix I sugges

Re: A subproject for Just Model State

2008-02-18 Thread Johan Compagner
cant you just use the LoadableDetachableModel and use load() to get the stuff from the session? And on detach you put it back in again (and call dirty() on session) johan On Feb 17, 2008 4:29 PM, demirr <[EMAIL PROTECTED]> wrote: > > Hi, i'm on a project which consists mostly of stateless pag

Re: wicketstuff-rome and authentification.

2008-02-18 Thread Murat Yücel
My feed was a shared resource just like the wicketstuff-rome example. I have changed it to be a page, so now i can add wicket authentification. http://www.jroller.com/wireframe/entry/wicket_feedpage /Murat 2008/2/15, Maurice Marrink <[EMAIL PROTECTED]>: > > Why not use a filter? > Wicket uses the

Re: AjaxEditableLabel in 1.3.0

2008-02-18 Thread Johan Compagner
Is the error exactly the same? On 2/18/08, Per Ejeklint <[EMAIL PROTECTED]> wrote: > > This is very odd, I just tested with a clean 1.3.1-based build of my test > app. It works fine on one machine but not on the other! Same code, one > running in Jetty on a MBP (does not work), one running in Glas

Re: AjaxEditableLabel in 1.3.0

2008-02-18 Thread Per Ejeklint
This is very odd, I just tested with a clean 1.3.1-based build of my test app. It works fine on one machine but not on the other! Same code, one running in Jetty on a MBP (does not work), one running in GlassFish on a Mac mini (works just fine). Same Java versions on the machines. So maybe it isn

Re: org.apache.wicket.protocol.http.WebSession cannot be cast to my.CustomSession

2008-02-18 Thread Sven Schliesing
I switched over to using an anonymous overridden WebApplication: -- WebApplication webApplication = new WebApplication() { @Override public Session newSession(Request request, Response response) { return new CustomSession(request); }

Re: wicket-security Custom Access Denied Page

2008-02-18 Thread Maurice Marrink
The code is on wicketstuff svn https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/swarm-parent/hive/src/test/java/org/apache/wicket/security/hive/HiveExtensionTest.java Perhaps if you can show me in a similar test setup how your code is failing we might figure out