cancel
Showing results for 
Search instead for 
Did you mean: 

re-arranging the tiles in sapui5

Former Member
0 Kudos

Hi Experts,

I have created a SAPUI5 application for re-arranging the tiles on click of a button. The application was working fine and was able to re-arrange the tiles and model data was also getting updated.

Now, when i am trying to run the application again i am getting the error message as "Uncaught TypeError: Cannot read property 'style' of null".

Kindly assist me in fixing the error.

JS Bin link:  JS Bin - Collaborative JavaScript Debugging

Thanks & Regards,

Varun V

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Varun,

If I comment on below line in tileMove event , it works fine: JS Bin - Collaborative JavaScript Debugging


// var i = swap(obj1, initial, obj1, last);

What exactly are you trying to achieve with 'swap' function?


Regards,

Sai Vellanki.

Former Member
0 Kudos

Hi Sai,

Using the swap function i am trying to update the model data.

For example, if I re-arrgange the tiles say Tile 0, Tile 1, Tile 2 to Tile 1, Tile 0, Tile 2 the corresponding model should get updated.

Thanks for your response . Looking forward for your response.

Thanks & Regards,

Varun V

saivellanki
Active Contributor
0 Kudos

Varun,

Try adding a delayedCall to that function, it should work: JS Bin - Collaborative JavaScript Debugging

Regards,

Sai Vellanki.

Former Member
0 Kudos

Thanks for your repsonse. It is working after adding delayed call to that function.

Regards,

Varun V

Former Member
0 Kudos

Hi Sai,

Also wanted to know why you added dealyedcall to the swap function since the same code was working fine last month and it stopped working all of sudden from last 2 weeks or so. .

Regards,

Varun V

Answers (1)

Answers (1)

Former Member
0 Kudos

Looping in , .

Kindly assist.

former_member185414
Active Contributor
0 Kudos

Hi Varun,

The error is coming at -

Unfortunately I don't know the fix and let's wait for other gurus.

BR.