Calculate property value on form submission

2011-01-26 Thread Xavier López
Hi, I've got a form with some fields, backed by an entity with a cpm. I've got one property on the entity which value is calculated in terms of one of the input fields in the form. It's important to have this field calculated up to date at form validation time. I tipically approached this issue

Re: How to remove all previous pages from pagemap

2011-01-26 Thread Matthias Keller
On 2011-01-25 18:20, Jeremy Thomerson wrote: On Tue, Jan 25, 2011 at 11:14 AM, Matthias Keller wrote Hi List We've got the following scenario: After a user hopped through a wizard, he'll reach a confirmation page in our workflow. Now the session still needs to remain active but I want to

RadioChoice keeps null rawInput after required validation?

2011-01-26 Thread Xavier López
Hi, I've got a form with a required radiochoice to select among some options. I've also got a yes/no radiochoice that selects a given option on rc1 and disables it when 'yes' is selected. When 'no' is selected, rc1 is set to enabled and its model object is cleared. The enabling/disabling of rc1

Re: How to remove all previous pages from pagemap

2011-01-26 Thread Martijn Dashorst
Unless you completely invalidated the browser/client side cache of markup, people can still use the back button and will be presented with the markup as it was rendered at that time. It is not until the user performs an action at that page when wicket will try to retrieve the page from the page

Re: How to remove all previous pages from pagemap

2011-01-26 Thread Matthias Keller
Hi Martijn Yes I know that, but as I stated, it's still possible to reload that page and perform actions on it (they are *all* stateful pages) - I must know how I can suppress that. I don't care if the user goes back and sees the page from the cache but he mustn't be able to perform any

Re: How to remove all previous pages from pagemap

2011-01-26 Thread Matthias Keller
I now found one way to clear all previous pages. I guess the reason is the REDIRECT_TO_BUFFER strategy (or however it's called) which both processes a button's onClick() event AND the next page's full initialization+rendering in one request. Thus the previous page (where the button was) is

How to deal with vertical tabs?

2011-01-26 Thread Carsten Luckmann
Hello, I have a problem with a Wicket Ajax response not being processed. Here the details: I have a link which is supposed to open a ModalWindow. The Ajax request is sent to the server, processed by the server, and the response is sent to the client. The client receives the response, including

Re: How to remove all previous pages from pagemap

2011-01-26 Thread Martijn Dashorst
On Wed, Jan 26, 2011 at 3:23 PM, Matthias Keller matthias.kel...@ergon.ch wrote: My current solution which solves this problem (although ugly) is the following code in the onClick: You could try to see if setRedirect(true); works for you, and not perform a setResponsePage( new Page()), but

1.5-RC1 maven source, javadoc, and tests

2011-01-26 Thread Steve Lowery
Looks like the source, javadoc and test artifacts for 1.5-RC1 published to the maven repo are empty. Can this be fixed please? Thanks, Steve

Re: How to remove all previous pages from pagemap

2011-01-26 Thread Matthias Keller
On 2011-01-26 15:49, Martijn Dashorst wrote: On Wed, Jan 26, 2011 at 3:23 PM, Matthias Keller matthias.kel...@ergon.ch wrote: My current solution which solves this problem (although ugly) is the following code in the onClick: You could try to see if setRedirect(true); works for you, and not

Re: Use Byte for CheckBox instead of Boolean

2011-01-26 Thread rolandpeng
Hi, this is YesNoCheckBox referred from previous posts. You can modify to fit your need. Roland. -- public class YesNoCheckBox extends CheckBox { public YesNoCheckBox(String id) { super(id); } @Override protected IModel initModel() {

Re: 1.5-RC1 maven source, javadoc, and tests

2011-01-26 Thread Igor Vaynberg
see this thread: [discuss] How to resolve wicket aggregate classes / sources jar issues -igor On Wed, Jan 26, 2011 at 6:54 AM, Steve Lowery slow...@gatessolutions.com wrote: Looks like the source, javadoc and test artifacts for 1.5-RC1 published to the maven repo are empty.  Can this be fixed

Re: Calculate property value on form submission

2011-01-26 Thread Igor Vaynberg
dont use a cpm, write a model that chains the entity model and does the right thing in get/set. -igor On Wed, Jan 26, 2011 at 1:25 AM, Xavier López xavil...@gmail.com wrote: Hi, I've got a form with some fields, backed by an entity with a cpm. I've got one property on the entity which value

Re: RadioChoice keeps null rawInput after required validation?

2011-01-26 Thread Igor Vaynberg
clearinput() is a good way to deal with it, but the component should still set no_raw_input if it is submitted in a disabled state. please file a jira issue, preferably with a quickstart. -igor On Wed, Jan 26, 2011 at 3:05 AM, Xavier López xavil...@gmail.com wrote: Hi, I've got a form with a

Re: How to deal with vertical tabs?

2011-01-26 Thread Igor Vaynberg
wicket should already be escaping such characters in markup. please file a jira with a quickstart. -igor On Wed, Jan 26, 2011 at 6:36 AM, Carsten Luckmann carsten.luckm...@freiheit.com wrote: Hello, I have a problem with a Wicket Ajax response not being processed. Here the details: I have

FormComponentPanel and invalid child FormComponents question

2011-01-26 Thread Sam Zilverberg
I have a FormComponentPanel that represents a Time object - not java.sql.Time but my own Time object. This Time object has 2 fields - hours and minutes. The panel has textfields for the hours and minutes that are defined as class type Integer. I have a behavior on the panel that whenever it has

Re: FormComponentPanel and invalid child FormComponents question

2011-01-26 Thread Igor Vaynberg
your form component panel should check if any of its children have error messages as well. use a visitor. -igor On Wed, Jan 26, 2011 at 8:32 AM, Sam Zilverberg samzilverb...@gmail.com wrote: I have a FormComponentPanel that represents a Time object - not java.sql.Time but my own Time object.

Re: FormComponentPanel and invalid child FormComponents question

2011-01-26 Thread Sam Zilverberg
That is an excellent idea. However I don't want to just set the panel to be invalid when one of it's children is invalid. I'd like to also steal its' feedback message. I want this to happen because I have a feedback panel next to the form component that shows feedback messages registered to it.

Class-only inheritance

2011-01-26 Thread DCarr
Hi, Is it possible to have class inheritance without markup inheritance? I would like a wicket-aware base class (with an associated markup file) with derived classes supplying data (e.g.. BaseClass with an 'abstract protected String getName()') and no markup files (or XML files). I

Re: FormComponentPanel and invalid child FormComponents question

2011-01-26 Thread Igor Vaynberg
give the panel containerfeedbackmessagefilter which will filter on the specified component and any of its children. -igor On Wed, Jan 26, 2011 at 9:03 AM, Sam Zilverberg samzilverb...@gmail.com wrote: That is an excellent idea. However I don't want to just set the panel to be invalid when one

Re: Class-only inheritance

2011-01-26 Thread Igor Vaynberg
if your DerivedClass1.java does not have markup and your BaseClass.html does not have a wicket:child tag then DerivedClass1 will use BaseClass' markup. so it should already work as you want, just remove wicket:child tag. -igor On Wed, Jan 26, 2011 at 9:13 AM, DCarr listobser...@gmail.com wrote:

Re: FormComponentPanel and invalid child FormComponents question

2011-01-26 Thread Pedro Santos
Hi Sam, you can change the feedback panel to show not only messages registered for the panel, but also for the inner components. The Wicket feedback panel uses the IFeedbackMessageFilter to filter what messages to display. You can provide one that test if the reporter is an panel children. See

Re: Class-only inheritance

2011-01-26 Thread DCarr
Hm - I'm doing something wrong, then. The BaseClass.html does not have a wicket:child in it, and I do get that second error message: Caused by: org.apache.wicket.WicketRuntimeException: Expected to find wicket:child/ in base markup This is wicket 1.4.6. If I turn on debug, I do get this just

http 500 status on GitHub

2011-01-26 Thread Martin Funk
Hi, anyone experiencing something similar, as I described here? http://support.github.com/discussions/site/2640-wiki-git-access-leads-to-500 mf - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional

Re: How to deal with vertical tabs?

2011-01-26 Thread Martin Grigorov
This is fixed in 1.5 only. https://issues.apache.org/jira/browse/WICKET-2264 https://issues.apache.org/jira/browse/WICKET-3330 On Wed, Jan 26, 2011 at 5:10 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: wicket should already be escaping such characters in markup. please file a jira with a

Re: http 500 status on GitHub

2011-01-26 Thread Igor Vaynberg
works for me :/ -igor On Wed, Jan 26, 2011 at 11:42 AM, Martin Funk mafulaf...@googlemail.com wrote: Hi, anyone experiencing something similar, as I described here? http://support.github.com/discussions/site/2640-wiki-git-access-leads-to-500 mf

setOutputMarkupId(true) on org.apache.wicket.markup.html.panel.Panel

2011-01-26 Thread agilbert
I'm trying to understand what it means to output a markup ID on a reusable wicket panel. If I understand correctly, the wicket:panel element is removed from production markup and can contain elements that aren't necessarily wrapped in a single element (e.g. a div). So, what does Wicket do when

Re: setOutputMarkupId(true) on org.apache.wicket.markup.html.panel.Panel

2011-01-26 Thread Igor Vaynberg
calling setoutputmarkupid on a panel will output an id to the tag to which the panel is attached, eg add(new mypanel(foo)) div wicket:id=foo -- the tag that will have markup id output since you attach a panel to wicket:container tag and call setoutputmarkupid(true) on it, the id will never be

Modify element attribute, preserve content

2011-01-26 Thread Alexandros Karypidis
Hello, I have the following case which I do not know how to handle with Wicket: I have an element (specifically it is an a href=.../a link) for which I need to generate an attribute's value dynamically (specifically, I need to set the href attribute at runtime), but I need to preserve the

Re: setOutputMarkupId(true) on org.apache.wicket.markup.html.panel.Panel

2011-01-26 Thread Allen
Igor, Thanks for the explanation...I was indeed attaching my Panel to a wicket:container tag. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupId-true-on-org-apache-wicket-markup-html-panel-Panel-tp3238774p3238938.html Sent from the Users forum mailing

Re: Modify element attribute, preserve content

2011-01-26 Thread Bas Gooren
Use a WebMarkupContainer and add a SimpleAttributeModifier behavior to it. It will not touch the contents of the tag it's attached to, leaving your own html as it is. Bas Op 26-1-2011 22:38, Alexandros Karypidis schreef: Hello, I have the following case which I do not know how to handle

Re: Modify element attribute, preserve content

2011-01-26 Thread Bas Gooren
Or, come to think of it, since you want to generate a href yourself on a link tag, use ExternalLink http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/link/ExternalLink.html. Since it's a WebMarkupContainer underneath it will leave whatever is inside your a-tag intact. Bas

Re: IndexedSharedResourceCodingStrategy.encode not being called

2011-01-26 Thread Markus Schmalhofer
I faced the same the problem and found this solution. You must use org.apache.wicket.Application/name of shared ressource as your resource key. In your example: Instead of writing mount(new IndexedSharedResourceCodingStrategy(photo, photo) ); you must use: mount(new

Re: Class-only inheritance

2011-01-26 Thread DCarr
May have been due to some stale built files or a misconfiguration someplace. Restarted from scratch in a new project and now works as desired. Thanks, DC DCarr wrote: Hm - I'm doing something wrong, then. The BaseClass.html does not have a wicket:child in it, and I do get that second

Access to HttpServletResponse gone in 1.5?

2011-01-26 Thread Todd Wolff
Hi, After migrating from 1.4.x to 1.5 RCI, I encountered only one breaking change. I used to be able to access the servlet response object via: getWebRequestCycle().getWebResponse().getHttpServletResponse(); But now, expected to be able to use:

Re: Access to HttpServletResponse gone in 1.5?

2011-01-26 Thread François Meillet
with the 1.5 API you get WebResponse response = (WebResponse) getRequestCycle().getResponse(); François Le 27 janv. 2011 à 01:15, Todd Wolff a écrit : Hi, After migrating from 1.4.x to 1.5 RCI, I encountered only one breaking change. I used to be able to access the servlet