on 02-13-2014 2:27 PM
Hi all,
I am working on "Simple Table", one of the sample SDK components provided by SAP.
I need to extend the solution with "Row Selections" and returning the selected row values to BIAL script. I have added properties in Contribution.xml file for "OnClick" event and added functions in component.js to respond to "Click" event.
However I am not able to get this working , I always get the return values as "Undefined".
Any advise on methodology to achieve this with sample SDK implementation code /references would be of great help.
Regards,
Anil
I finally got this working using following code snippets,
This was added in component.js to respond to clicking event.
this.jqTable.on("click", "tr", function showText (evt) {
//alert($(this).text());
rowSelected = $(this).text();
that.firePropertiesChanged(["rowClicked"]);
that.fireEvent("onclick");
});
This was added subsequently to return the selected row,
this.rowClicked = function(value) {
if (value === undefined) {
return rowSelected;
else {
return this;
}
};
This was added in contribution.ztl to link to BIAL script function
/* Use to get Text of selected row */
String getRowClicked() {*
return this.rowClicked;
*}
Following entries are made in contribution.xml
<property id="onclick" type="ScriptText" title="On Click" group="Events" />
<property id="rowClicked" type="String" title="Row Clicked" visible="false" />
You can modify the return values based on your requirements. This will help you to return values to BIAL script function and further use them in DS environment.
post helped me to achieve this. Thanks Michael.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.