Disable the Back Button in browser

Reuirment-To Disable the Browser Back Button you need to use java script code in your jsp page.

For example, You have Page 1 and Page 2 .And you are navigation from page1 to page 2.now you click on browser bck button.
We need to disable this thing.We will be writing a javascript code into the page 1.We will use forward method.Let check what does it do-

forward()– method loads the next URL in the history list.This is the same as clicking the Forward button in the browser.JavaScript window history forward method provides the functionality to navigate the user to the next page visited by him. Actually history forward method works only if the user navigates to the previous page using back button of browser of history back method provided by JavaScript. This back history navigation enables the forward history navigation. JavaScript History object belongs to JavaScript window object that allows you to access the forward method using window.history.forward. You can also access the forward method directly as history.forward.

<script type ="text/javascript">
function stopGoingBack()
{
window.history.forward();
}
</script>
<html>
    <head>
    <title> Using the forward method of the History object</title>
    </head>
    <body>
    <form name=form1>
    Click on the button to go to the forward browser page.
    <input type="button" value="Go Forward" onload='stopGoingBack()'>
    </form>
    </body>
    </html>

Call this method on onload on the body of page.

Happy coding with techartifact with Vinay . 🙂

Handling OK and Cancel button in af:dialog using popup in Oracle ADF by dialogListener

Requirement – We are displaying a popup message to user and on selecting on OK and CANCEl by user , writing custom code inside bean

Solution – You can have af:popup component in the page .Inside the popup , drag drop af:dialog component. You can call the pop up programmatic using my
another post of popup

For the dialog , you need to have some dialog listener. write it like

<af:dialog title="handling Ok and cancel event}"
           type="okCancel"
           dialogListener="#{techartifact.headerManage.dialogListener1}"
           id="d1">

The method of dialogListener1 can be written as below.Write inside a headerManage bean.

public void dialogListener1(DialogEvent dialogEvent)
  {
    if (dialogEvent.getOutcome() == DialogEvent.Outcome.ok)
    {
     // write your custom code for ok event
    } else
    {
      // write your custom code for cancel event
   } 
  }

Happy coding with techartifact….

Multiple ways to integrate content into Webcenter Portal

Ways to integrate content into a WebCenter Portal application using any of the following methods:

â–  Content data controls. Use JCR adapters to enable read-only access to content in an Oracle Content Server, Oracle Portal, or SharePoint content repository, and
maintain tight control over the way the content displays in a WebCenter Portal application. This functionality is available primarily for backward compatibility
with prior releases, and for requirements outside the capability of Content Presenter or the Documents service and its task flows.

â–  Content Management REST APIs. Use CMIS (Content Management Interoperability Services) REST APIs to surface and manage content in Oracle Content Server.

â–  Content Presenter. Enables you to precisely customize the selection and presentation of content in a WebCenter Portal application. The Content Presenter
task flow is available only when the connected content repository is Oracle Content Server and your WebCenter administrator has completed the prerequisite configuration. With Content Presenter, you can select an Oracle Site Studio file, a single item of content, multiple content items, query for content, or select content based on the results of a WebCenter Personalization Conductor scenario, and then select a template to render the content on a page in a WebCenter Portal application. Content Presenter has no dependency on the Documents service for
adding or managing the content it displays.

â–  Documents service. Provides several task flows that offer a variety of formats to display folders and files on a page. You can choose the task flows appropriate for
your application to provide features for accessing, adding, and managing folders and files; configuring and viewing file and folder properties; and searching file
and folder content in the connected content repositories. The Documents service task flows are available when the connected content repository is Oracle Content
Server, Oracle Portal, or SharePoint, and your WebCenter administrator has completed the prerequisite configuration. Using Documents service task flows and document components (such as links, previews, and images), you can both add content to the application, and provide end users with content and Documents service task flows built into the application to manage, display, and search documents at runtime. The Documents service also supports wikis and blogs.