Override appendOptionHtml in a DropDownChoice with setRequired(true)

2007-09-25 Thread bebetu

Hi,
I am using Wicket 1.3 beta3. I want to have a mandatory DDC in a WizardStep
so I have ddc.setRequired(true). 
I've overridden appendOptionHtml to handle the option rendering and I
noticed that whenever I submit the step with a valid selection on the DDC, I
get a feedback error message saying that the DDC field is mandatory.
If I don't override the appendOptionHtml method the behavior is as expected.
Is this a bug?

florin
-- 
View this message in context: 
http://www.nabble.com/Override-appendOptionHtml-in-a-DropDownChoice-with-setRequired%28true%29-tf4515329.html#a12878901
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Formless DropDownChoice selected value is null

2007-09-23 Thread bebetu

I'm not using a form, it's a simple dropdownChoice in a wizard step.


swaroop belur wrote:
 
 You should use ajaxformcomponentupdatingbehavior instead of
 AjaxEventBehavior . I think AjaxEventBehavior just triggers the server
 side call and does not update model
 
 -swaroop
 
 
 On 9/23/07, bebetu [EMAIL PROTECTED] wrote:


 Hi,
 I have a DropDownChoice in a WizardStep component (Wicket 1.3 beta 3) and
 I
 want to read the selected value then update a text label based on
 selection
 as well as disable the Next button if the user hasn't made a selection.
 First of all I cannot get the selected value when I run the code below,
 the
 selectedChoice variable is always null.
 Secondly, how to ajaxify the Next wizard button based on the selection?
 What am I doing wrong?

 final ValueMap choiceMap = new ValueMap();
 final PropertyModel ddcModel = new PropertyModel(choiceMap,
 selectedOption);
 final DropDownChoice ddChoice = new DropDownChoice(choiceId, ddcModel,
 someOptionList);
 ddChoice.add(new AjaxEventBehavior(onchange) {
@Override
protected void onEvent(AjaxRequestTarget target) {
   Object selectedChoice =
 choiceMap.get(selectedOption);

}
 });

 Thanks!
 florin



 
 

-- 
View this message in context: 
http://www.nabble.com/Formless-DropDownChoice-selected-value-is-null-tf4502016.html#a12848011
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Formless DropDownChoice selected value is null

2007-09-22 Thread bebetu

Hi,
I have a DropDownChoice in a WizardStep component (Wicket 1.3 beta 3) and I
want to read the selected value then update a text label based on selection
as well as disable the Next button if the user hasn't made a selection.
First of all I cannot get the selected value when I run the code below, the
selectedChoice variable is always null. 
Secondly, how to ajaxify the Next wizard button based on the selection?
What am I doing wrong?

final ValueMap choiceMap = new ValueMap();
final PropertyModel ddcModel = new PropertyModel(choiceMap,
selectedOption);
final DropDownChoice ddChoice = new DropDownChoice(choiceId, ddcModel,
someOptionList);
ddChoice.add(new AjaxEventBehavior(onchange) {
@Override
protected void onEvent(AjaxRequestTarget target) {
   Object selectedChoice =
choiceMap.get(selectedOption);

}
});

Thanks!
florin
-- 
View this message in context: 
http://www.nabble.com/Formless-DropDownChoice-selected-value-is-null-tf4502016.html#a12839591
Sent from the Wicket - User mailing list archive at Nabble.com.


Add image to DropDownChoice

2007-09-15 Thread bebetu

I am trying to embed images into options of a DropDownChoice but I haven't
succeeded so far nor I could find examples regarding this. Any idea how to
do this?

Thanks!
florin 
-- 
View this message in context: 
http://www.nabble.com/Add-image-to-DropDownChoice-tf4449619.html#a12695493
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Flash object still visible underneath a ModalWindow

2007-09-12 Thread bebetu

Solved it. 
It turns out that a flash object is always rendered on the topmost layer of
a page regardless of the z-index order.
To be able to place the flash object underneath a popup you need to add a
param to the SWFObject :
swfObj.addParam(wmode, opaque);

I've added this in SWFObject.java class (I'm using the SWFObject.java
attached here https://issues.apache.org/jira/browse/WICKET-309). Just add 

  response.write(swfVar + .addParam('wmode', 'opaque'););
before line
 response.write(swfVar + .write(' + id + '););

so the flash object will become blocked by the popup dialog as expected.
I got the idea from here (check the last section):
http://pipwerks.com/lab/swfobject/

florin


Al Maw wrote:
 
 bebetu wrote:
 Hi,
 I am experiencing a strange issue with a ModalWindow behavior (I'm using
 wicket 1.3 beta3). The main page content contains a flash object (I'm
 using
 a SWFObject to render it) and when a ModalWindow pops-up over this
 content,
 the flash object is still visible below. in Firefox the flash content
 becomes clickable once I drag the ModalWindow clear from the flash object
 rendered below. In IE the flash object is visible and clickable the whole
 time after the ModalWindow is displayed.
 
 Has anyone experienced this issue? Any advice is appreciated.
 
 Yeah. :-(
 
 It's a bug in Internet Explorer. You could probably work around it by 
 hiding the whole of the Flash object while the window is popped up. We 
 already have JS code that does this for drop-down select boxes (which 
 exhibit the same problem in IE). You might be able to crib the code from 
 that. Patches are welcome. ;)
 
 Regards,
 
 Al
 
 -- 
 Alastair Maw
 Wicket-biased blog at http://herebebeasties.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Flash-object-still-visible-underneath-a-ModalWindow-tf4409822.html#a12640052
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Flash object still visible underneath a ModalWindow

2007-09-10 Thread bebetu

The issue is present in both IE and Firefox (flash visible at all times), the
difference is that on IE the flash object is clickable the whole time
whereas in Firefox becomes clickable only when I move the popup away from
the flash content.
I'll try the invisibility solution if nothing else is available...

Thanks,
florin



Al Maw wrote:
 
 bebetu wrote:
 Hi,
 I am experiencing a strange issue with a ModalWindow behavior (I'm using
 wicket 1.3 beta3). The main page content contains a flash object (I'm
 using
 a SWFObject to render it) and when a ModalWindow pops-up over this
 content,
 the flash object is still visible below. in Firefox the flash content
 becomes clickable once I drag the ModalWindow clear from the flash object
 rendered below. In IE the flash object is visible and clickable the whole
 time after the ModalWindow is displayed.
 
 Has anyone experienced this issue? Any advice is appreciated.
 
 Yeah. :-(
 
 It's a bug in Internet Explorer. You could probably work around it by 
 hiding the whole of the Flash object while the window is popped up. We 
 already have JS code that does this for drop-down select boxes (which 
 exhibit the same problem in IE). You might be able to crib the code from 
 that. Patches are welcome. ;)
 
 Regards,
 
 Al
 
 -- 
 Alastair Maw
 Wicket-biased blog at http://herebebeasties.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Flash-object-still-visible-underneath-a-ModalWindow-tf4409822.html#a12595683
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]