on 04-27-2015 4:06 PM
Hi Experts,
I need to implement Auto tab functionality in side sap.m Table .
I have two input fields in two colums inside sap.m.table. I have fixed length Value for each input filed ,once I filled first Input field in a row1, next cursor has automatically move to next field.
Once row values are filled it has continue with next row until all columns .
Auto tabbing is possible in jQuery.How to implement it for SAP UI5,could you help me out on this.
Thanks in advance.
product | Quantity |
---|---|
BR
Sitara
I posted on stack overflow and got this answer, but is still not working
javascript - SapUI5 Autotab in sap.m.Table - Stack Overflow
Add the respective styleClass
to your table
.
oTable.addStyleClass('number');
then in onAfterRendering() have your jQuery statements.
$(function () { $('.number').autotab('filter','number'); });
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Go with this link.
Mathachew/jquery-autotab · GitHub
This is a separate plugin an you have to keep this file in your app.
Hi,
I'm trying to implement it in application, addStyleClass('alphanumeric') on a inputfield is adding alphanumeric class to the DIV element of the input element.
Attached are the image of view code and from Chrome developer tools.
As per autotab documentation class has to be added to the field(input field).
Let me know if my understanding is correct or not.
Thanks,
Dheeram
Message was edited by: Dheeram Kallem I was able to achieve auto tabbing. I did it by using id of the element. And used manually setting the element, target and previous one by using below like statement. $('#alphanumeric2').autotab({ format: 'alphanumeric', target: '#alphanumeric3', previous: '#alphanumeric1' });
Hi,
By using Chrome Developer tools, check actual element ID and use that in autotab function. This will be tricky as sometimes SAPUI5 events will not work(not sure why, I need to dig deep into it, but I had a workaround on this), so you need to debug you view. Check how are the element ID's are getting generated for same column in table. You can have some logic on looping through them.
You might have to add addEventDelegate function as shown below:
addEventDelegate({
onAfterRendering: function(){
<SOME FUNCTION WHICH WILL LOOP THOURH YOUR TABLE ELEMENTS and CREATES autotab function for each element>
}
}, this)
Note: I had used autotab in form fields.
Hope this might help. As I said it's not going to be straight forward.
Thanks,
Dheeram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sitara,
You can use the functions of jQuery in SAPUI5.
$( function () { |
3 | $( '.number' ).autotab( 'filter' , 'number' ); |
4 | }); |
$(
'.number'
) here .number is the classname.
These links might be helpful.
jQuery Plugin For Auto Tab Form Fields - autotab | Free jQuery Plugins
Autotab: jQuery auto-tabbing and filter plugin
Regards
Dhananjay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.