Make Swing CTextArea consistent with ZK
Description
Environment
Attachments
- 27 Jun 2012, 06:02 PM
relates to
testing discovered
Activity
https://bitbucket.org/hahmed/idempiere/changeset/1c201bf21799
Migration script numbering Fixed
Forgot to add LastMigrationScriptApplied update, done
boolean value read from sysconfig
Enter should enable save (which marks the update done) since this is how all other fields behave. After pressing enter if we press F4 or switch tabs/records the value is saved.
This is something we need to discuss, since we can not use Shift+Tab as its used for navigation. Maybe its time to consider rich text formatted text area! On the second note, I have not seen much need of entering tab in description/docnote fields etc.
Hi Hahmed, thanks a lot for your work.
Peer review recommendations:
numbering of migration scripts must be 851
UPDATE AD_System.LastMigrationScriptApplied must be added manually at the end of migration script
Instead of reading the sysconfig as String it can be read as boolean with default as false this way:
boolean taBehaviour = MSysConfig.getBooleanValue("SWING_OVERRIDE_TEXT_AREA_BEHAVIOUR", false, Env.getAD_Client_ID(Env.getCtx())); if (taBehaviour)
On my tests Enter is enabling the save button and Shift+Enter insert a line (fine, perhaps Enter must move to next field?)
I was not able to insert a Tab on the description field on Sales Order, Shift+Tab is navigating to the previous field and Tab to the next field (I see this is zkwebui behavior, but I feel like we lose the ability to add Tabs on description fields, is that desired? or better we add that capability to zkwebui?)
Regards,
Carlos Ruiz
Please review and integrate
https://bitbucket.org/hahmed/idempiere/changeset/994a9b5493dd
Commented on weekly meeting
http://www.globalqss.com/wiki/index.php/IDempiere/FullMeeting20120711
In the swing client if we press enter on a Text field (e.g. Document Note) it inserts a new line, while on ZK pressing ENTER fires a change event and allows to save the change. On ZK Shift+Enter is used to enter a new line. The default behaviour of Swing client can be very confusing due to the following:
Unlike all other fields, we can not save the changes in Text field by pressing Enter and F4, which causes confusion as many times the user would press Enter and F4 and leave the record only to return back and find it was not saved.
The only easy way to get the Save button after changing Text field is to click at any other field, or click the Save button, this requires use of a mouse and slows the data entry.
ZK and Swing clients should have the similar behaviour for such fields
NOTE *** I am attaching a VERY UGLY patch but it can be used as a starter, it might be the only way of doing or it might be the worst way of doing this. Please test and give feedback. If this can be integrated into head then I will also do similar for TAB (to make tab change field and shift+TAB insert a real tab)