AW: Page Expired with back button

2010-07-14 Thread Christian Helmbold
te a simple application that shows the problem and > attach it to Jira ticket. > > > On Tue, 2010-07-13 at 07:38 -0700, Christian Helmbold wrote: > > Hello, > > > > when I go back to the previous page with the browsers back button and > > click >on a

Page Expired with back button

2010-07-13 Thread Christian Helmbold
Hello, when I go back to the previous page with the browsers back button and click on a link on that page, I get every time a page expired error. It seems like Wicket loses the session, since all other actions in the application then results in an expired error. I've looked if the number of

How to validate unique constraint?

2009-05-19 Thread Christian Helmbold
How can I validate a unique constraint with Wicket? Because only the value of an input field is passed to onValidate(IValidatable validatable), there is no chance to check if this value belongs to a specific object to update or if it would violate a unique constraint when creating a new object.

AW: AW: Object without ID in LoadableDetachableModels

2009-05-12 Thread Christian Helmbold
One line was missing in the first constructor. Here is the corrected constructor: public EntityModel(T entity) { this.entity = entity; entityClass = entity.getClass(); entityId = getEntityId(); } - To unsubscribe

AW: Object without ID in LoadableDetachableModels

2009-05-12 Thread Christian Helmbold
Inspired by http://wicketinaction.com/2008/09/building-a-smart-entitymodel/ I created an EntityModel based on JPA annotations. Maybe this is helpful for somebody with the same question. Any suggestions to improve the code? EntityModel.java -

AW: AW: [announce] Wicket 1.4-rc4 released

2009-05-11 Thread Christian Helmbold
A link to 1.4 RC4 is missing on http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc2 too. - Ursprüngliche Mail > Von: Christian Helmbold > An: users@wicket.apache.org > Gesendet: Montag, den 11. Mai 2009, 23:09:26 Uhr > Betreff: AW: [announce] Wicket 1.4-rc4 released

AW: [announce] Wicket 1.4-rc4 released

2009-05-11 Thread Christian Helmbold
Why don't you mention the availability of Wicket 1.4 RC 4 on http://wicket.apache.org? Regards, Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apac

AW: Object without ID in LoadableDetachableModels

2009-05-09 Thread Christian Helmbold
Thank you, Igor. This looks useful to me. The interesting part seems to be: public void detach() { if (entity != null) { if (entity.getId() != null) { id = entity.getId(); entity = null; } } } The id is set while detaching and at then t

Object without ID in LoadableDetachableModels

2009-05-08 Thread Christian Helmbold
Domain (or model) objects get their IDs from Hibernate on saving in my application. When I create a new LoadableDetachableModel with a fresh model object without an ID, the LoadableDetachableModel object contains no ID to load the model object from the DB on the next request. Because LoadableD

AW: How to avoid code duplication on forms?

2009-05-08 Thread Christian Helmbold
I think the difference between sub classing and static factory methods is a matter of taste in this case. If I have many fields, I'd need many classes for them. So I'd group them in a sub package. In the case of factory methods I'd group the methods to create fields in a class instead of a pac

How to avoid code duplication on forms?

2009-05-07 Thread Christian Helmbold
Hello, Wicket uses input validation on the presentation layer. This leads often to code duplication and I'm looking for a way to avoid it. Example: I have a registration form where you fill in your first and last name, password and so on. Every field has its restrictions like max length or re

AW: Lazy Open Session In View with AOP

2009-05-07 Thread Christian Helmbold
Thanks for your answer, James. I try to understand magic things. The missing peace in the puzzle was the difference between Hibernates openSession() and getCurrentSession(). More than one transaction within one session seems only to be possible with openSession() and manual flushing and closin

AW: Lazy Open Session In View with AOP

2009-05-06 Thread Christian Helmbold
Thanks for this hint. The Spring API doc says: "If set to "false", each data access operation or transaction will use its own session (like without Open Session in View). Each of those sessions will be registered for deferred close, though, actually processed at request completion." http://

AW: Lazy Open Session In View with AOP

2009-05-06 Thread Christian Helmbold
Thanks for your answer. I know the OpenSessionInViewFilterfrom Spring, but it opens a new Hibernate Session for every request even if you request an image. - Ursprüngliche Mail > Von: Carlo Camerino > An: users@wicket.apache.org > Gesendet: Mittwoch, den 6. Mai 2009, 20:33:44 Uhr >

Lazy Open Session In View with AOP

2009-05-06 Thread Christian Helmbold
Hello, I want to use the Open Session In View Pattern with Wicket, but I don't want to open a Hibernate Session for every request like the ServletFilter approach does. I looked at the "lazy-loading Open Session in View" for JPA implementation from Wille Faler. http://faler.wordpress.com/2009/

AW: How to switch Panels with a Tree?

2009-04-02 Thread Christian Helmbold
Thank you, Igor. selectedPanel=currentPanel was the solution to my issue. Regards Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

AW: Extending wicket for non webapp implementations

2009-04-01 Thread Christian Helmbold
Why don't you use a template engine like FreeMarker? I think Wickets component model doesn't work well to create E-Mails. Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e

How to switch Panels with a Tree?

2009-04-01 Thread Christian Helmbold
Hello, I want to switch panels with a tree (like switching panels within a TabbedPanel), but get an error when clicking more than once on a node. It should look like this: +-+ | (TreePanel) | | +-+

AW: VOTE: Rename Apache Wicket to Apache WicketFX

2009-04-01 Thread Christian Helmbold
-1, don't accept above resolution, because ... I find FX is just a temporary fashion. In a few years "FX" is history like "J2EE" is. Don't follow every trend. Keep the name short and simple, keep "Wicket"! Christian - To

AW: VOTE: Rename Apache Wicket to Apache WicketFX

2009-04-01 Thread Christian Helmbold
> I still liked the other name suggestion "jdave-wicket-webdriver-wicket-fx" Is it a joke? What's wrong with "wicket"? I find both name suggestions ugly. Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.

AW: Tree navigation panel

2009-03-31 Thread Christian Helmbold
I was confused by the example with the tree and nested panels and thought that the code for the nested panels would be necessary for the tree. It would be better to focus the examples on exactly one problem. org.apache.wicket..extensions.markup.html.tree.Tree is what I was looking for. Clickin

AW: Tree navigation panel

2009-03-31 Thread Christian Helmbold
Thank you, Igor. Do you mean http://www.wicket-library.com/wicket-examples/ajax/tree/simple.2 ? It doesn't work without JavaScript. Is there another easy to use tree component? Regards, Christian - To unsubscribe, e-mail:

Tree navigation panel

2009-03-30 Thread Christian Helmbold
Hello, I'm looking for a tree navigation panel for wicket (1.4). I know the AJAX panel, but I'd like to have something that works without JavaScript. After consulting the API docs and looking for tree classes, I think to write my own navigation tree panel would cost a couple of hours. So is th

AW: Formatting TabbedPanel with CSS

2009-03-27 Thread Christian Helmbold
As I found out that setting the css-class works, but at the wrong place. The css-class attribute is added to the surrounding container and not to the tabbed panel. The following html code will be replaced by the tabbed panel: Reiter And this is the rendered result: Wicket constructs anothe

Formatting TabbedPanel with CSS

2009-03-27 Thread Christian Helmbold
Hello, I have a page with a TabbedPanel and want to use my own css class names for formatting. I tried to use a SimpleAttributeModifier to change the class attribute of the rendered html tag, but with no effect. Then I tried to use the following code: tabbedPanel.add(new AttributeModifier("cla

AW: AW: Bean Validation and Wicket

2009-03-27 Thread Christian Helmbold
> There seems to be no activity in this issue. I think it would be worse to > spend > some work for JSR 303 support Uups, I mean "worth" :-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional co

AW: Bean Validation and Wicket

2009-03-27 Thread Christian Helmbold
Support for JSR 303 Bean Validation in Wicket was discussed three years ago.. http://www.nabble.com/JSR-303:-Bean-Validation---Anyone-following-this--td5288109.html See comment from Eelco here: http://raibledesigns.com/rd/entry/validation_framework_consolidation#comments There seems to be no ac

How to secure a Wicket 1.4 application?

2009-03-26 Thread Christian Helmbold
Hello, what would be your prefered way to secure a Wicket 1.4 application? "Spring Security and Wicket-auth-roles" seems to be outdated. This project suggests to use Wicket-Security. So it is presumably not the best idea to use it. http://cwiki.apache.org/WICKET/spring-security-and-wicket-aut

AW: Is it possible to have some sort of a controller in wicket

2009-03-12 Thread Christian Helmbold
You could use a different Servlet or ServletFilter as the central entry point for requests and redirect to bookmarkable Wicket-Pages. But to access a wicket session via HttpServlet interface from the outside is not exactly was is called elegant. > 2) Also is it possible to map the tabs of the

Why to set a model to a form?

2009-03-12 Thread Christian Helmbold
Hello, I wonder why I should set a model to a form, if every form field just holds a reference to the (same) model. Take a look at an example from Wicket in Action (page 91): public class MyForm extends Form { public MyForm(String id) { super(id); Customer customer = new Customer();

AW: AW: Tabbed Panel with bookmarkable links

2009-03-12 Thread Christian Helmbold
The development of the bookmarkable tabbed panel component is continued on http://wicketskunkworks.org. We decided to use a Google Code project for now but we plan to make the final component available via wicket stuff or maybe in the extensions tree of the core distribution (i don't know if th

AW: AW: Tabbed Panel with bookmarkable links

2009-03-10 Thread Christian Helmbold
In my code were two little bugs. If the constructor with parameter "defaultTabIndex" was used, the active tab was always set to this value regardless what tab the use clicked on. The other issue affected the specified parameter name that stores the active tab. It did not work in the constructor

AW: Tabbed Panel with bookmarkable links

2009-03-10 Thread Christian Helmbold
The problem is that the tabbed panels have to know the state of other panels to generate correct stateful links. So we need some object that keeps track of all tabbed panels and their states. This object must be initialized before the newLink method is called. But this method is called during c

AW: AW: Tabbed Panel with bookmarkable links

2009-03-10 Thread Christian Helmbold
> Instead of competing, why don't we set up a project some place and check both > solutions in under different packages? > We can then refactor them into one and take the best of both :) I agree. Is there an existing place in the wicket project to do this? I've discovered some troubles in my so

AW: AW: Tabbed Panel with bookmarkable links

2009-03-10 Thread Christian Helmbold
> > What if you use two different tabbed panels on the same page? > > Good point! It doesn't work with two panels on the same page! I don't know > why > and how to fix it. It was a mistake in my test code, that lead to this error. I accidentally added the tabs of my second tabbed panel to th

AW: Tabbed Panel with bookmarkable links

2009-03-10 Thread Christian Helmbold
> What if you use two different tabbed panels on the same page? Good point! It doesn't work with two panels on the same page! I don't know why and how to fix it. WicketMessage: Error attaching this container for rendering: [Page class = com.helmbold.wicki.view.ArticlePage, id = 2, version = 0

AW: Tabbed Panel with bookmarkable links

2009-03-10 Thread Christian Helmbold
> Since others seem to need it, this might be worth refining over on > wicket-stuff. I think it's worth to build a universal bookmarkable tabbed panel. Brill, please post your solution so we can look what is better in your or in my solution and built the ultimative BookmarkableTabbedPanel. I

Tabbed Panel with bookmarkable links

2009-03-09 Thread Christian Helmbold
Hello, I've written a component which provides bookmarkable links for a tabbed panel. The link to the currend tab is disabled and the url to the default tab contains no tab information to keep URLs short. It works so far, but since this is my first wicket component I'd like to know your sugg

AW: NullPointerExceptions due to missing Spring constructor injection

2009-02-28 Thread Christian Helmbold
> factor out an init method that both constructors call. Thanks for you help. I've found this solution with the approved trial-and-error method during you wrote me. Regards Christian - To unsubscribe, e-mail: users-unsubsc

AW: NullPointerExceptions due to missing Spring constructor injection - Solution

2009-02-28 Thread Christian Helmbold
Excuse my bit by bit mailings but I don't want to keep the solution secret. The problem with my first try was the missing implicit call to super() within the constructor because I used this() instead. The line InjectorHolder.getInjector().inject(this); is not necessary when I put the code in a se

NullPointerExceptions due to missing Spring constructor injection - Workaround

2009-02-28 Thread Christian Helmbold
ds Christian -- http://www.groovy-forum.de ----- Ursprüngliche Mail > Von: Christian Helmbold > An: users@wicket.apache.org > Gesendet: Samstag, den 28. Februar 2009, 20:14:02 Uhr > Betreff: AW: NullPointerExceptions due to missing Spring constructor injection > > Hi

AW: NullPointerExceptions due to missing Spring constructor injection

2009-02-28 Thread Christian Helmbold
Hi Martjin, it is not possible to compile the code without static. Without static I get the compiler error: "cannot reference repository before supertype constructor has been called". But I cannot write public ArticlePage() { super(); this(); } because each of them must be the fi

NullPointerExceptions due to missing Spring constructor injection

2009-02-28 Thread Christian Helmbold
A page in my Wicket app has a contructor which should access an injected repository, but the repository is injected not until construction is complete.. public class ArticlePage extends WebPage { @SpringBean private static ArticleRepository repository; // initialized after construction!

Solved: Troubles with Spring: bean of type X not found

2009-02-21 Thread Christian Helmbold
Hello Martijn, thank you very much! The Spring config was not in the correct directory. Another problem were missing JARs (yes, I should use maven ...). Now I'm happy that it works and that I can concentrate myself on the next problems - with JPA this time and not Wicket and Spring ;-) Regar

AW: AW: AW: Troubles with Spring: bean of type X not found

2009-02-21 Thread Christian Helmbold
Hello Nicolas, > Have you add the following statement in your web.xml Yes, exactly as you wrote: contextConfigLocation classpath:applicationContext.xml I've also tried to use a wrong name for the xml file, only to see if I get an error - and I get one. So the spring confi

AW: AW: Troubles with Spring: bean of type X not found

2009-02-21 Thread Christian Helmbold
It seems like my Spring config doesn't take effect. If I use a not existent application class name in my applicationContext.xml the Wicket application starts without an error message (the error with missing bean appears on first request). Wicket starts even with: Spring itself seems to work:

AW: AW: Troubles with Spring: bean of type X not found

2009-02-20 Thread Christian Helmbold
Hello Cemal thanks for your advice. Know I have extracted an interface which is used in my WikiPage class and implemented by my Repository, but the the error is the same. public class PageRepository extends Repository implements IPageRepository { ... } public class WikiPage extends WebPage {

AW: Troubles with Spring: bean of type X not found

2009-02-20 Thread Christian Helmbold
This is because of changes while writing my last email. Now all package names are changed, but the error still occurs. Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:

Troubles with Spring: bean of type X not found

2009-02-20 Thread Christian Helmbold
I try to use Wicket's Spring integration, but I get the following error: WicketMessage: Can't instantiate page using constructor public wicki.WikiPage() Root cause: java.lang.IllegalStateException: bean of type [wicki.domain.PageRepository] not found at org.apache.wicket.spring.SpringBeanLocat

AW: Remove ancient Spring integration

2009-02-19 Thread Christian Helmbold
> How is matching the right versions of your dependencies confusing? I found the mentioned website and looked for the most recent version. I thought that this was the official and only site to get Wicket's Spring integration. > Did you care to take a look inside your Wicket distribution that w

AW: AW: HTML creation tool

2009-02-19 Thread Christian Helmbold
I've searched several times for open source WYSIWYG HTML editors but all I've found is poor - especially compared to Dreamweaver. Dreamweaver is not cheap but it is a good investment. You'll be very productive and it's fun! I wish there would be something comparable in the open source sphere. R

Remove ancient Spring integration

2009-02-19 Thread Christian Helmbold
I've downloaded the Wicket-Spring integration from http://sourceforge.net/project/showfiles.php?group_id=119783&package_id=182494 but this site seems to be dead. Is one of the mainters here? Please remove this dead project from Source Forge to avoid confusion. Tanks. Christian -- http://www

AW: AW: AW: Avoid serialization troubles with static members

2009-02-19 Thread Christian Helmbold
> then I'd recommend using maven (or similar) :-) I try to use only tools I really nead. Sometimes it seems to me that in Java programming most time is spent in frameworks and tools and not in the programming itself. But, yes, I know the JAR hell and time for maven (or Ivy?) has been come to me

AW: HTML creation tool

2009-02-19 Thread Christian Helmbold
> Any css based HTML creation tool recommended by Wicket users? Are you looking for a so called WYSIWYG editor? Adobe Dreamweaver is my favorite. Regards, Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apac

AW: AW: Avoid serialization troubles with static members

2009-02-19 Thread Christian Helmbold
> if the "org.apache" is missing, you're using an old version of wicket. I use Wicket 1.4 RC2. Maybe I use an old version (1.2.7) of the Spring integration. Where can I get the current version? http://cwiki.apache.org/WICKET/spring.html says nothing about where to download it (without maven)..

AW: Avoid serialization troubles with static members

2009-02-19 Thread Christian Helmbold
> a static service inside a component? Why not? Services are typically singletons and I can't see a problem to share an instance. From the dependency point of view it is equal to use * static Service svc, * transient Service svc or * Service svc I think the disadvantage of my solution is the in

AW: Avoid serialization troubles with static members

2009-02-19 Thread Christian Helmbold
Thanks for your answer. > > Wouldn't it be sufficient to use a static member to hold a reference to a > service? i.e. > > > > public class SomeWicketComponent{ > > private static MyService service; > > // ... > > } > > > > How would you intialize these? Would you have a static getter, and

Avoid serialization troubles with static members

2009-02-18 Thread Christian Helmbold
I've read http://cwiki.apache.org/WICKET/spring.html and the corresponding section in "Wicket in Action" about the troubles with serialization of injected services. "Dependencies often have references to other dependencies in the container, and so if one is serialized it will probably serialize

Avoid serialization troubles with static members

2009-02-18 Thread Christian Helmbold
I've read http://cwiki.apache.org/WICKET/spring.html and the corresponding section in "Wicket in Action" about the troubles with serialization of injected services. "Dependencies often have references to other dependencies in the container, and so if one is serialized it will probably serialize