cancel
Showing results for 
Search instead for 
Did you mean: 

After Time out redirect to login page in sapui5 and color change for a particular input field

former_member321020
Participant
0 Kudos

Hi Experts,

I have developed an application in sapui5 using XML. It contains (sap.ui. table) table with update button where user tries to change the values of particular column and when clicks on update button,the values updates in the backend table. This is all working fine.

Here, i have two issues:

1. After time out, when user tries to do any activity on the page(like clicking on button or clicking on any area of the page), the page does not respond and it does not show any message to user. But when open in console it shows error log that session was time out.

Here i want to redirect to login page automatically when user performs any activity on the page if the session is timed out Or it should get a pop up message about time out session.How to get this?

2. When user changes particular value of the column in the table then border color of the input value should change to purple. i have used sap.m.input and used event "change"(which is borrowed from sap.m.inputbase). In this event change, when value of the input field of taable is changed then the border color should change to purple.How to achieve this?

Thanks

shashi

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192494
Participant
0 Kudos

Hi Sheshi,

Please find my comments below,

1) Refer the link, "https://stackoverflow.com/questions/9564602/how-to-know-browser-idle-time/9564811#9564811". Find the session time of the server and you can use the same as browser idle time. After which navigate to the home page, asking the user to login again.

2) In the attachChange event, you can give ur css class with border color as violet,

CSS,

.violetColor .sapMInputBaseInner {

border: 1px solid #9269ec;

}

Controller,

onChange: function(oEvent){

var oInput = oEvent.getSource();

oInput.addStyleClass("violetColor");

},

Regards,

Ravikiran

former_member321020
Participant
0 Kudos

Hi Ravikiran,

For the second question solution, i am able to get the violet color when i change the value. But when i scroll the table down, still the violet color show for that cell for the next set of records. Actually it should not show violet color when i scroll the table to see next set of records.How to achieve this?

Apart from the above concern, if i revert back the value then violet color should be removed. How to do this?

Thanks

sheshi