That was my plan exactly but I didn't know of a way to tell which button was
doing the form submission until now!
Thanks for that Form#findSubmittingButton works beautifully!
I don't even think it's a hack as that validation should only really a problem
if the user is submitting the form, n
SOLVED:
After some debugging I noticed the following:
In the constructor the url generated is:
./wicket/page?54-0.IBehaviorListener.0
In onBeforeRender and onAfterRender the url is
./wicket/page?54-1.IBehaviorListener.0
I was pretty much getting the url as a string and passing it to WiQuery (ie
Good catch on AjaxSubmitButton being deprecated, I guess an IDe would have
made that obvious ;)
I do have to say using the getChoices over a proper model may give you more
work than needed in updating the underlying model objects (maybe consider
overriding the getConvertedInput to return getChoice
According to the doco the default form processing behavior is executed for
AjaxButton and AjaxSubmitButton (in fact AjaxSubmitButton appears to be
deprecated - behaves the same as AjaxButton anyway?).
I am using AjaxButton.
I actually don't care about the selections but rather, the entries that
Make sure that sendredirect.compatibility property is set to false or
deleted. It causes problems. You didn't say if it had originally be set or
not though, lets make sure it didn't get left on at some point.
Watch the URL, if you typed in http://localhost/myApp and it renders as
http://localhost/
You are correct that the Form's validation should only fire when submitting
the form. When an individual element is updated via ajax (as in an
AjaxFormComponentUpdatingBehavior) then just the processing and validations
steps are fired for the individual form component.
It makes me wonder if you ar
Yes, it's all via AJAX.
In the last few minutes I've tried a different approach and it works ok but it
introduces another problem:
form.add(new AbstractFormValidator()
{
public FormComponent[] getDependentFormComponents()
{
return null;
}
public void validate(Form form
I have a filter in web.xml file - however I did not set it up. At the
same time I've started to question the setup because I tried to deploy
a "clean" test app (by clean I mean new ear file for the test app and
no extra ear files and configuration - just a strip down example from
wicket's website)
Lets see the code about 'adding elements by pressing on a button'. The
'getValue()' method is returning the value from the list box's HTTP
submitted values, if the add button is submitting values via ajax or some
other means then it may need a different approach.
-Clint
On Sun, May 1, 2011 at 8:
You are using a servlet instead of a filter, right? I don't see the
entire conversation in my gmail, here, so I hope I didn't miss
something.
On Sun, May 1, 2011 at 9:51 PM, D D wrote:
> I tried the setting with true and false settings. It still doesn't work.
>
> Here is Ajax Debug
> INFO: Initi
I tried the setting with true and false settings. It still doesn't work.
Here is Ajax Debug
INFO: Initiating Ajax GET request on
?wicket:interface=:0:dataForm:dataPanel:rxEntryTabs:panel:link::IBehaviorListener:0:-1&random=0.6781234819490185
INFO: Invoking pre-call handler(s)...
ERROR: Received Aj
On Sat, Apr 30, 2011 at 5:36 PM, splitshade
wrote:
> Hi,
>
> i have a general question,
> we have an exisiting application, that now needs to be ajaxified (no page
> reloads etc..).
> This has never been a requirement, so the application is not prepared at all
> for this.
>
So, why is this a requ
We have an app that allows people to add elements to a ListMultipleChoice by
pressing on a button. We want the form to fail validation if the
ListMultipleChoice contains no elements.
I've tried this:
targettedSetsList.add(new IValidator()
{
public void validate(IValidatable validatable)
In your web.xml, something like:
SpringContextLoaderListener
org.springframework.web.context.ContextLoaderListener
WicketServlet
org.apache.wicket.protocol.http.WicketServlet
Hi, SubmitLink already write some JavaScript in the onclick handler, so you
need to prepend the confirmation JavaScript in order to maintain the default
behavior. e.g.
submitLink.add(new Behavior() {
onComponentTag() {
tag.put("onclick", "if(!confirm('c')) return false;" +
tag.getAttribute("onclic
Use ajax with responsibility. To much ajax can make bad things :]. I can not
undestand, why you would like to change page to panel, and rerender it all,
just like setResponcePage does. Try to sit and decide, which parts of page
should be ajaxified and which should be left as it is.--
View this mess
see GridView
-igor
On Sun, May 1, 2011 at 9:51 AM, Alexandros Karypidis wrote:
> Hello,
>
> I am trying to create a web page that lists contact addresses in a table. My
> repeater can easily lay out one address per row, but I need to be able to
> list 2 addresses per row (actually, ideally I'd l
Dear Martin,
thank you for answering. I tried something like this:
--
SubmitLink link = new SubmitLink("link") {
public void onSubmit() { /* my stuff */}
}
link.add(new SimpleAttributeModifier("onclick", "return confirm('are you
sure?');
Hi James, yes, thats exaclty what I meant.
The Problem is, we have an existing infrastructure, that depends on pages.
The idea to change everything to a "setResponsePanel"-Method seems to be
very good, I think we could realize that very cheaply, thanks for the hint!
Would that be something that
Hi,
On Sun, May 1, 2011 at 11:10 AM, scorpio2002 wrote:
> Hi there,
> I have a SubmitLink and I'd like to add a very simple confirmation dialog to
> it? Any way of doing so?
>
> I've tried to add a SimpleAttributeModifier, but it overwrites the behaviour
> in the onSubmit method of the submitlink
Hi there,
I have a SubmitLink and I'd like to add a very simple confirmation dialog to
it? Any way of doing so?
I've tried to add a SimpleAttributeModifier, but it overwrites the behaviour
in the onSubmit method of the submitlink. I think there must be an easy and
clean way of doing this.
Thank y
I like your current approach better than what you want to do.
Anyway here is how to do it:
int currIndex = item.getIndex();
ListItem nextItem = get(Integer.toString(currIndex + 1));
if (nextItem != null) {
...
}
On Sun, May 1, 2011 at 6:51 PM, Alexandros Karypidis wrote:
> Hello,
>
> I am
Hello,
I am trying to create a web page that lists contact addresses in a table.
My repeater can easily lay out one address per row, but I need to be able
to list 2 addresses per row (actually, ideally I'd like to list N
addresses per row). The problem is that ListView's operation
[popula
Thanks for help, I solved my problem by extending original TabbedPanel with
some additional properties.--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3488031.html
Sent from the Users forum mailing list archive at Nabble.com.
---
I didn't checked the API before posting the example was using the kind of
the same code you provide earlier, just to give u a quick start :)
But the idea is to pass a model to the underlying panel on each tab, that
points to the same object reference.
On Sun, May 1, 2011 at 12:52 PM, meduolis[vi
if all your pages extend a base page then you can change the base page
to extend a panel instead.
than s/setResponsePage/setResponsePanel/
create a page that has the necessary infra to swap content panels and
wire in the new setResponsePanel to use that.
-igor
On Sat, Apr 30, 2011 at 2:36 PM, s
If you can create a quickstart that reproduces the problem then please
attach it to a ticket in Jira.
On Fri, Apr 29, 2011 at 10:52 PM, msj121 wrote:
> I have noticed calling getCallbackUrl() on an AbstractDefaultAjaxBehavior
> results in a url sometimes in:
>
> ./wicket/page?0-1.IBehaviorListene
I think that your example would finish with ClassCastExeption in
TabbedPanel.java:382 line
return (Integer)getDefaultModelObject();
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Share-data-in-TabbedPanel-tp3477328p3487936.html
Sent from the Users forum mailing list a
Hi,
you can utilize the usual Check/CheckGroup/CheckGroupSelector
combination. I've added a convenience CheckContent implementation
recently (now for Wicket 1.4 too):
http://code.google.com/p/wicket-tree/source/browse/branches/wicket-tree-0.4.x/wicket-tree/src/main/java/wickettree/content/
Lets say you have a property in your page that point to the dataobject you
are creating and manipulating on first tab.
The model of the tabs that should see this dataobject as well can be
reference as:
tp.setDefaultModel(new PropertyModel(this,"mySharedObject"));
Being "mySharedObject" the prop
I think he meant that rather than using a page-oriented design, that
they'd need to switch to more of a one page, switch panels design?
On Sun, May 1, 2011 at 4:09 AM, meduolis wrote:
> Why do you want to switch page using ajax? :D If you redownload all page
> contents, do not use ajax :), it onl
I heard that Webspere gets confused with a filter as the endpoint. Try
WicketServlet. I think there also is a patch for more recent Websphere
versions.
On Sunday, May 1, 2011, drf wrote:
> I should add that we are using Spring 3, which uses ContextLoaderListener,
> not ContextLoaderServlet
> --
>
Hi Sven,
I'm on back on it now.
To hidden the checkboxes for roots I've put the 'if' into the
'newContentComponent' method
something like this
public Component newContentComponent(String id, final AbstractTree tree,
IModel model)
{
if (model.getObject().isRoot()) {
Hi Sven,
I'm on back on it now.
To hidden the checkboxes for roots I've put the 'if' into the
'newContentComponent' method
something like this
public Component newContentComponent(String id, final AbstractTree
tree, IModel model)
{
if (model.getObject().isRoot()) {
I should add that we are using Spring 3, which uses ContextLoaderListener,
not ContextLoaderServlet
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Running-Wicket-under-WebSphere-tp3487476p3487531.html
Sent from the Users forum mailing list archive at Nabble.com.
-
This uses Spring 2 and ContextLoaderServlet
Does anyone have an example of a web.xml defined using Spring3 -
ContextLoaderListener - and Wicket
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Wicket-in-Websphere-6-1-tp1886967p3487523.html
Sent from the Users forum mail
We are using WebSphere 6.1, front ended by Apache (IBM HTTP Server)
Our Wicket application uses WicketFilter
When moving our war file from our Eclipse/Jetty environment to Websphere,
WebShpere is not finding the url of the project. However, if we put a static
resource, eg an html file, under the ap
Why do you want to switch page using ajax? :D If you redownload all page
contents, do not use ajax :), it only complicates everything. Use ajax, when
you want to refresh only some of page components, like table, other
containers--
View this message in context:
http://apache-wicket.1842946.n4.nabbl
38 matches
Mail list logo