Community
Participate
Working Groups
Created attachment 180600 [details] Patch for org.eclipse.riena.ui.ridgets.swt fixes NumericTextRidget to work with RAP The RAP SWT implementation does not send a proper VerifyEvent in case of text input via keyboard. It does not set the VerifyEvent.character field. This prevents the NumericTextRidget and derived classes from working properly. The attached patch is a workaround which should be removed after the RAP bug is fixed.
Patch applied, thanks Jürgen. I will keep this Bug open until the RAP bug is fixed and we can remove the workaround.
After further testing I found another Problem with the NumericTextRidget. If I enter or delete characters very fast, the order of the characters gets mixed up. This is caused by RAP JS code: After I entered a character the server response (JS-Code) will update the text widget. The code looks something like this: var w = wm.findWidgetById( "w472" ); w.setValue( "121,211,221" ); org.eclipse.swt.TextUtil.setSelection( w, 5, 0 ); The setValue(...) call updates the value and moves the cursor in the widge to the end of the new value. The TextUtil.setSelection( w, 5, 0 ) call should correct the cursor position. The problem is, the cursor move is delayed. from TextUtil.setSelection: ... qx.client.Timer.once( function() { text.setSelectionStart( start ); text.setSelectionLength( length ); }, text, 50 ); ... So, we have a time gap where the cursor position is wrong. Ever keystroke during that gap will mix up the value. I don't know why the delay is kneed. We should ask the RAP team. I currently have no workaround.
I think the solution here is to add a simplified implementation for RAP. The simplified implementation should avoid doing formating / validation / cursor positioning on key-by key basis. Instead we should either be able to handle several aggregated keystrokes (i.e. what RAP does) or format and validate the text widget's contents when the focus is about to leave the widget. Needs further investigation. Bumping up to P2 because it´s annoying.
Ressigning to default assignee. Not working on Riena right now.
Reassigning to default assignee. Not working on Riena right now.