Re: Panel's getParent() returns NULL after replaceWith

2013-10-25 Thread eugenebalt
Thanks Sven. I was actually talking about the new "replacING" component, not
the old replaced one. That replacing component had NULL as its Parent.

I found the solution discussed here:
http://apache-wicket.1842946.n4.nabble.com/Component-parent-null-after-replace-td1890602.html

The problem is it's not enough to do replaceWith(), you also have to reset
the reference.

panel.replaceWith(temp);
panel = temp;



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Panel-s-getParent-returns-NULL-after-replaceWith-tp4661961p4661965.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Panel's getParent() returns NULL after replaceWith

2013-10-25 Thread eugenebalt
In other words, a Read-only panel is replaced with an Editable panel after
clicking "Edit":

panelReadOnly.replaceWith(
new panelEditable());


The panelEditable is found to have a NULL Parent ID afterwards. We need to
keep track of certain fields only accessible through the parent.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Panel-s-getParent-returns-NULL-after-replaceWith-tp4661961p4661962.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Panel's getParent() returns NULL after replaceWith

2013-10-25 Thread eugenebalt
A panel that is created with replaceWith() earlier in the code turns out to
have a NULL parent. Is this normal, or are we supposed to keep links to the
parent? Any explanation? Is there ever a case when an embedded panel would
have a NULL parent? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Panel-s-getParent-returns-NULL-after-replaceWith-tp4661961.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Make a Shared Variable-Length ListView (checkbox matrix with N columns)

2013-10-15 Thread eugenebalt
We have 2 cases where we need to display a matrix with checkboxes. In the
first case, the matrix has 3 columns, in the second, it has 8.

Both are working, and both were implemented as ListViews. But is there a way
to make this a Shared Component, with a more elegant design? The problem is
the HTML needs to list out the columns of every row. This makes it necessary
to implement the 2 cases separately. We would like a reusable component.

Example from Case 1, with 3 checkbox columns:

   

  


Document Type
 View
 Upload
 Delete

  
  
  

()



  
  



Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Make-a-Shared-Variable-Length-ListView-checkbox-matrix-with-N-columns-tp4661825.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Spacing IE7 Issue when doing Wicket.setVisible() on WebMarkupContainer

2013-10-08 Thread eugenebalt
Thanks Sven. Unfortunately we can't test without the CSS, otherwise it's all
just text. Any other ideas?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Spacing-IE7-Issue-when-doing-Wicket-setVisible-on-WebMarkupContainer-tp4661733p4661752.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Spacing IE7 Issue when doing Wicket.setVisible() on WebMarkupContainer

2013-10-08 Thread eugenebalt
Happily, we fixed this IE7-only problem.

All we had to do was add the top-level Repeater (containing all the panels)
to the Ajax target of the AjaxCheckbox triggering the visibility of these
child panels.

final AjaxCheckBox HQUserCheckBox = new AjaxCheckBox("HQUser", new
PropertyModel(formObject, "HQUser")) {
  
//...
arg0.addComponent(repeaterWrapper);

}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Spacing-IE7-Issue-when-doing-Wicket-setVisible-on-WebMarkupContainer-tp4661733p4661759.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Spacing IE7 Issue when doing Wicket.setVisible() on WebMarkupContainer

2013-10-07 Thread eugenebalt
I don't know if anyone can help on this, but we ran into an IE7 issue (it
doesn't happen in IE8) where, when we toggle the visibility of some
MarkupContainers, the parent containers keep the original spacing they had
before, and don't suppress/expand properly to accommodate the new layout
(child panel is shown/hidden). So, we either get blank whitespace, or the
panel (when shown) is cut off.

There are N parent containers (they can be added dynamically in our app) and
in each one, an AjaxCheckBox triggers the visibility of an additional child
WMC panel. The last, Nth parent container, always resizes itself properly.
But any of the earlier ones, don't change their size when the child panel is
shown/hidden.

We only see this in IE 7 Compatibility mode. We've tried all kinds of CSS
and JS tricks but no luck. Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Spacing-IE7-Issue-when-doing-Wicket-setVisible-on-WebMarkupContainer-tp4661733.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Pre-Selecting Dropdown from Shared Panel serving 2 Model Databeans

2013-09-13 Thread eugenebalt
We have a shared Panel containing a dropdown.

The Panel is used on 2 different pages where each page has its own model as
an associated bean POJO class. My problem is that I have to pre-select the
dropdown in the panel to a certain index.

Normally, this is done by setting a Model value. I can't do that here
because I don't store the beans and I don't do setModel(..) on them.

This doesn't work either, because the form hasn't been submitted yet and
getModelObject() is NULL:

Object modelObject = 
((Form)(this.getParent())).getModelObject();
if (modelObject.getClass().getName().endsWith("Bean_A"))

((Bean_A)modelObject).setVerPeriod(optionsVerPeriod.get(vPeriodIndex));
else

((Bean_B)modelObject).setVerPeriod(optionsVerPeriod.get(vPeriodIndex));

Any ideas? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pre-Selecting-Dropdown-from-Shared-Panel-serving-2-Model-Databeans-tp4661306.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Pre-Selecting Dropdown from Shared Panel serving 2 Model Databeans

2013-09-13 Thread eugenebalt
I found a solution, I'm passing the model Data Bean as a parameter to the
Panel in the constructor. Then I have access to it.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pre-Selecting-Dropdown-from-Shared-Panel-serving-2-Model-Databeans-tp4661306p4661307.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax setVisible(true) Action not Working after a single setVisible(false)

2013-09-10 Thread eugenebalt
Solved my problem - I had to set the output markup placeholder tag:

choiceVerPeriod.setOutputMarkupPlaceholderTag(true);



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-setVisible-true-Action-not-Working-after-a-single-setVisible-false-tp4661281p4661282.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Ajax setVisible(true) Action not Working after a single setVisible(false)

2013-09-10 Thread eugenebalt
A selection in one of my Ajax dropdowns controls the visibility of another
dropdown. The code is very simple, and there are no other changes.

choiceVerType.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
   protected void onUpdate(AjaxRequestTarget target) {

   if
(choiceVerType.getValue().equals(UMCConstants.VERIFICATION_APPLICATION)) {
   choiceVerPeriod.setVisible(false);
   }
   else {
   choiceVerPeriod.setVisible(true);
   }
   target.addComponent(choiceVerPeriod);
}

Once I hit the setVisible(false) condition once, any further changes in the
1st dropdown don't take effect and the 2nd dropdown remains invisible. Any
thoughts? Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-setVisible-true-Action-not-Working-after-a-single-setVisible-false-tp4661281.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: getInput() does not work on a disabled DropDownChoice

2013-08-21 Thread eugenebalt
thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/getInput-does-not-work-on-a-disabled-DropDownChoice-tp4660987p4660992.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



getInput() does not work on a disabled DropDownChoice

2013-08-21 Thread eugenebalt
I just wanted to verify that getInput() doesn't work on a pre-disabled,
pre-populated DropDownChoice. getInput() only seems to work on enabled
dropdowns.

However, in my tests, getValue() works equally on both enabled/disabled
dropdowns. Is that true, or is there some other distinction?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/getInput-does-not-work-on-a-disabled-DropDownChoice-tp4660987.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Forcing Form Validation from another Form's onValidate()

2013-08-15 Thread eugenebalt
Actually, I figured it out. All the validators are getting called from the
inner form. But there was an NullPointerException in the first validator
which blocked all the others and I wasn't seeing them. Thanks for your help.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forcing-Form-Validation-from-another-Form-s-onValidate-tp4660895p4660918.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Forcing Form Validation from another Form's onValidate()

2013-08-15 Thread eugenebalt
Looking further at my code, I see that the custom validators from the inner
form DO get called; but the one that doesn't get called is
.setRequired(true). There is one component in the inner form which is
setRequired(true). And that validation is bypassed for some reason, although
all the other ones are not. Any thoughts on this?

Thanks for your replies.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forcing-Form-Validation-from-another-Form-s-onValidate-tp4660895p4660917.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Forcing Form Validation from another Form's onValidate()

2013-08-14 Thread eugenebalt
In the final HTML, my form is flattened out, there is only .

In my Wicket markup, the structure is:
PANEL -> FORM -> SecondPanel -> SecondForm

The main PANEL's FORM is being submitted, and validated. But the
"SecondForm" validation never gets called.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forcing-Form-Validation-from-another-Form-s-onValidate-tp4660895p4660905.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Forcing Form Validation from another Form's onValidate()

2013-08-14 Thread eugenebalt
I have a Panel (P1) which contains its own form (P1_F1).

The P1 panel also contains another panel inside itself, P1_A, which has its
own inner form (let's call it P1_A_F1).

Whenever the P_F1's validation is called, I also have to call the P1_A_F1
form validation. It doesn't get called automatically. How can I achieve
that?

In the P1_F1, I am catching onValidate() and overriding it. The problem is,
to call the validate() method, I need a FormComponent, not a Form. So I can
find the right form to additionally validate, but the method is not
available without a FormComponent. Any ideas? Thanks


P1_F1's onValidate captured:

@Override
protected void onValidate() {
  Panel P1_A = (Panel)get("P1_A");
  Form P1_A_F1 = (Form)P1_A.get("P1_A_F1");
  // how to force validation now on P1_A_F1?
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forcing-Form-Validation-from-another-Form-s-onValidate-tp4660895.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Checkboxes automatically disabled in ListView repeater

2013-08-14 Thread eugenebalt
YES. That was the exact issue. Thanks Sven.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Checkboxes-automatically-disabled-in-ListView-repeater-tp4660888p4660890.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Checkboxes automatically disabled in ListView repeater

2013-08-14 Thread eugenebalt
We have a Panel which contains a WebMarkupContainer which contains a ListView
repeater. The ListView repeats rows of 3 checkboxes; its populateItem is:

protected void populateItem(ListItem item) {
  EDocsPermissionModel perm = item.getModelObject();

  CheckBox cb1 = new CheckBox("view_flag", new PropertyModel(perm
"viewAccessFlag"));
  item.add(cb1);

  CheckBox cb2 = new CheckBox("upload_flag", new PropertyModel(perm
"uploadAccessFlag"));
  item.add(cb2);

  CheckBox cb3 = new CheckBox("delete_flag", new PropertyModel(perm
"deleteAccessFlag"));
  item.add(cb3);

}

When the page is displayed all the checkboxes are mysteriously disabled.

We removed all behaviors that related to either the checkboxes or the
top-level containers (Panel and WMC). Also, we added this, for every
checkbox, to no effect:

CheckBox cb1 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};
CheckBox cb2 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};
CheckBox cb3 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};

This didn't help. Also, the debugger shows that all the top-level containers
are themselves Enabled. The Panel is enabled and the WMC is enabled.

Any ideas? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Checkboxes-automatically-disabled-in-ListView-repeater-tp4660888.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Select AjaxCheckbox from Another AjaxCheckbox inside ListView

2013-06-27 Thread eugenebalt
I found a solution, but I'm not sure it's the best/most elegant one, there is
a lot of messy code.

Upon selecting a certain AjaxCheckbox A in a ListView, I had to 
1) disable AjaxCheckbox B
2) set its value to TRUE

and conversely, upon deselecting A, I had to (1) enable B and (2) set its
value to FALSE.

First of all, I got the Enable/Disable to work by overriding the
AjaxCheckbox's isEnabled. But in order to make that work, I had to use 2
flags. The first flag holds the current value of A, and the second flag
shows that clicking has begun. These are the flags "Clicked" and "Selected",
and they get updated on onUpdate().

// override isEnabled
public boolean isEnabled() {
if (bean.getKey().equals(DELETEOWN)
&& eNotesMgrClicked)
{
if (eNotesMgrSelected)
return false;
else
return true;
}
else
return super.isEnabled(); 
}

// set the flag that Checkbox A has been clicked and selected/de-selected
@Override
protected void onUpdate(AjaxRequestTarget arg0) {
   if (bean.getKey().equals(ADMIN))
   {
 eNotesMgrClicked = true;

 if (getModelObject())  

   eNotesMgrSelected = true;
else
   eNotesMgrSelected = false
   }
arg0.addComponent(checkboxDeleteOwn);
}
}

The 2nd issue, actually checking/unchecking the checkbox, was more
difficult. I had to actually save a reference to the AjaxCheckbox I want to
select/de-select. To save it, I overrode onBeforeRender(), and if it was the
right checkbox B, I saved its reference in a variable. Then, I could
reference it in onUpdate() and set its model object.

My questions:
1) I also wanted to do the setEnabled(true)/setEnabled(false) on Checkbox B,
now that I have its reference, as part  of onUpdate, but that does NOT work.
Can anyone tell me why this Enable/Disable doesn't work:

if (getModelObject())
{   
  eNotesMgrSelected = true;
  checkboxDeleteOwn.setEnabled(false);
  checkboxDeleteOwn.setModelObject(true);
}
else
{
  eNotesMgrSelected = false;
  checkboxDeleteOwn.setEnabled(true);
  checkboxDeleteOwn.setModelObject(false);
}

The setModelObject works on my saved-reference checkboxDeleteOwn, but
setEnabled() does NOT work.

2) This code is pretty messy, is there any better way to disable and set
individual AjaxCheckboxes based on the action of another AjaxCheckbox?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Select-AjaxCheckbox-from-Another-AjaxCheckbox-inside-ListView-tp4659829p4659872.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Select AjaxCheckbox from Another AjaxCheckbox inside ListView

2013-06-26 Thread eugenebalt
I have a ListView which contains AjaxCheckboxes. (Each AjaxCheckbox is added
as a ListItem inside the ListView.)

I have the requirement that if a particular 'special' AjaxCheckbox is
selected, that should instantly select another particular AjaxCheckbox.

There is the overrideable method onUpdate() that gets called on an
AjaxCheckbox change,

protected void onUpdate(AjaxRequestTarget arg0) { .. }

I can certainly capture the "source event" -- identify when my source
checkbox is selected --  but how do I find the particular checkbox B that
needs to be turned on? The debugger shows that the hierarchy is

List.get("1").get("chkbox"), List.get("2").get("chkbox")

Is there a better way than to iterate over ListItems in this clumsy way to
find the destination AjaxCheckbox that I need, and add it to the Ajax
target? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Select-AjaxCheckbox-from-Another-AjaxCheckbox-inside-ListView-tp4659829.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Inter-Page Communication in Wicket

2013-06-26 Thread eugenebalt
Is there a way in Wicket to maintain different open pages that may be open in
different windows? For example, make updates from one page that affect
components on a different page.

(Note: we are using Wicket 1.4.7)

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Inter-Page-Communication-in-Wicket-tp4659816.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Set the Null option manually in a NullValid Dropdown

2013-06-21 Thread eugenebalt
We have a dropdown which supports the NullValid property.

If we need to set its selection to Null manually, setModel(null) does not
seem to work. Should we set it to the first element of the backing model
(which is an KeyValueBean list)?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Set-the-Null-option-manually-in-a-NullValid-Dropdown-tp4659670.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Injecting proxy services in page.

2013-06-17 Thread eugenebalt
We've heard that there is a fix for this available in Wicket 1.5.

However, we are stuck with Wicket 1.4.7 and cannot upgrade, for various
reasons. (We're also already using the AnnotationConfigWebApplicationContext
referred to in the previous post.)

Are there any other workarounds for this problem? Is it OK to make the
problem classes "implement Serializable" just to move past this issue (even
if they are injected with the @SpringBean, and are service classes), or
should we try other workarounds?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Injecting-proxy-services-in-page-tp4659209p4659563.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket ID sometimes changes, sometimes stays the same

2013-06-06 Thread eugenebalt
Solution # 2 (setMarkupId) worked for us.

But Sven's Solution # 1 did not. Even after adding id="datefield"
wicket:id="datefield" to , the output still contained the
attribute id="datefield7" or something similar.

# 2 works for us, but I'm just wondering, is there something preventing # 1
from working?

There are no Ajax events on this TextField. Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-ID-sometimes-changes-sometimes-stays-the-same-tp4659238p4659255.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket ID sometimes changes, sometimes stays the same

2013-06-04 Thread eugenebalt
Some of my components have the same static Wicket ID, but others look like
"field7" or "field5" while their ID is "field".

What is the rule governing whether an ID changes or not? And how can I
enforce a static ID? Thanks





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-ID-sometimes-changes-sometimes-stays-the-same-tp4659238.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Display JavaScript Pop-up Alert Box In Wicket After Processing

2013-05-09 Thread eugenebalt
Never mind, the solution is easy: target.appendJavascript("alert('...')") at
the end of the Ajax code. Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Display-JavaScript-Pop-up-Alert-Box-In-Wicket-After-Processing-tp4658666p4658674.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Display JavaScript Pop-up Alert Box In Wicket After Processing

2013-05-09 Thread eugenebalt
I have a Button which performs some processing in Wicket, and at the very end
(not before), I need to show a JS popup alert box, with info from the
processing.

If I override protected IAjaxCallDecorator getAjaxCallDecorator() and add a
JS function to display the popup, that will fire immediately. How do I make
it wait until after processing is done, and how do I pass values to it that
come from Wicket?

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Display-JavaScript-Pop-up-Alert-Box-In-Wicket-After-Processing-tp4658666.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Disabling Individual Checkboxes in CheckGroup

2013-04-29 Thread eugenebalt
Thanks Sven. We don't have the below methods. We are using Wicket 1.4.7,
probably time to upgrade.

ListView#newItem(int, IModel) 
see Component#onConfigure() 






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165p4658395.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Disabling Individual Checkboxes in CheckGroup

2013-04-29 Thread eugenebalt
Thanks Sven, let me clarify something in your code:

1) #newItem only has the signature newItem(int); there is no
newItem(int,IModel).
2) At the line "super.configure()" we get the error "The method configure()
is undefined for the type Check".
3) When you make references to "enabled", I assume it's some global
flag/variable that you're checking, which is set outside in the main module?

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165p4658388.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread eugenebalt
Here is the full code. This is an urgent problem so any advice much
appreciated.

ISSUE: Cannot enable/disable Checks in an Ajax update, their state remains
the same.

The Checks in the CheckGroup are supposed to change depending on a DropDown
change.

1) On Page Construction, all Checks in the CheckGroup are initially enabled

final CheckGroup appsCheckGroup=new CheckGroup("apps");
appsCheckGroup.setOutputMarkupId(true);
add(appsCheckGroup);
ListView appListView = new ListView("appList", appList) { 
@Override
protected void populateItem(ListItem arg0) {

Check app = new Check("app", arg0.getModel(), appsCheckGroup);
ApplL appObject = (ApplL)arg0.getModelObject();
app.add(new 
SimpleAttributeModifier("title",appObject.getApplDc()));
arg0.add(app);

 *app.setEnabled(true);*

Label lblApp = new Label("lblApp", appObject.getApplCd());
lblApp.add(new SimpleAttributeModifier("title", appObject.getApplDc()));
arg0.add(lblApp);
}
};
appListView.setReuseItems(true);
appsCheckGroup.add(appListView);


2) In the Ajax Request (invoked from a separate DropDown):

structureDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
final CheckGroup appsCheckGroup = 
(CheckGroup)UM01SearchForm.get("apps"); 

ListView appListView = new ListView("appList", appList) {

@Override
protected void populateItem(ListItem arg0) {
Check app = new Check("app", arg0.getModel(), 
appsCheckGroup);

System.out.println("In Ajax ListView.populateItem");

ApplL appObject = (ApplL)arg0.getModelObject();
app.add(new 
SimpleAttributeModifier("title",appObject.getApplDc()));


*app.setEnabled(false);*


arg0.add(app);
Label lblApp = new Label("lblApp", appObject.getApplCd());
lblApp.add(new SimpleAttributeModifier("title", 
appObject.getApplDc()));
arg0.add(lblApp); 
}
};

appListView.setReuseItems(true);
appsCheckGroup.addOrReplace(appListView);

System.out.println("In Ajax addComponent");

target.addComponent(appsCheckGroup.setRenderBodyOnly(false));

}

}

OUTPUT:
1) None of the checkboxes changes state after the Ajax update (but the Ajax
request is processed)
2) The line "In Ajax addComponent" happens BEFORE the line "In Ajax
ListView.populateItem"

I've also tried directly accessing the Checks inside the CheckGroup, but
that didn't work for me, the state still doesn't change: e.g., for Check #3,

// Direct Access Test
Check c3 =
(Check)((ListItem)((ListView)appsCheckGroup.get("appList")).get("3")).get("app");
c3.setEnabled(false);
target.addComponent(c3);


Thanks for any help.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165p4658366.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Disabling Individual Checkboxes in CheckGroup

2013-04-28 Thread eugenebalt
Paul: The Check is constructed *inside populateItem()*. This is already too
late, my output shows this happens after the Ajax ecent.

There is no way to construct a Check outside the populateItem, as far as I
know. This is how Checks are used:

CheckGroup cg = new CheckGroup("apps");
add(cg);
ListView appListView = new ListView("appList", appList) {
  @Override
  protected void populateItem (ListItem arg0)
  {
 Check app = new Check("app", arg0.getModel(), appsCheckGroup);
 arg0.add(app);
 
 // enabled/disabled here, or in Check constructor
  }
};
appListView.setReuseItems(true);
cg.add(appListView);



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165p4658361.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Can't Ajax-Update CheckGroup with new ListView

2013-04-26 Thread eugenebalt
Paul, how would the model specify enabled/disabled status? The model contains
the values of the checkboxes.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-Ajax-Update-CheckGroup-with-new-ListView-tp4658090p4658323.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Disabling Individual Checkboxes in CheckGroup

2013-04-26 Thread eugenebalt
Igor,

The problem is, you do check.setEnabled(false) in *ListView.populateItem()*
for a CheckGroup control.

This method executes AFTER the Ajax update. It's too late to do
check.setEnable(false) on the render of the CheckGroup's ListView. We need
to disable/enable checkboxes in a CheckGroup as part of the Ajax update.

(This does work with CheckBoxMultipleChoice, because there is no ListView
rendering and the checkboxes can be handled individually, but we need a grid
layout and we don't get it with that control.)

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165p4658320.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Disabling Individual Checkboxes in CheckGroup

2013-04-22 Thread eugenebalt
How would you disable individual checkboxes in a CheckGroup?

With a CheckBoxMultipleChoice, it's easy: just override isDisabled(int
index) for the particular index you want to disable.

But we are using a CheckGroup, not CheckBoxMultipleChoice, because we need a
grid layout for our set of checkboxes. The CheckGroup components works via a
repeater, such as ListView. We've tried addOrReplace a new ListView, with
some new disabled checkboxes, and it doesn't pick it up until it goes to
render, which doesn't work for us in an Ajax request.

The new disabled checkboxes in the CheckGroup have to be set as part of the
Ajax update. Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Disabling-Individual-Checkboxes-in-CheckGroup-tp4658165.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Can't Ajax-Update CheckGroup with new ListView

2013-04-22 Thread eugenebalt
Any help on this issue?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-Ajax-Update-CheckGroup-with-new-ListView-tp4658090p4658162.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Can't Ajax-Update CheckGroup with new ListView

2013-04-18 Thread eugenebalt
Here is the code. As I said, we need to selectively enable/disable certain
checkboxes in a CheckGroup as part of some other component's Ajax event.

The issue is that the Ajax update is happening *before* we get a chance to
disable the checkbox in the ListView's populateItem(). So our checkboxes
never get updated. Thanks

structureDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
  // …

  final CheckGroup appsCheckGroup =
(CheckGroup)UM01SearchForm.get("apps");
  ListView appListView = new ListView("appList", appList) {

  protected void populateItem(ListItem arg0) {
Check app = new Check("app", arg0.getModel(),
appsCheckGroup);

app.setEnabled(true);

arg0.add(app);
 }
 }


appsCheckGroup.addOrReplace(appListView);
target.addComponent(appsCheckGroup.setRenderBodyOnly(false));
}




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-Ajax-Update-CheckGroup-with-new-ListView-tp4658090p4658098.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Can't Ajax-Update CheckGroup with new ListView

2013-04-18 Thread eugenebalt
In other words, we set the individual check box's Enabled/Disabled in
ListView.populateItem().

This populateItem() call happens after the target.addComponent(listView),
even though in the code it precedes it.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-Ajax-Update-CheckGroup-with-new-ListView-tp4658090p4658091.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Can't Ajax-Update CheckGroup with new ListView

2013-04-18 Thread eugenebalt
We have an Ajax method in some component where we have to update a CheckGroup
on the form. (The update is that some checkboxes get enabled/disabled.)

We construct a new ListView object, then addOrReplace it to the checkGroup;
and finally, after that, we add the CheckGroup to target.addComponent.

What we see is that the target.addComponent actually happens first. The new
ListView construction actually follows it, based on the output, and we don't
see the new checkboxes getting enabled.

Any ideas, thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-Ajax-Update-CheckGroup-with-new-ListView-tp4658090.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Suppress "Are you sure you want to navigate away from this page?" in Panel

2013-04-15 Thread eugenebalt
We have a Panel with a Form, and when anything changes on the form, we get
the browser message "Are you sure you want to navigate away from this page?
You have unsaved changes."

We need to suppress this warning for this Panel only (but not others). I
think there are some JS handlers for that, but where would you add it, and
how? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Suppress-Are-you-sure-you-want-to-navigate-away-from-this-page-in-Panel-tp4657993.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to Add JS Modifer to a Non-Form-Processing AjaxButton

2013-04-15 Thread eugenebalt
Never mind, I got it work. What I had to do was this:

public CharSequence decorateScript(CharSequence script) {
// TODO Auto-generated method 
stub
return 
super.decorateScript("var x = confirm('Are you sure you want to
delete the selected record(s)?'); if(x) { " + script + " }  ");

Thanks
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Add-JS-Modifer-to-a-Non-Form-Processing-AjaxButton-tp4657904p4657992.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to Add JS Modifer to a Non-Form-Processing AjaxButton

2013-04-15 Thread eugenebalt
Hi, I overrode the IAjaxCallDecorator as below, but it still doesn't work:
there is no action when I click "OK" (although the popup appears). Do I need
to add something else? Thanks,

linkDelete = new AjaxButton("linkDelete") { 

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() 
{

private static final long 
serialVersionUID = 1L;

@Override
public CharSequence 
decorateScript(CharSequence script) {
// TODO Auto-generated method 
stub
return 
super.decorateScript("return confirm('Are you sure you want to
delete the selected record(s)?'); " + script);
}

};
}

@Override
protected void onSubmit(AjaxRequestTarget target, 
Form arg1) {
  //  submit logic ...
  }

My HTML:

 
Delete



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Add-JS-Modifer-to-a-Non-Form-Processing-AjaxButton-tp4657904p4657991.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to Add JS Modifer to a Non-Form-Processing AjaxButton

2013-04-11 Thread eugenebalt
There was some error submitting the first post, so I'll resubmit:

We have an AjaxButton on which defaultFormProcessing = FALSE. I need to
attach a JS modifier to it with an alert box ("Are you sure? OK/Cancel"),
but when I add a SimpleAttributeModifier, I don't go through with the
onClick regardless of OK/Cancel, there is no action.

I was wondering if that was because of the defaultFormProcessing = FALSE.
Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Add-JS-Modifer-to-a-Non-Form-Processing-AjaxButton-tp4657905.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to Add JS Modifer to a Non-Form-Processing AjaxButton

2013-04-11 Thread eugenebalt
We have an AjaxButton with the following flag, to disable default form
processing (we don't want it to submit the form):

ajaxButton.setDefaultFormProcessing(false);

The problem is that we need to attach a JS alert box ("Are you sure?
OK/Cancel") when this button is clicked. If OK is clicked, we go through
with the onSubmit(), otherwise nothing happens.

I'm seeing that when I do this

ajaxButton.add( new SimpleAttributeModifier("onclick", "return confirm('Are
you sure you want to delete the selected record(s)?');"));

nothing happens regardless of OK/Cancel, the onSubmit is never invoked. Is
that because defaultFormProcessing=False? Is there a workaround? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Add-JS-Modifer-to-a-Non-Form-Processing-AjaxButton-tp4657904.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxButton doesn't work in WebMarkupContainer

2013-03-28 Thread eugenebalt
Disregard - problem solved.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxButton-doesn-t-work-in-WebMarkupContainer-tp4657633p4657636.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxButton doesn't work in WebMarkupContainer

2013-03-28 Thread eugenebalt
I have the below block of code. A Link or an AjaxLink works perfectly here
inside a WebMarkupContainer. But when I use an AjaxButton (with a
setDefaultFormProcessing=False), I get an error. Thanks

AjaxButton linkCopy = new AjaxButton("linkCopy") {

@Override
protected void onSubmit(AjaxRequestTarget arg0, Form 
arg1) {
// TODO Auto-generated method stub

}   
};
linkCopy.setDefaultFormProcessing(false);
wmcMarkup.add(linkCopy);

Error:
java.lang.IllegalStateException: form was not specified in the constructor
and cannot be found in the hierarchy of the component this behavior is
attached to
at
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.getForm(AjaxFormSubmitBehavior.java:92)
at
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.getEventHandler(AjaxFormSubmitBehavior.java:108)
at
org.apache.wicket.ajax.markup.html.form.AjaxButton$1.getEventHandler(AjaxButton.java:131)
at
org.apache.wicket.ajax.AjaxEventBehavior.onComponentTag(AjaxEventBehavior.java:111)
at
org.apache.wicket.behavior.AbstractAjaxBehavior.onComponentTag(AbstractAjaxBehavior.java:134)
at org.apache.wicket.Component.renderComponentTag(Component.java:4009)
at org.apache.wicket.Component.renderComponent(Component.java:2610)




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxButton-doesn-t-work-in-WebMarkupContainer-tp4657633.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Adding to the existing AjaxBehavior of a component

2013-03-21 Thread eugenebalt
For example, the Panel was showing/hiding some components inside itself,
based on the selection in those components; that was working correctly.

Right now, we're using the Panel on a separate page and have an external
component that needs to respond to the events in one of the Panel's
dropdowns. We don't want to change the Panel itself because it's a complex
reusable piece and we want to leave it alone. After adding an Ajax behavior
to that dropdown, it seems to run but overrides the previous behavior
defined for it.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-to-the-existing-AjaxBehavior-of-a-component-tp4657400p4657412.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Adding to the existing AjaxBehavior of a component

2013-03-21 Thread eugenebalt
We have a large panel containing components with multiple Ajax behaviors.

In one context where this panel is used, we need to augment (add) the
existing AjaxBehavior of a certain component by adding extra functionality
to it. It seems that if we add it the usual way (add (new
AjaxComponentUpdating Behavior {..})), it breaks the existing Ajax behavior
defined previously in the panel.

Is there a way to "plug into" an existing Ajax behavior of a component
without replacing it, but adding to it?

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-to-the-existing-AjaxBehavior-of-a-component-tp4657400.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: .properties File for Custom Dropdown Message Not Found

2013-03-20 Thread eugenebalt
Problem solved. It had to be ".nullValid" (I was using ".null").



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/properties-File-for-Custom-Dropdown-Message-Not-Found-tp4657377p4657387.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: .properties File for Custom Dropdown Message Not Found

2013-03-20 Thread eugenebalt
So I'll try to clarify:

1) isNullValid = TRUE on this dropdown

2) I created a .properties file in the same location as the Page. Referenced
the component's full hierarchy and set ".null"

form.panel.mydropdown.null=TEST

3) This isn't working. Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/properties-File-for-Custom-Dropdown-Message-Not-Found-tp4657377p4657383.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



.properties File for Custom Dropdown Message Not Found

2013-03-20 Thread eugenebalt
Where do I put the .properties file with my custom message that overrides
"Please Choose One" for a dropdown?

I have a panel which uses this dropdown, and I created a .properties file
with the same name as the panel, in the same package. But it's not getting
activated.

(isNullValid is TRUE for this dropdown, but the null option comes up blank
(""), rather than with my title. We have some code which may already be
overriding it with a blank, but I can't find it now.) Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/properties-File-for-Custom-Dropdown-Message-Not-Found-tp4657377.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax Behavior not working after 1 time

2013-03-14 Thread eugenebalt
Martin, we're already doing setOutputMarkupId(true) on both dropdowns. Is
that one different from OutputMarkupId?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Behavior-not-working-after-1-time-tp4657254p4657257.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Ajax Behavior not working after 1 time

2013-03-14 Thread eugenebalt
We have a DropDown whose selection affects the 2nd DropDown (hide+disable).

This is done in Ajax "onchange" on the 1st DropDown, very simple. In the
Ajax behavior, we specify

if (condition)
{
   choice2.setEnabled(false); choice2.setEnabled(false);
target.addComponent(choice2);
}
else
{
   choice2.setEnabled(true); choice2.setEnabled(true);
target.addComponent(choice2);
}

We verified that our condition works, and Ajax kicks in correctly on every
change in DropDown #1, and the hide/show works the *first* time.

Afterwards, after switching back and trying again, we are no longer able to
show Choice2. It always stays hidden, and the correct condition is
activated, but the dropdown isn't updated for some reason.

Any ideas? We're doing target.addComponent() in both cases.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Behavior-not-working-after-1-time-tp4657254.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Some Validators Not Kicking In

2013-03-14 Thread eugenebalt
Sorry to keep posting, but does order matter? We're adding the validators in
all kinds of order.

Sometimes, we have a field that shows messages associated with itself, AND
its Form-level validator. But that doesn't work for other fields, which
don't show the Form-associated validator.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242p4657251.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Some Validators Not Kicking In

2013-03-14 Thread eugenebalt
So if I have something wrong with my field (by itself), than any Form
validators that involve it as well, won't kick in?

>From the documentation:
These validators are added to the form and only executed if all form
components returned by getDependentFormComponents() have been successfully
validated before this validator runs. 

What if I need to show all messages, both "solo" and Form-level?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242p4657250.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Some Validators Not Kicking In

2013-03-14 Thread eugenebalt
That may be it. The Form-level ones are the ones not executing sometimes.

So to check if it's invalid, I just see if getDependentComponents() returns
NULL? And what could cause it to be NULL, if I'm specifying the right valid
components that exist on the form?

Thanks again



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242p4657249.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Some Validators Not Kicking In

2013-03-14 Thread eugenebalt
We're having an issue where some of our validators aren't kicking in.

A bunch of Component- and Form-level validators are added in the page
constructor. We have output statements in each. The output shows that in
some situations some of the validators are "short-circuited" and don't get
executed even though we've added them. Any ideas?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Validator Question

2013-03-06 Thread eugenebalt
I have a Form-level Validator which works on a pair of Date fields, and makes
sure that one can't be filled in without the other. (None or both filled in
is fine.)

The Validator is Form-level because it is multi-component; it must work
generically on any pair of Component IDs, because it's shared between
different projects. Right now the implementation is:

@Override
public void validate(Form form) {
   //...
}

The issue is that I can't pass any arbitrary pair of IDs to validate, the
param is a Form. Do I hard-code all the possible IDs that different projects
can use? Or is there a better way to do it?

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validator-Question-tp4657054.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



The best way for designers and Wicket developers to collaborate

2013-02-19 Thread eugenebalt
We have a Web design team and a Java development team on our project. We're
using Wicket for our pages.

I know Wicket was designed to make it easy for designers and developers to
work together, but we're actually finding the opposite -- it's difficult to
communicate changes back and forth. We're finding that the developers
increasingly have their own code tree, and the designers their own.

As a result, for every major change, someone has to "translate" the
designer's change into the actual HTML that the developers are using, which
is not the same.

The developers sometimes break pages into subpages/Panels which doesn't get
communicated back to the designers, who are still working with their own
complete pages. Should designers be actually involved in Panel
restructuring? If so, how can they work with sub-pages? Should they use an
Include tag? If they need to demo or test something, should they actually
run the real app on the server, rather than work with their own set of HTML
files? Should they check their files into the "real" folders, or their
"sandbox" template folders?

The main issue has been Panels, but there are also some other tweaks the
developers are making to "make it work" while the designers aren't aware and
are working in their own sandbox.

Just wondering, what's the best practice, the way things are supposed to
work in Wicket?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/The-best-way-for-designers-and-Wicket-developers-to-collaborate-tp4656560.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Same Panel, but Formatted in 2 Different Ways (Diff. Presentation)

2013-02-11 Thread eugenebalt
Thanks, Variants worked.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Same-Panel-but-Formatted-in-2-Different-Ways-Diff-Presentation-tp4656063p4656240.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Same Panel, but Formatted in 2 Different Ways (Diff. Presentation)

2013-02-04 Thread eugenebalt
Is it possible to have a Panel implemented in .java which has multiple
.html's?

We have a panel with the same data but different formatting.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Same-Panel-but-Formatted-in-2-Different-Ways-Diff-Presentation-tp4656063.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Does a SimpleAttributeModifier Overwrite or Append JavaScript?

2012-11-02 Thread eugenebalt
I can't try right now because of a system failure.

If I could try it I wouldn't ask it here. I was hoping for a quick response.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Does-a-SimpleAttributeModifier-Overwrite-or-Append-JavaScript-tp4653568p4653570.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Does a SimpleAttributeModifier Overwrite or Append JavaScript?

2012-11-02 Thread eugenebalt
Suppose I have this:

arg0.add(new SimpleAttributeModifier( "onclick", "myfunction();"));

Will that replace any previous onClick's, or append to them? I need to
preserve any previous JS in this attribute (append).



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Does-a-SimpleAttributeModifier-Overwrite-or-Append-JavaScript-tp4653568.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to See if a Button Goes To the Server

2012-11-01 Thread eugenebalt
I appreciate the help so far. 

A somewhat unusual question: We need a way to identify all Buttons which
don't go to the server for anything. Is there a way to identify these
"client-side-only" Buttons?

As an example, we have a Wicket Button constructed the usual way in our
form, but its only action is to erase all fields on the form via JavaScript
(it's a "Reset" button, has an onClick JS action). It doesn't go to the
server and its activity is exclusively client-side.

How can we check for these buttons in our code? Is it the fact that they
don't override an onSubmit()?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-See-if-a-Button-Goes-To-the-Server-tp4653543.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Quickly Check if a Component Contains Ajax Behaviors

2012-11-01 Thread eugenebalt
Thanks for the answers so far. My latest question is, I need to check if a
cfomponent has any Ajax behaviors added to it.

For some reason, a Component does not have visitChildren() defined for it.

I see a method called contains() but you have to have a Component reference
passed to it -- all my Ajax behaviors are added as anonymous objects to my
components.

Any ideas?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Quickly-Check-if-a-Component-Contains-Ajax-Behaviors-tp4653539.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Unable to Traverse with IVisitor: Some Class Names Have "$1" at the end

2012-11-01 Thread eugenebalt
Thanks. Working now.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unable-to-Traverse-with-IVisitor-Some-Class-Names-Have-1-at-the-end-tp4653532p4653538.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Unable to Traverse with IVisitor: Some Class Names Have "$1" at the end

2012-11-01 Thread eugenebalt
Thanks Duesen, but if I get the superclass, how can I actually get the type
of *this* class?

I need to find out if the anonymous class is a Button, a TextField, a Link,
etc.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unable-to-Traverse-with-IVisitor-Some-Class-Names-Have-1-at-the-end-tp4653532p4653536.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Unable to Traverse with IVisitor: Some Class Names Have "$1" at the end

2012-11-01 Thread eugenebalt
I am using the IVisitor to traverse all components on the current page. I'm
printing the class names on the console.

visitChildren(new IVisitor() {

@Override
public Object component(Component arg0) {
System.out.println(arg0.getClass().toString());
 return IVisitor.CONTINUE_TRAVERSAL;
}

}); 

Most of the time, the class names are right, but sometimes, I don't get
Wicket org names, I get these:

com.mycompany.MyForm.MyPanel$1   ( <-- on a Button!)
com.mycompany.SomeForm$1   ( <-- on a Button!)

What's going on here, why can't I get the actual
org.apache.wicket.markup.html.form.Button class names?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unable-to-Traverse-with-IVisitor-Some-Class-Names-Have-1-at-the-end-tp4653532.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Write Out HTML without WicketId

2012-11-01 Thread eugenebalt
Is there a way to write out literal HTML from Wicket, without using a
?

Example: We need to go thru all our pages, and add a  component. If we
were to do it the proper way we'd have to alter our HTML to add a
"wicket:id" for this . But we want a one-pass-through in the common
ancestor page that will hard-code the literal HTML for this component.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Write-Out-HTML-without-WicketId-tp4653525.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Check if a .JS Reference Already Included in HTML

2012-11-01 Thread eugenebalt
I need to dynamically add a .js reference to the rendered result. In Wicket
1.5, I understand the way to do it is 



(https://cwiki.apache.org/WICKET/adding-javascript-or-css-using-a-resource.html)

Question: How can I check if the .js has already been included? I don't want
to include it twice.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Check-if-a-JS-Reference-Already-Included-in-HTML-tp4653522.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Generically Append a JavaScript Method to all Buttons/Links Throughout App

2012-10-31 Thread eugenebalt
Hi Nick,

In the BasePage, we haven't created any of our components yet. We create
them in the Page. I need a *POST*-constructor of some kind, by which points
all the components will be created.

If I do anything in the BasePage, no components exist there yet.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495p4653502.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Distinguish AjaxButton from Button in Final HTML

2012-10-31 Thread eugenebalt
To see my usecase, look at the thread above this one, "Append JavaScript to
all Buttons/Links in App."

We need to generically append a JS reference to all buttons throughout our
app. We can do it either on the Wicket side or the JavaScript side.

- On the JavaScript side, we'd need to distinguish between a Button and an
AjaxButton, because we don't want to add a "veil" for AjaxButtons.

- On the Wicket side, maybe we can dynamically add a JS modifier to all
Button controls as part of post-construction of a page, but I'm not sure how
to do it. The Wicket side interests me more.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Distinguish-AjaxButton-from-Button-in-Final-HTML-tp4653497p4653501.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Generically Append a JavaScript Method to all Buttons/Links Throughout App

2012-10-31 Thread eugenebalt
I guess what I'm asking is, is there a common Post-Constructor place that
could be generically called in Wicket, where I could iterate through all
components and append a JavaScript modifier to selective ones (Button and
Link types)?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495p4653498.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Distinguish AjaxButton from Button in Final HTML

2012-10-31 Thread eugenebalt
Is there a way to tell, just by looking at the rendered HTML, whether the
component was a Wicket AjaxButton or a Wicket Button?

(All buttons may have various JavaScript appended to them, so you can't just
see if onClick is empty or not. For instance, a Button might have a Confirm
popup appended to it.)

But is there some kind of naming convention or a flag that could be reliably
used to tell the difference?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Distinguish-AjaxButton-from-Button-in-Final-HTML-tp4653497.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Generically Append a JavaScript Method to all Buttons/Links Throughout App

2012-10-31 Thread eugenebalt
We are using a JS library to "veil" our forms after the user clicks Submit.
(This is done to show a busy status, and prevent the user from doing
anything else until it's done.)

The veil is not a Wicket veil -- rather, we are using a separate jQuery
library. It's working fine. We have 2 apps, one Wicket and one not, so we
wanted a "neutral" JS-only veil solution that can be applied to both.

The problem is, the veil is called by doing an onClick="method();" on every
button and link.

The Wicket app is already written, and we don't want to go through every
Button and every Link (these are the 2 types of fields that should call the
veil) and add this JS method reference. Sometimes, some of our buttons will
already have some JS, others won't.

Is there a quick, generic way to always auto-append this, throughout every
page and every Button/Link, on an already-existing Wicket app? Any
recommendations? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-10-16 Thread eugenebalt
Thanks Sven, that was it! They were clicking again while the form was still
processing.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4653019.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-10-16 Thread eugenebalt
Hi,

Sorry, I have to bump thread back up again. We still have no clear idea how
to address this issue, which only happens sporadically on our production
server (and we can't reproduce it locally).

We have screens with Ajax Buttons which submit forms, but also disable/hide
these Ajax buttons. I am guessing, based on earlier answers, that sometimes,
the disable/hide happens *BEFORE* the Form Submit, and Wicket doesn't like
that. Wicket requires that all form fields be enabled and visible to ensure
form integrity.

The simplest question is, how do we turn off this check in Wicket, or how do
we guard against this error? 

"Submit button is not visible" or "Submit button is enabled".

We can't rewrite our app from scratch, it has a lot of screens and a lot of
functionality, we do need to toggle these buttons when submitting the form.
Please, any help would be appreciated.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4653012.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Catch the doGet/doPost on every request and override it

2012-09-17 Thread eugenebalt
Thanks so much!!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652047.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Catch the doGet/doPost on every request and override it

2012-09-17 Thread eugenebalt
Sorry, one more question. Is it possible to know which active Page I'm
currently on during this request interception?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652045.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Catch the doGet/doPost on every request and override it

2012-09-17 Thread eugenebalt
Thanks, I found an example here:
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/cycle/IRequestCycleListener.html




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652044.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Catch the doGet/doPost on every request and override it

2012-09-17 Thread eugenebalt
What I'm looking for is some kind of an overridable onRequest() or a Request
Listener that would apply to all requests within the Wicket app.

(This must be done on the Request level, not on the Page level.)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038p4652043.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Catch the doGet/doPost on every request and override it

2012-09-17 Thread eugenebalt
In Wicket, is there an easy way to override the doGet/doPost on every request
in order to add some common code that should fire on every request? I used
to know but forgot.

The idea is to add some common code e.g. database transaction start/end for
the request scope.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Catch-the-doGet-doPost-on-every-request-and-override-it-tp4652038.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Pre-Select DropDownChoice Selection, but No Model yet

2012-08-28 Thread eugenebalt
(Note: In my form, I am using a CompoundPropertyModel. So my DropDownChoice
is automatically tied to the field in my bean.)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selection-but-No-Model-yet-tp4651578p4651579.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Pre-Select DropDownChoice Selection, but No Model yet

2012-08-28 Thread eugenebalt
I am in the form-construction part of my code (the Model has not been created
yet, because Submit hasn't been pressed yet).

I have a DropDownChoice, and I need to pre-select a certain item. How do I
do it? The DropDownChoice has already been constructed.

I can't do setModelObject(..) because the model is still null at this point,
I get an error. Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selection-but-No-Model-yet-tp4651578.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax onUpdate (DropDown) Invoked In One Place, But Not The Other

2012-08-22 Thread eugenebalt
Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-onUpdate-DropDown-Invoked-In-One-Place-But-Not-The-Other-tp4651438p4651442.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax onUpdate (DropDown) Invoked In One Place, But Not The Other

2012-08-22 Thread eugenebalt
Looking further in our code, I see that the 2nd form (which has the problem)
defines an additional Ajax "onchange" on its own, it finds the dropdown and
adds this extra Ajax code:

final DropDownChoice myDropDown =
(DropDownChoice)((Panel)get("myPanel")).get("myDropDown");
myDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange") {
protected void onUpdate(AjaxRequestTarget target) 
   ...
}
});


Is this an issue? Is there a problem getting *both* Ajax updates to kick in,
both the Form2-specific one and the general Panel one? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-onUpdate-DropDown-Invoked-In-One-Place-But-Not-The-Other-tp4651438p4651439.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Ajax onUpdate (DropDown) Invoked In One Place, But Not The Other

2012-08-22 Thread eugenebalt
I have a reusable Panel which contains a DropDownChoice.

The DropDownChoice has an Ajax onChange action defined on it,

protected void onUpdate(AjaxRequestTarget target) {
...
}

When I add the Panel to one of my forms, the Ajax action gets invoked
correctly on the DropDown change, but when I add it to a different form, the
Ajax action never gets invoked. It's the same reusable Panel. The Ajax
action works in one place, but not the other (I verified that nothing
happens by adding debug statements to onUpdate).

Can anyone suggest any theories on what the problem might be with the 2nd
form that uses this panel? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-onUpdate-DropDown-Invoked-In-One-Place-But-Not-The-Other-tp4651438.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-14 Thread eugenebalt
It is true that we have multiple buttons on our form that we are
disabling/hiding selectively.

Our scenario: a panel that contains the button "Edit", and then when it's
clicked, the panel opens and "Edit" is replaced by two other visible buttons
- "Submit" and "Cancel". "Edit" is gone. We need this dynamic behavior to
enable rich, "self-changing" forms.

Example:

add(new Button ("editButton"){
  @Override
 public boolean isVisible() {
 return showeditbutton;
}
@Override
public void onSubmit() { 
  showeditbutton = false;// hide this one
  showsavebutton = true;   // show the others
  showcancelbutton = true;
}
}

These are global variables/flags on the form. 

So given this "self-changing form" requirement, what's the fastest way to
get rid of this intermittent "Not Enabled / Visible" error? Is there a way
to turn off this validation in Wicket?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4651233.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-14 Thread eugenebalt
Thanks a lot. In our case, we have an AjaxButton that maps to a "input
type=submit".

Would using the input type "Button" get rid of this problem?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4651231.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-13 Thread eugenebalt
We have an Ajax button which, when clicked, occasionally produces this
WicketRuntimeException:

 ERROR [WebContainer : 17] (RequestCycle.java:1521) - Submit Button
myPanel:editButton (path=myForm:myPanel:editButton) is not enabled
org.apache.wicket.WicketRuntimeException: Submit Button myPanel:editButton
(path=myForm:myPanel:editButton) is not enabled
at
org.apache.wicket.markup.html.form.Form$2.component(Form.java:626)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:878)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:893)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:893)
at
org.apache.wicket.markup.html.form.Form.findSubmittingButton(Form.java:602)
at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:875)
at sun.reflect.GeneratedMethodAccessor2603.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
at 

Is there a race condition of some kind happening here? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Form Submit Button not recognizing latest Ajax changes in included Panel

2012-07-12 Thread eugenebalt
We have a Form which has a regular Form Submit button (a "Button").

Inside the Form there is a Panel with various actions happening via Ajax.
The Panel has 4 dropdowns where each selection triggers create/delete of
other dropdowns. These Ajax actions are all outsourced to the Panel.

Our problem is that when the Form Submit happens (a regular submit), the
form doesn't know about the latest Ajax actions inside the Panel. For
example, initially, some of the Panel's dropdowns haven't been created yet,
they get created later on as the user interacts with the Panel. 

But on the Form, e.g. when we do validation we need access to all the
Panel's latest-created fields, and they're still NULL because the Form
doesn't know about the latest changes on the Panel.

Is there a way around this, to make the Form aware of the latest Ajax
changes inside the embedded Panel? Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-Submit-Button-not-recognizing-latest-Ajax-changes-in-included-Panel-tp4650481.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxCheckBox inconsistently showing state (value)

2012-06-13 Thread eugenebalt
Problem resolved - there was another large Ajax update from another component
that was interfering and hadn't finished yet.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxCheckBox-inconsistently-showing-state-value-tp4649941p4649943.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxCheckBox inconsistently showing state (value)

2012-06-13 Thread eugenebalt
Actually, the solution I found is to do this in the AjaxCheckBox's
onUpdate():

*arg0.addComponent(this);*

This works - the checkbox always returns to the correct value after
switching it. But what could possibly lead to this? Why would there be a
situation where I need to addComponent(this)?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxCheckBox-inconsistently-showing-state-value-tp4649941p4649942.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxCheckBox inconsistently showing state (value)

2012-06-13 Thread eugenebalt
I have an AjaxCheckBox; when selected, several components get hidden,
otherwise the extra components are shown.

It works, but several times, when selecting the AjaxCheckBox, the extra
components go away correctly, but the value of the AjaxCheckBox quickly
changes from selected *back* to non-selected. The final result of this Ajax
update is that the checkbox is shown un-selected even though it should be
selected.

On any subsequent clicks, the state is synchronized. This inconsistent state
never happens again.

What could it be? As far as I can tell, this AjaxCheckBox is not directly
getting updated from any other sources (it's not target.addComponent-added
from other Ajax actions). Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxCheckBox-inconsistently-showing-state-value-tp4649941.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Close Pop-up Window From Server?

2012-04-18 Thread eugenebalt
Maybe this isn't strictly a Wicket question, but I have a link from the main
page which opens a pop-up window. The pop-up has a form handled by a servlet
(in my case, a Wicket page mounted to a servlet-like URL).

Upon completing the form in the pop-up, I need to close the pop-up window
*from the server*. There is no way to do it in the client. The client form
is a "black-box" Adobe container which only sends HTTP request params to my
servlet.

After closing the popup, I also need to refresh the main page, which shows a
listing of all user records (including the new one just entered in the
popup). Is there a way to accomplish that? Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Close-Pop-up-Window-From-Server-tp4567812p4567812.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: AjaxIndicatingDropDownChoice

2012-03-27 Thread eugenebalt
Thanks, good solution.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatingDropDownChoice-tp4506224p4509566.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxIndicatingDropDownChoice

2012-03-26 Thread eugenebalt
Disregard. I got everything to work by implementing IAjaxIndicatorAware.

My only remaining question is this: I see the spinner, but my cursor is
still Auto rather than Wait (Hourglass).

How do I change the cursor to Wait as long as the spinner is also spinning?
Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatingDropDownChoice-tp4506224p4506641.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxIndicatingDropDownChoice

2012-03-26 Thread eugenebalt
Sorry, to clarify:

This guy defines AjaxIndicatingDropDownChoice as an abstract class. Why is
it abstract? I want to be able to add it to my form like a regular dropdown
choice.

And why isn't this component already available in Wicket?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatingDropDownChoice-tp4506224p4506289.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxIndicatingDropDownChoice

2012-03-26 Thread eugenebalt
I found another user's code for an Ajax-Busy-Indicator DropDownChoice:

http://apache-wicket.1842946.n4.nabble.com/Wicket-extensions-AjaxIndicatingDropdownChoice-td3088554.html

but how do I use this code? When I construct the DropDown, I need to give it
an extra parameter, a MarkupContainer. What is it, and how is it
initialized?

Also: do I need to do anything in my HTML, such as any "busy-indicator"
JavaScript, or does this class take care of everything?

My goal is to have a DropDownChoice which gives a 'busy' indicator when it
processes an AJAX request.

Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatingDropDownChoice-tp4506224p4506224.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AJAX Requests Too Slow, Have a Delay on Component Refresh

2012-03-26 Thread eugenebalt
I'll try the IndicatorAjax, but is there a reason for the noticeable delay?

Is it possible to configure a shorter period for Ajax updates?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AJAX-Requests-Too-Slow-Have-a-Delay-on-Component-Refresh-tp4499154p4505872.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



  1   2   3   >