Redirect to another page without confirmation - url

I have a textbox. I want to logout current page and session without any confirmation and redirect to Login page when user enter "exit" in the textbox. any solution?

Suppose that text item's name is P3_TEXT. Set its "Submit when Enter pressed" property to YES. Create a process whose PL/SQL code looks like this:
begin
if lower(:P3_TEXT) = 'exit' then
apex_authentication.logout(:SESSION, :APP_ID);
end if;
end;
Run the page; if you put "exit" into the text item and press Enter key, you'll be logged out.
[EDIT]
Previous Apex versions (3.1 for sure) had the APEX_CUSTOM_AUTH.LOGOUT procedure whose 3rd parameter was p_next_url you could have set to - for example - Login page. It is now deprecated (I believe you'll get the error if you try to use it).
Now (in the recent Apex version), navigate to application's Shared Components - Authentication Scheme. In there, you'll see the Post-Logout URL section which can be set to
Home page, or
URL
so - pick one that best suits your needs.

Related

How do I conditionally select the next view controller to navigate to?

In my iOS app, I want the user to log in with facebook on page1, then get redirected to page2. On page2, there is a "Yes" and "No" button. Now, there are two scenarios:
1-If user pushes "No" he stays on page2. If he logs out from app and logs in back in future again, he again goes to page2 until he pushes "Yes" eventually.
2-User pushes "Yes" on page2. Now, he gets redirected to page3. From now on, every time user logs out and logs back in, he gets redirected to page3 directly without seeing page2. This is the part I am having trouble understanding how to implement in my code. Is there a way to initialize a global variable at start of my "ViewController.swift" code, but update its' value with a new value at the part of the code that takes care of actions if user pushes "Yes"? I mean is it possible to update the value of a variable from one thing to another at initialization?
Actually, maybe the shorter way to explain my question is: Could I initialize a variable in swift with some value at first, then, after user performs a specific action such a pushing a button, I change the initialization value permanently afterwards that action?
Also, please do let me know if you know any other ways to accomplish this.
Yes of course you can. I would say it's a user preference. Lucky, there is something called NSUserDefaults for that. It's a persistent storage so the value will stay here forever (until the app is uninstalled or rebuilt).
For example if user say yes on page 2 you write:
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "usedSaidYes")
otherwise:
if NSUserDefaults.standardUserDefaults().boolForKey("usedSaidYes") == true {
// Redirect page 3
} else {
// Redirect page 2
}
You should check if this value exist before, if not you go on page 1

create multiple 'view in app' links using Branch.io in index view

I'd like to create an index view which shows a list of items followed by a 'view in app' button to download data directly into the app.
Solution 1. [Not a sulution] I think deepviewcta call is appropriated to use in a single product page. It doesn't look like suitable in my case, because it has to call deepview before calling deepviewcta.
Solution 2. I'm trying to construct the URL directly using 'dynamic' deeplink. The documentation says any additional query param appended will shows up in the initSession callback, but it doesn't work for me.
the construct link looks like this:
https://bnc.lt/a/key_test_kkkkkkkkkkkkkkkkkkkkkkk?has_app=yes&channel=character&my_list_id=0c56c4bc-fac9-412a-be19-c0feefe30d29
what I got in the callback only has following data
"+clicked_branch_link" = 0;
"+is_first_session" = 0;
in the callback, other params are just missing, I got:
url NSURL * #"my-app://open?link_click_id=197576253652400385" 0x00007fad90d47450
Any Other Solutions?
It turns out I was using live key in ios App while using test key in server end. So solution 2 works now.
Also for anyone want to do the same thing. For regular Branch Links, it is not possible to stay on the same page as the Branch link was clicked from. they suggest adding a $after_click_url to the Link's data. This key will tell the system to route to a particular web address after the Branch Link has been clicked.
Thanks for branch.io's support, they responded very quickly.

Refresh Page On Save And Publish

I've created doc type with property e.g. (Name = "ItemId" Type = "Label") When i try to "Save and Publish" node with current doc type i set some value to this label. (note that i override SendAsync method)
currentContent.SetValue("ItemIdAlias","guidvalue");
It sets value correctly, but label still appears to be empty. So if i click on "Save and Publish" second time it sends an empty value still... I need somehow to refresh page because on second time i need "guidvalue" to update other items
If you're using Umbraco 6, you'll need to get your event handler to emit some JS to refresh the page. You can do this by calling the following code in your Event Handler:
BasePage.Current.ClientTools.ChangeContentFrameUrl(string.Concat("editContent.aspx?id=", docId));
Where docId is the id of the page you are editing. This will force a full reload of the page, and your label should then have a value!
If you're using Umbraco 7, you're out of luck, there's currently no way to do this from the server side. You might be able to listen to the angular save event and do something there maybe? But I'm not 100% if that's possible currently.

Orbeon - conditional activation of PDF button

I would like to implement in Form Runner process with two actors and following steps:
Author fills fields until form instance is valid
Author presses Email button
Mentor checks received document against compliance
Exclusive gate Does form comply with standards?
Option 1 Yes - Mentor switches Boolean field from false() to true() and Author can go to Step 7.
Option 2 No - Author goes to Step 1.
PDF button is activated, Author is able to press it, print document, sign and send via regular mail
Assumptions: Only one form definition is used, permissions are used to control field visibility
Question: Any idea how to implement Steps 5 and 7. Rest has been done already.
Regards
Solved
I inserted step between 6 and 7: review and set appropriate property:
< property
as="xs:string"
name="oxf.fr.detail.process.review.*.*"
value='
if ("//drukuj = 1")
then review
else error-message(message = "Dokument nie jest gotowy do wydruku")
'/>
The property checks the value of control //drukuj, if it is true then goes to review page otherwise prints error message.

symfony 1.4: two questions about sfDoctrineApplyPlugin (well, could be also considered as general questions)

I have found in sfDoctrineApplyPlugin a template called applyAfter.php
that shows a message like "You have registered ok..." after the users apply for an account. It is called from the sfApply/apply action this way: "return 'After';" when the apply form is valid.
What kind of template is that? I never saw that way (return 'After';) of calling a template. Can someone give me info about that?
Second question: I show a layout with a language select when the the
apply form is printed. I wouldn't like to show that language select in
the page that shows the message "You have registered ok...". As the action
is the same in the both pages (sfApply/apply), what should i do to hide
the language select in the verification page?
Javi
The function returns the string 'After' to the caller. The caller always seems to be as follows: $this->widgetSchema->setNameFormat('sfApplyResetRequest[%s]');
So, the string 'After' is being used in conjunction with the setNameFormat function (which is part of the symfony libraries). All it is doing, is setting the 'name' attribute for the form. More information on this function here.
For your second question, you could simply add an IF statement, to check to see if the current route is the one that you do not want to display the language select on. If it isn't, then display the language select.
You can verify the current route with the following code:
sfContext::getInstance()->getRouting()->getCurrentRouteName();

Resources