How to put a back button

hi all
i'm using jdev 10g 10.1.3. i'm tring to put a back button in my pages that when i click on it will go back to the page from which it came but am getting lost how to go about it.
I created a backing bean with the following code for the Action property:
import javax.faces.context.FacesContext;
public class BackButtonBean {
private String url;
public BackButtonBean() {
public void setUrl(String url) {
this.url = url;
public String getUrl() {
return url;
public String backButton_action() {
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(url);
return url;
Can someone help me out what to do next?
thanks
preeti

Hi,
if you use JSF then you can navigate back by setting the previous ViewId to the UIViewRoot you access from FacesContext.getViewRoot(). So all you really need to do is to track the ViewId of the previous page
Frank

Similar Messages

  • HOW TO PUT MOVIES BACK IN THE CLOUD ON IPAD

    HOW TO PUT MOVIES BACK IN THE CLOUD ON IPAD

    You can't put films in the cloud yourself, whether they will show in the cloud for redownloading depends upon what country that you are in, if the rights-holder allows redownloading, and if the film remains in your country's store. You can delete a film from your iPad via the Edit button at the top right of the film select ion screen in the Videos app or via Settings > General > Usage > Videos (that should also give you an Edit button top right of the screen or you can swipe/drag across a film form right-to-left) - but the film might not then show in the cloud for redownloading. If you haven't already done so you should connect the iPad to your computer's iTunes and do File > Devices > Transfer Purchases so that you can take your own backup copy of your downloads (apps, ibooks etc could also be removed from the store and not be redownloadable in the future).

  • How to Restrict/Disable back button in browser

    Hi guys,
    I am writing a enterprise web application using ADF. I am using JDeveloper 11.1.2.0.0.
    I want to restrict/ disable browser back/forward buttons in all my .jspx and .jsf pages.
    It was discussed in following thread as well.
    how to Restrict/Disable  back button in browser
    Can somebody give a way to do this please.
    Regards !
    Sameera

    Hi Sudipto,
    This is one of my .jspx pages. I wonder where should I put that javascript code. I have tried in several places and didn't work.
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="Registration Page" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:pageTemplate viewId="/MyPageTemplate.jspx" id="pt1">
    <f:facet name="MainPageRegion">
    <af:group id="g1">
    <af:panelSplitter splitterPosition="454"
    inlineStyle="width:943px; height:200px;"
    id="FirstRN">
    <f:facet name="first">
    <af:panelGroupLayout layout="scroll" id="pgl1">
    <af:outputText value="Registration Details"
    inlineStyle="font-weight:bold;" id="ot1"/>
    <af:separator id="s1"/>
    <af:panelFormLayout labelAlignment="start" id="pfl1">
    <f:facet name="footer"/>
    <af:panelLabelAndMessage label="#{bindings.RegNum.hints.label}" id="plam1">
    <af:outputText value="#{bindings.RegNum.inputValue}" id="ot2"/>
    </af:panelLabelAndMessage>
    <af:selectOneChoice value="#{bindings.ProcType.inputValue}"
    label="#{bindings.ProcType.label}"
    required="#{bindings.ProcType.hints.mandatory}"
    shortDesc="#{bindings.ProcType.hints.tooltip}" id="soc1">
    <f:selectItems value="#{bindings.ProcType.items}" id="si1"/>
    </af:selectOneChoice>
    <af:selectOneChoice value="#{bindings.RegStatus.inputValue}"
    label="#{bindings.RegStatus.label}"
    required="#{bindings.RegStatus.hints.mandatory}"
    shortDesc="#{bindings.RegStatus.hints.tooltip}" id="soc2">
    <f:selectItems value="#{bindings.RegStatus.items}" id="si2"/>
    </af:selectOneChoice>
    <af:panelLabelAndMessage label="#{bindings.TotalUsdAmt.hints.label}" id="plam2">
    <af:outputText value="#{bindings.TotalUsdAmt.inputValue}" id="ot3">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.TotalUsdAmt.format}"/>
    </af:outputText>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="#{bindings.TotalPfiAmt.hints.label}" id="plam3">
    <af:outputText value="#{bindings.TotalPfiAmt.inputValue}" id="ot4">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.TotalPfiAmt.format}"/>
    </af:outputText>
    </af:panelLabelAndMessage>
    </af:panelFormLayout>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="second">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="pgl2">
    <af:outputText value="Creation Details"
    inlineStyle="font-weight:bold;" id="ot5"/>
    <af:separator id="s2"/>
    <af:panelFormLayout labelAlignment="start" id="pfl2">
    <f:facet name="footer"/>
    <af:panelLabelAndMessage label="#{bindings.CreatedByName.hints.label}" id="plam4">
    <af:outputText value="#{bindings.CreatedByName.inputValue}" id="ot6"/>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="#{bindings.CreationDate.hints.label}" id="plam5">
    <af:outputText value="#{bindings.CreationDate.inputValue}" id="ot7">
    <af:convertDateTime pattern="#{bindings.CreationDate.format}"/>
    </af:outputText>
    </af:panelLabelAndMessage>
    <af:selectOneChoice value="#{bindings.RequestedBy.inputValue}"
    label="#{bindings.RequestedBy.label}"
    required="#{bindings.RequestedBy.hints.mandatory}"
    shortDesc="#{bindings.RequestedBy.hints.tooltip}" id="soc3">
    <f:selectItems value="#{bindings.RequestedBy.items}" id="si3"/>
    </af:selectOneChoice>
    <af:panelLabelAndMessage label="#{bindings.DepartmentName.hints.label}" id="plam6">
    <af:outputText value="#{bindings.DepartmentName.inputValue}" id="ot8"/>
    </af:panelLabelAndMessage>
    </af:panelFormLayout>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    <af:panelSplitter inlineStyle="width:944px; height:132px;"
    splitterPosition="452" id="SecondRN">
    <f:facet name="first">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="pgl3">
    <af:outputText value="Notes to Buyer"
    inlineStyle="font-weight:bold;" id="ot9"/>
    <af:separator id="s3"/>
    <af:inputText value="#{bindings.NotesBuyer.inputValue}"
    simple="true"
    required="#{bindings.NotesBuyer.hints.mandatory}"
    columns="#{bindings.NotesBuyer.hints.displayWidth}"
    maximumLength="#{bindings.NotesBuyer.hints.precision}"
    shortDesc="#{bindings.NotesBuyer.hints.tooltip}"
    rows="5" id="it1">
    <f:validator binding="#{bindings.NotesBuyer.validator}"/>
    </af:inputText>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="second">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="pgl4">
    <af:outputText value="Party Notes"
    inlineStyle="font-weight:bold;" id="ot10"/>
    <af:separator id="s4"/>
    <af:inputText value="#{bindings.PartyNotes.inputValue}"
    simple="true"
    required="#{bindings.PartyNotes.hints.mandatory}"
    columns="#{bindings.PartyNotes.hints.displayWidth}"
    maximumLength="#{bindings.PartyNotes.hints.precision}"
    shortDesc="#{bindings.PartyNotes.hints.tooltip}"
    rows="5" id="it2">
    <f:validator binding="#{bindings.PartyNotes.validator}"/>
    </af:inputText>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    <af:spacer width="10" height="20" id="s5"/>
    <af:outputText value="Registration Lines"
    inlineStyle="font-weight:bold;" id="ot11"/>
    <af:separator id="s6"/>
    <af:commandButton text="Add Item"
    disabled="#{RegistrationBean.disableAddItemBtn}"
    action="CatalogPage" id="cb1"/>
    <af:commandButton text="Search Item"
    action="ItemLitsPage"
    disabled="#{RegistrationBean.disableSearchCataBtn}" id="cb2"/>
    <af:table value="#{bindings.RegLinesRegPageVO.collectionModel}"
    var="row" rows="#{bindings.RegLinesRegPageVO.rangeSize}"
    emptyText="#{bindings.RegLinesRegPageVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.RegLinesRegPageVO.rangeSize}"
    width="900" id="t1">
    <af:column sortProperty="ProductCode" sortable="false"
    headerText="#{bindings.RegLinesRegPageVO.hints.ProductCode.label}" id="c1">
    <af:outputText value="#{row.ProductCode}" id="ot12"/>
    </af:column>
    <af:column sortProperty="Qty" sortable="false"
    headerText="#{bindings.RegLinesRegPageVO.hints.Qty.label}" id="c2">
    <af:outputText value="#{row.Qty}" id="ot13">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.RegLinesRegPageVO.hints.Qty.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="UnitPrice" sortable="false"
    headerText="#{bindings.RegLinesRegPageVO.hints.UnitPrice.label}" id="c3">
    <af:outputText value="#{row.UnitPrice}" id="ot14">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.RegLinesRegPageVO.hints.UnitPrice.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="Currency" sortable="false"
    headerText="#{bindings.RegLinesRegPageVO.hints.Currency.label}" id="c4">
    <af:outputText value="#{row.Currency}" id="ot15"/>
    </af:column>
    <af:column sortProperty="UsdAmount" sortable="false"
    headerText="#{bindings.RegLinesRegPageVO.hints.UsdAmount.label}" id="c5">
    <af:outputText value="#{row.UsdAmount}" id="ot16">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.RegLinesRegPageVO.hints.UsdAmount.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="UsdPfiAmount" sortable="false"
    headerText="#{bindings.RegLinesRegPageVO.hints.UsdPfiAmount.label}" id="c6">
    <af:outputText value="#{row.UsdPfiAmount}" id="ot17">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.RegLinesRegPageVO.hints.UsdPfiAmount.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="UsdTotalAmount" sortable="false"
    headerText="#{bindings.RegLinesRegPageVO.hints.UsdTotalAmount.label}" id="c7">
    <af:outputText value="#{row.UsdTotalAmount}" id="ot18">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.RegLinesRegPageVO.hints.UsdTotalAmount.format}"/>
    </af:outputText>
    </af:column>
    </af:table>
    </af:group>
    </f:facet>
    <f:facet name="ActionButtonBarRegion">
    <af:group id="g2">
    <af:commandButton actionListener="#{bindings.Commit.execute}"
    text="Save"
    disabled="false" id="cb3">
    <af:setActionListener from="#{false}"
    to="#{RegistrationBean.disableAddItemBtn}"/>
    <af:setActionListener from="#{false}"
    to="#{RegistrationBean.disableSearchCataBtn}"/>
    <af:setActionListener from="#{bindings.RegistrationId.inputValue}"
    to="#{pageFlowScope.regToEdit}"/>
    </af:commandButton>
    <af:commandButton text="Home" action="HomePage" immediate="true" id="cb4"/>
    </af:group>
    </f:facet>
    <f:attribute name="PageTitle" value="Registration Page"/>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Regards !
    Sameera
    Edited by: samme4life on May 17, 2012 2:39 AM
    Edited by: samme4life on May 17, 2012 2:42 AM

  • How to use a back button in action pages?

    Hi all,
    I have created a user login page,home page and user profile page.
    If the user provide correct username and password in the login page he will be taken to home page.
    In the home page he will be having his username and a link to view his profile.
    When the user click on the link "My Profile(user profile)" he wil be taken to that page.
    In my profile page the user can edit only his firstname,lastname and password .
    On the user profile page i have placed a Back Button(using javascript: on onclick event i have used history.back()) to go back to home page after editing his profile.
    If the user edit his profile for n-number of times then atlast if he wants to go back to home page-then he wil cilck the back button.
    Now the problem occurs like the back button not going to home page and it simply going back with the edited history.
    How to use a back button in action pages; without repeating the actions done on the page; how to redirect to the users home page?
    I simply used the hyperlink in userprofile page to go to home page but when i click onit it is displaying blank home page.
    I'm using hibernate orm mapping; cflogin and cflogout tags.
    Any help appreciated,
    Chandru P

    chandrup wrote:
    Hi Dan,
    Dan Bracuk wrote:
    Use an anchor tag.
    I simply used the hyperlink(<a href="home.cfm">Home</a>) in userprofile page to go to home page but when i click onit it is displaying blank home page.
    I can see your problem. You may use javascript:history.go(-1), javascript:history.go(-2), ..., to go back one page, two pages, and so on. But how does one go back an arbitrary n pages? The link href="home.cfm" isn't a good solution for the browser. It makes a new call to the server which, as you may have discovered, can overwrite all the changes made at the browser. 
    You should use the Javascript variable history.length. If you open n links in succession, starting from page0.cfm, then the browser holds the value of history.length as n. So, experiment with something like
    <a href="javascript:history.go(-history.length)">Go home</a>
    or
    <a href="javascript:history.go(-history.length+1)">Go home</a>

  • How can we prevent back button  using java script

    how can we prevent back button using java script

    Would be quicker for you to google for javaScript
    javascript:window.history.forward(-1);

  • Brush tool anchor points are gone does some one now how to put them back?

    Brush tool anchor points are gone does some one now how to put them back?

    Press the H key to hide/show the anchor points. The brush tool needs to be active when you do this.

  • My e drive is full HP_TOOLS (E) IS FULL NEED TO TELL ME HOW TO PUT IT BACK ON (C) DRIVE

    MY E DRIVE IS FULL I NEED TOO KNOW HOW TO PUT IT BACK ON C DRIVE

    Whoa there.
    If you mean that you have the files backed up using Time Machine on the Time Capsule, you might want to remember that Time Machine backs up the changes that occur on your Mac.
    If you delete files from your Mac, Time Machine will delete the same files from your backups......you just do not know when this will occur. Could well be very soon.
    So, you would only want to do this with files that you can afford to lose.
    The other huge downside to deleting files on your Mac is that the only copy of the files that you have are now on the Time Capsule. When....not if....the Time Capsule drive has a problem, you will lose those files because you have no backups.

  • I accidentally dropped my firewall, or openned it.  I checked it in system preferences and it is turned off but I can not find how to put it back up.  PLEASE HELP!

    I accidentally dropped my firewall, or openned it.  I checked it in system preferences and it is turned off but I can not find how to put it back up.  PLEASE HELP!  I obviously do not want to leave this open very long, if you get my drift.

    Did you "click the lock to make changes"

  • How to put aps back on my iphone 5 after latest 7.0 update?

    I did the latest update of the IOS from apple and a few of my apps, (i.e. Pandora and Facebook) do not work.  Any suggestions?

    In the subject you ask how to put them back on the phone. That is done with the sync process in iTunes. Then you ask in the thread, how to make them work? Not sure about that, since you do not say what they are or are not doing.

  • How to set a back button to the caller page

    Hello,
    An application have a page that can be called by several other pages, for instance, an "addContact.faces" can be called by several other forms, when the user adds the contact or press a back button, the application should go back to the caller page.
    How can I implent this?
    Thanks in advance,
    Juan

    As an alternative, you could Ajax the stuff and put it in a popup div, which is a common technique nowadays. Then the user doesn't even navigate away from the page he/she was on, plus it is relatively easy to implement in a generic way so multiple pages can use it.
    Search for "css popup div" on google if you want to see this in action.

  • How can I disable back button

    How can I disable the back button and/or prevent the back button displaying my recent searches on right click ?

    Set the pref <b>browser.sessionhistory.max_entries</b> to 0 on the <b>about:config</b> page.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

  • How to handle The Back button on Module Pool screen

    Hi Gurus,
                  I have created a module pool screen. In that screen I have used some input/output fields(text box) which i have marked mandatory by making the input field as "required" under program tab.
    now when running the screen if no data is entered into these mandatory input field then BACK button does not work. First I have to enter some data into the input filed only then the BACK button works. How should i code so that the back button works even without entering the data into these mandatory fields.

    hi,
    use AT EXIT-COMMAND with the module.
    eg. module user_command at exit command.
    then there will be no problem.

  • How to Create a Back button in Flash

    Hi all,
    I need to create a back button for my flash app. It doesn't
    need to be connected with Browser. It just need be able to remember
    what frame they were viewing, and bring them back.
    Is there any event I can use for this? I made an variable
    called "visited:Number" and change it on every frame, but this
    won't work. Once the user enters a new frame, the original visited
    number is replaced by current already. I don't know how to hold
    that number, before they leave the current frame.
    Can anybody give me little clue/direction please?
    Thank you...

    Hi
    I believe that you should look at the Forms functionality for UCM . Under Content Management - Web Form Editor will show up the editor where in you can add buttons and attach functionalities to it . With UCM 11g this is not available thus you might need to use AJAX to build the requirement .
    Thanks
    Srinath

  • How to get the back button if we to go the 2nd drill down report??

    Hi,
    I have a drill down report for the main report. And have detailed drill down as in 1st report>2nd report>3rd report.
    But once i goto drill down, the return button is there which directs to main report i.e. 2>1,
    But once i goto 3rd, i do not get the back button so that i can access reports in 3>2>1, instead its going directly to 1st from 3rd.
    hope i have made the point clear.
    Someone suggest me how do i get the back button??
    Thanks!!

    use the below code in Narrative view
    <script&gt;
    function goBack()
    window.history.back()
    </script&gt;
    <input type="button" value="Back" onclick="goBack()"&gt;
    If helps mark
    Edited by: Srini VEERAVALLI on Feb 13, 2013 12:08 AM

  • ADF Faces (JDev 10.1.3): How to support the Back Button

    Hi,
    when I scroll through a result set, rendered as a input form with navigation buttons, then use the browsers back button and then try to go to the next row using the 'next' navigation button, I always get an exception: JBO-29000, JBO-35007, JBO-25013
    The sample application was build using JDev 10.1.3, ADF Faces and Business Components.
    I have read through the new Oracle Dev Guide and found some parameters concerning state management and tested different settings. The most promising setting:
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>oracle.adf.view.faces.CLIENT_STATE_METHOD</param-name>
    <param-value>all</param-value>
    </context-param>
    Regardless of which setting I used, an exception was prompted.
    My questions:
    Are there addtional settings to configure to make an ADF Faces app 'back button' agnostic?
    Is it an ADF Faces or a JSF problem?
    What are your experience and how do you solve the problem?
    I have no idea how to solve the problem.
    Any hints are welcome!
    Thanks,
    Markus

    Hi Marcus,
    we had the same problem in UIX (JDeveloper version 10.1.2) and the official stance of Oracle (we had created a TAR on metalink) was that it was a general webapplication problem and not 'supported' by ADF.
    We created a solution by creating a filter that checks a sequence number in the pages. Each page request was checked and the sequence was increased. The <form> on the pages needed to send the sequence with each request.
    If the user used the backbutton then the sequence would be out of order. We would redirect the user to an error page and rollback the complete model.
    This was our base solution. What we also tried was to use the passivation mechanism of the application module (of Business Components) we would save a snapshot after the rendering of each page and if the user used the back button and the sequence was out of order we would rollback the application module to that snapshot. However after a COMMIT you cannot rollback ofcourse and it gave us some troubles.
    We finally sticked with the base solution and gave the user buttons in the application to go 'back'.
    Regards,
    Robert

Maybe you are looking for