XPages Mobile Controls - how to program the Back button - xpages

The XPages Mobile Controls provide an easy way to mobilize Notes/Domino data. However, if you have say 3 different views that help point a user to a specific record, the "Back" button you add to your appPage that allows users to view/edit the document can only be pointed back to a specific appPage. What's the best way to create a programmable Back button taking into account the view that the user came in via.

The back button on a mobile page can be computed dynamically just like any other XPage property.
Try this for example where you can set the scope to a mobile page you've navigated from to the current mobile page.
<xp:this.moveTo>
<![CDATA[#{javascript:var from = sessionScope.get(“from”); return
from;
}]]>
</xp:this.moveTo>
This is the same technique that is used in the Discussion XL and TeamRoom XL templates for their mobile apps.
To set the scope use the rendered property in the heading control for each 'view' mobile page so every time these pages are loaded or swapped to the scoped variable is set. Try the following link to get the full demo markup from OpenNTF XSnippets
computed back button demo markup on XSnippets

Related

SSO SignIn page rendering with Email input element at top of page

When attempting to the load the default SSO SignIn page in Azure, the Email Address element is selected by default and in focus as follows;
When the page is zoomed the Email Address input is rendered at the top of the page on load, this causes tablets and smaller devices to be presented with a page that is already scrolled.
I have attempted to add a new input on a custom page and given it a tabindex of 0 (as a hack) as the default for all element contained inside the "api" div is 1.
I have also given the input element the autofocus attribute but it seems to strip both on render.
https://www.realmadrid.com/en/login is using a similar SignIn page and appear to have this function turned off, having gone through all the source that I could find it isn't directly apparent how they are achieving this.
Obviously this would be easy if it were possible to use JavaScript on custom pages in Azure B2C SSO but as this is not yet possible, does anyone know of a possible workaround or fix for this issue?
Update:
It's a little hard to illustrate using a screenshot, but if you select 'run now' on a new default 'SIGN-UP OR SIGN-IN POLICY' policy, set responsive as per screenshot, scroll to the top of the page and press F5, you'll be able to see the stated behavior.
We are using heavily custom policies, I'm aware of how to do this, I'm using a default example for ease of replication.
This is no longer an issue due to MS allowing front end JS https://learn.microsoft.com/en-us/azure/active-directory-b2c/javascript-samples

Can I preload content in a Webbrowser control?

I have a VC++ MFC dialog application with a web browser ActiveX control. I have "Next" and "Prev" buttons using which I let the user navigate through a list of pre-defined URLs, whose content are shown in the web browser control. Since I know the list of URLs at the start itself, I would like to pre-load the content in some way while the user is looking at one page, so that when they click on "Next", the content has already been fetched and can be shown to the user instead of waiting for the page to load. I did not find any documentation on how to do that so far. Does anyone have any ideas on how to achieve this? I was thinking of having a second invisible web browser control where I pre-load the next URL, but it would be tricky to handle the user clicking Next when the next URL is still loading in the other browser.

createchildcontrol() - user control, custom control, web control

I am new to .Net trying to understand about different controls here. I know, custom control, an extension of existing control. User control, a complicated control constructed in .ascx file and can be used anywhere in the application. I couldn't the concept of createchildcontrol() and need of it.
thanks !
It plays the role in the lifecycle of a page request to ensure all controls generated dynamically/via code are in place for binding postback values and rendering out to the page. Also note from the MSDN page:
When you develop a composite or templated server control, you must
override this method.
You can check this page for the full list of events, in order, on an ASPX request.

Focus is not going inside EventHandler

I had created a simple web part with one label, and one button. I wnat that when i click the button the label content will change.
But when i debugg i found that the focus is not going inside the Button Click Event function.
When i click the button the debugger will again start with page load.
Is there any Autofocus for Button.
Please help me to resolve my problem.
Thanks :)
I think that you're confused about what happens on the client (within the browser) and what happens on the server (in your ASP.NET code).
Most events on server-side controls, like the ASP.NET button, are handled server-side, through a mechanism called postback. The generated code on the browser causes a form submit to the Web server, where the page and its controls are re-created. The form data is parsed and the button control generates (in your case) a Click event for your server-side code. This code regenerates a new HTML page which will replace the old one.
Fortunately for you in this case, the ASP.NET button has a property "OnClientClick" where you can insert JavaScript code to do whatever you want (like change the label text) directly in the browser.
See MSDN for the docs on the property and an example of using both Click and OnClientClick.
Note that this is not related to SharePoint, this is a pure ASP.NET issue.

Default selected Item in Connected web part

I have a web part connected to another (provide a row to).
It shows the radio button that when clicked correctly provides the data to the second web part.
Can I have this radio button selected by default so that it automatically provides the filter data as soon as the page is loaded?
Thanks in advance
Sachin
You can do this by XSTL web part connection. You can user sharepoint designer for it.
Pleaes ref the following link
http://sachinvkatkar.blogspot.com/

Resources