Skip to Content
0

Add sap.m.table growing property, when click "more", it will load data cyclicly

Oct 18, 2017 at 02:30 AM

34

avatar image
Former Member

Hi,

I met a problem, when I click "more" button, it'll load table binding data cyclicly.

xml:

	<Table id="taskTable" growing="true" growingScrollToLoad="false" growingThreshold="50">
		<columns>
			<Column>
				<Text text="object id"/>
			</Column>
			<Column>
				<Text text="short text"/>
			</Column>
			<Column>
				<Text text=""/>
			</Column>
		</columns>
		<items>
			<ColumnListItem type="Active">
				<cells>
					<ObjectIdentifier title="{ObjectId}" text="{ObjectId}"/>
					<Text text="{ShortText}"/>
					<Button text="Show task" press="onTaskPress" type="Transparent"/>
				</cells>
			</ColumnListItem>
		</items>
	</Table>

binding data in js:

	_updateTaskTable: function() {
		//column list item creation
		var oTemplate = new sap.m.ColumnListItem({
			type: "Active",
			cells: [new sap.m.ObjectIdentifier({
				titile: "{ObjectId}",
				text: "{ObjectId}"
			}), new sap.m.Text({
				text: "{ShortText}"
			}), new sap.m.Button({
				type: "Transparent",
				text: "Show task",
				press: this.onTaskPress
			})]
		});
		//current project guid
		var projectGuid = "";
		if (location.hash.split('guid\'')[1] !== undefined) {
			projectGuid = location.hash.split('guid\'')[1].split('\'')[0].replace(/-/g, "").toUpperCase();
		} else {
			projectGuid = "newProject";
		}
		this.oTaskTable.bindItems({
			path: '/cip_task',
			template: oTemplate,
			filters: [new sap.ui.model.Filter({
				path: 'LinkedObject',
				operator: 'EQ',
				value1: projectGuid
			})]
		});


	},
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member
Oct 18, 2017 at 05:14 AM
0

Solved. It's because backend server didn't send inlinecount(total number of this entityset).

lv_table_size = lines( et_entityset ).
es_response_context-inlinecount =  lv_table_size.
Share
10 |10000 characters needed characters left characters exceeded