You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Gerolf Seitz (JIRA)" <ji...@apache.org> on 2008/04/09 13:47:24 UTC
[jira] Resolved: (WICKET-1499) AjaxEditableMultiLineLabel + race
condition /
[ https://issues.apache.org/jira/browse/WICKET-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gerolf Seitz resolved WICKET-1499.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.4-M1
1.3.4
fixed. thx.
> AjaxEditableMultiLineLabel + race condition /
> ----------------------------------------------
>
> Key: WICKET-1499
> URL: https://issues.apache.org/jira/browse/WICKET-1499
> Project: Wicket
> Issue Type: Bug
> Components: wicket-extensions
> Affects Versions: 1.3.3
> Reporter: Jan Kriesten
> Assignee: Gerolf Seitz
> Fix For: 1.3.4, 1.4-M1
>
>
> There are two issues concerning AjaxEditableMultiLineLabel:
> a) Race condition cancel editing
> Using 'Esc' to cancel editing might lead to two events to be fired: first onKeypress is executed - which leads to bluring the component in Opera. This results in the onblur-event firing and the input is submitted!
> Changing the code in onComponentTag to
> protected void onComponentTag(ComponentTag tag)
> {
> super.onComponentTag(tag);
> final String saveCall = "{wicketAjaxGet('" + getCallbackUrl() +
> "&save=true&'+this.name+'='+wicketEncode(this.value)); return false;}";
>
> final String cancelCall = "{wicketAjaxGet('" + getCallbackUrl() +
> "&save=false'); this.onblur=''; return false;}";
>
> final String keypress = "var kc=wicketKeyCode(event); if (kc==27) " + cancelCall +
> "; ";
>
> tag.put("onblur", saveCall);
> tag.put("onkeypress", keypress);
> }
> stops onblur being fired.
> This might also apply for AjaxEditableLabel - though I haven't seen this happening there yet.
> b) Displaying defaultNullLabel on empty String Model:
> Should behave like AjaxEditableLabel, i.e.:
> protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
> {
> Object modelObject = getModelObject();
> if (modelObject == null || "".equals(modelObject))
> {
> replaceComponentTagBody(markupStream, openTag, defaultNullLabel());
> }
> else
> {
> super.onComponentTagBody(markupStream, openTag);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.