Re-rendering the same page

Re-rendering the same page

  

Hi Everyone!
I am developing in Mobile and I noticed that if add a link, say in the bottom bar... If the link is pointing to the same page in which I am currently on, the page re-renders everything. Like, if I'm on the HomeScreen and I click the "Home" link which points to my HomeScreen, but I'm already on my HomeScreen, the screen re-renders & slides in. Is there a way to disable that?
I guess I could go through each screen and give it a specific bottom bar and just not input a link on that certain link/page, but it would be nice if it could be completed in a better way.

Any suggestions! Thanks everyone!

Hi Bryan,

On a link just call client action & at the last use End widget.

Thanks,

Rajat Agrawal

Rajat Agrawal wrote:

Hi Bryan,

On a link just call client action & at the last use End widget.

Thanks,

Rajat Agrawal

So each link needs to call a client action? Can it be the same Client Action? Sorry, can you elaborate?
Would the Client action have the link destination as well, or just the End widget?

Thanks!


Hi,

Below is the screenshot of link and client action in destination - 



If you only want to redirect to your current screen without any business logic then below is the screenshot - 


Thanks,

Rajat

Rajat Agrawal wrote:

Hi,

Below is the screenshot of link and client action in destination - 



If you only want to redirect to your current screen without any business logic then below is the screenshot - 


Thanks,

Rajat

Thanks for your reply, but I don't think this is what I am looking for. Unless you expect me to make new bottom bar items for each page.

You see, I plan on having 2 links in the bottom bar... 'Home' (Links to HomeScreen) & 'Next' (Links to NextScreen)...With your implementation, when I am currently on the 'NextScreen' and I click the 'Home' link in the bottom bar, it will not do anything, because I have it set to the action with only a Start & End statement. Right?

Basically all my pages are going to have the same 2 bottom bar links. 'Home' & 'Next'.
When I am currently on the NextScreen and I click 'Next' in the bottom bar, it shouldn't re-render the page, it should just do nothing, but when clicking 'Home' in the bottom bar while on the "NextScreen', it will take me to the correct page. Same with the HomeScreen... If I am currently on the HomeScreen and I click, 'Home' it should not re-render the page, but if I am on the HomeScreen and click, 'Next' it should take me to the correct page.

Does this mean I have to have different bottom bar items for each screen?

Thanks!!


Bryan Royalty wrote:

Rajat Agrawal wrote:

Hi,

Below is the screenshot of link and client action in destination - 



If you only want to redirect to your current screen without any business logic then below is the screenshot - 


Thanks,

Rajat

Thanks for your reply, but I don't think this is what I am looking for. Unless you expect me to make new bottom bar items for each page.

You see, I plan on having 2 links in the bottom bar... 'Home' (Links to HomeScreen) & 'Next' (Links to NextScreen)...With your implementation, when I am currently on the 'NextScreen' and I click the 'Home' link in the bottom bar, it will not do anything, because I have it set to the action with only a Start & End statement. Right?

Basically all my pages are going to have the same 2 bottom bar links. 'Home' & 'Next'.
When I am currently on the NextScreen and I click 'Next' in the bottom bar, it shouldn't re-render the page, it should just do nothing, but when clicking 'Home' in the bottom bar while on the "NextScreen', it will take me to the correct page. Same with the HomeScreen... If I am currently on the HomeScreen and I click, 'Home' it should not re-render the page, but if I am on the HomeScreen and click, 'Next' it should take me to the correct page.

Does this mean I have to have different bottom bar items for each screen?

Thanks!!


Ok, you are asking for bottom bar items..

You can create footer layout in theme, on every screen you do not need to create bottom bar item.


Rajat Agrawal wrote:

Bryan Royalty wrote:

Rajat Agrawal wrote:

Hi,

Below is the screenshot of link and client action in destination - 



If you only want to redirect to your current screen without any business logic then below is the screenshot - 


Thanks,

Rajat

Thanks for your reply, but I don't think this is what I am looking for. Unless you expect me to make new bottom bar items for each page.

You see, I plan on having 2 links in the bottom bar... 'Home' (Links to HomeScreen) & 'Next' (Links to NextScreen)...With your implementation, when I am currently on the 'NextScreen' and I click the 'Home' link in the bottom bar, it will not do anything, because I have it set to the action with only a Start & End statement. Right?

Basically all my pages are going to have the same 2 bottom bar links. 'Home' & 'Next'.
When I am currently on the NextScreen and I click 'Next' in the bottom bar, it shouldn't re-render the page, it should just do nothing, but when clicking 'Home' in the bottom bar while on the "NextScreen', it will take me to the correct page. Same with the HomeScreen... If I am currently on the HomeScreen and I click, 'Home' it should not re-render the page, but if I am on the HomeScreen and click, 'Next' it should take me to the correct page.

Does this mean I have to have different bottom bar items for each screen?

Thanks!!


Ok, you are asking for bottom bar items..

You can create footer layout in theme, on every screen you do not need to create bottom bar item.


Bottom bar or not, this could go for any link... Basically I just don't want the page to re-render onclick if I am already currently on the page. Same for the Menu links, they re-render onclick and are not needed if you are already currently on the page.
I mean, it makes sense to render the page if you are actually moving to a different page, thats nice, but there is no reason it should re-render/refresh if the user is not moving pages onclick.
Am I making sense? Sorry for all the questions. Thank you so much for your time and guidance!

Hello Bryan

You can use this approach here: https://www.outsystems.com/forums/discussion/37036/mobile-app-how-to-get-current-screen/

Than you can disable a link based on this information.

Or you can just have an input parameter in the block (you can customize it), and set the current page using this parameter, and use the info to disable the link.

Hope this helps you.

Cheers.

Eduardo Jauch wrote:

Hello Bryan

You can use this approach here: https://www.outsystems.com/forums/discussion/37036/mobile-app-how-to-get-current-screen/

Than you can disable a link based on this information.

Or you can just have an input parameter in the block (you can customize it), and set the current page using this parameter, and use the info to disable the link.

Hope this helps you.

Cheers.

Perfect! I will try this out. Thanks so much for your time and help!