Follwing code snippet adds dropdown.
private DropDownChoice getDropDown1(final Label image){
DropDownChoice dropDown1 = new DropDownChoice("selectUser",new
PropertyModel(model,"user1"),Arrays.asList(options),choiceRenderer);
favsDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange"){
/**
* When Specified event took place this method gets called
* @param target
*/
@Override
protected void onUpdate(AjaxRequestTarget target) {
String imageUrl = null;
String user = model.getUser1(); // selected user object from
drop down
imageUrl = getImage(user);
imageUrl = imageUrl == null? "" : imageUrl;
model.setImageUrl(imageUrl); // sets new image model
image.add(new AttributeModifier("src",new
PropertyModel(model,"imageUrl"))); // sets image src
target.addComponent(image);
}
});
return dropDown1;
}
When dropdown selection changes I need to modify image related to it.
Frank Bille wrote:
>
> Hi
>
> I haven't got experience with that error. Can you please post the code
> that
> is not working?
>
> Frank
>
>
> On 6/11/07, Javed <[EMAIL PROTECTED]> wrote:
>>
>>
>> I need to change image according the selection made in dropdown.
>> It is working fine Firefox but not in IE
>>
>> I tried it with "onchange" and "onclick". It worked in Firefox but some
>> how
>> it is not working IE.
>>
>> Is there anything I am missing?
>> Is there any other approach to achieve the same functionality with Ajax
>> effect?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11059387
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
--
View this message in context:
http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11075468
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user