Bookmarkable Pages
Build a Bookmarkable Edit Page with JDeveloper 11gPurposeIn this tutorial, you use Oracle JDeveloper 11g to build a web application that allows the bookmarking of URL. Based on a predefined application, you implement a functionality that enables to bookmark an edit page from a Browse / Edit type Time to Complete 20 minutes TopicsThe tutorial covers the following topics:
Viewing Screenshots
Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it. OverviewThe model is provided by business components, while the view and controller are provided by Java Server Faces. The predefined application includes two pages, a Browse page and an Edit page. The Browse page provides the list of departments and allows you to select a department from the list to edit the department details. The Edit page displays the The problem is that when the edit page is displayed for a specific department, the URL in the address is still referencing the entry point of the application (the Browse page). This default behavior stops from being able to bookmark the ScenarioIn order to make the Edit page bookmarkable, you add an action listener to the Edit button of the Browse page. In the Edit page, you use a method defined in a managed bean and set the bookmark properties providing Prerequisites Before starting any section of the tutorial, you should:
Downloading the Required Components and Start JDeveloper 11g In the following steps, you download JDeveloper 11g and other files required for this tutorial.
Uploading the Starter Application Before you create any component, you must first open the startup application. To do this, perform the following steps:
Creating a Database Connection You need to create a Database Connection to the HR schema. To do this, perform the following steps:
Exploring the Startup Application The startup application uses Departments and Employees entity objects and their corresponding view objects.
Preparing the BrowseDepartments Page To be able to provide bookmarkable information about the selected department in the browse page, you add an action listener that holds the referenced department based on the currentRowKeyString property.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. |
Open the Diagram view of the page flow and select the EditDepartment page to view the page properties. |
| 2. |
In the Property Inspector, select the Bookmark tab and set the bookmark property to true and click the Add button |
| 3. |
For the bookmark URL parameter type rowKey as the name and paste the content of the clipboard in the value field: #{pageFlowScope.rowKey}. |
| 4. |
Next to the method field, click the down arrow and select the Expression Builder option. |
| 5. |
In the Expression Builder dialog, expand ADF Managed Beans | pageFlowScope | BookmarkHandler nodes and select handleBookMarkRequest. Click OK. |
| 6. |
To review the content of the managed bean that was created in the predefined application, in the Application Navigator, double click the BookmarkHandler.java to open the java class. |
| 7. |
The handleBookMarkRequest method displays in the editor. |
| 8. |
Click the EditDepartment.jspx tab to open the page in the editor. |
| 9. |
Right click in the EditDepartment page and select Go to Page Definition from context. |
| 10. |
Click the EditDepartment.jspx tab to open the page in the editor. |
| 11. |
Using the Structure pane for the page definition, right click the bindings node and from context select Insert inside bindings --> Generic Bindings --> action. |
| 12. |
In the Create Action Bindings dialog, in the Select an Iterator field selectDepartmentsView1Iterator and in the Operation choose setCurrentRowWithKey. In the Parameters section, paste the content of the clipboard in the value field #{pageFlowScope.rowKey}. Click OK. |
| 13. |
Now, the page definition should look like this: and the Structure window... |
| 14. |
Click the save all |
Running the Application and Bookmarking the Edit Page
You now use JDeveloper's JSF Navigation Modeler to diagrammatically plan and create your application's pages, and the navigation between them.
| 1. |
Open the page flow diagram by clicking the adfc-config.xml tab. |
| 2. |
Right click the BrowseDepartments page and select Run from context. |
| 3. |
The page loads up in your browser. Notice the URL in the address bar. |
| 4. |
Select a department from the list and click the Edit Departments button. |
| 5. |
The corresponding department details display. Notice the URL now displayed in the address bar. |
| 6. |
Using your browser menu bar, bookmark the page. Select a location folder for your bookmark. Close your browser. |
| 7. |
Open a new browser window, and select the bookmark you just saved. |
| 8. |
The browser returns the page corresponding to the department number you bookmarked. |
| 11. | You can close your browser window. |
Summary
In this tutorial, you learned how to:
| Prepare the Browse Department Page | |
| Make the Edit Page Bookmarkable | |
| Test the Bookmark Functionality |
Place
the cursor over this icon to hide all screenshots.
Bookmarkable Pages的更多相关文章
- 用Github pages搭建自己制作的网页,方法最简单,适用于新手
本文固定链接http://blog.csdn.net/pspgbhu/article/details/51205264 本人自学前端一个多月,写个几个网页想要用来应聘,网上搜各种搭建网站的方法,发现不 ...
- Github pages + jekyll 博客快速搭建
Github pages + jekyll 博客快速搭建 寻找喜欢的模版 https://github.com/jekyll/jekyll/wiki/sites http://jekyllthemes ...
- Github Pages和Hexo创建静态博客网站
Github Pages和Hexo创建静态博客网站 安装Node.js 本人是window环境,所以下载window版. 下载地址:https://nodejs.org/en/download/ 下载 ...
- 如何在ASP.NET Web站点中统一页面布局[Creating a Consistent Layout in ASP.NET Web Pages(Razor) Sites]
如何在ASP.NET Web站点中统一页面布局[Creating a Consistent Layout in ASP.NET Web Pages(Razor) Sites] 一.布局页面介绍[Abo ...
- 利用github pages创建简单的网站
github.com 作为最流行的源代码管理工具已经风靡全球,同时在依托于github也衍生出了各种各样的应用,比如可以利用github搭建博客系统等等. 先换个话题,我们每人手头都或多或少有些&qu ...
- 使用ASP.NET Web API Help Pages 创建在线接口文档
操作步骤 1.新建Web API项目 2.在项目Areas文件夹下找到以下文件,取消注释图中代码. 3.右键解决方案,属性,如图设置. 4.运行程序,点击右上角API 接口列表: 详情-无参数: 详情 ...
- 用GitHub Pages搭了个静态博客
经过周末两天折腾,终于在GitHub Pages上用Hugo搭了个静态博客. 链接:https://xusiwei.github.io/ @ruanyf 曾经在博客里提到过"喜欢写Blog的 ...
- 【一】Ubuntu14.04+Jekyll+Github Pages搭建静态博客
本系列有五篇:分别是 [一]Ubuntu14.04+Jekyll+Github Pages搭建静态博客:主要是安装方面 [二]jekyll 的使用 :主要是jekyll的配置 [三]Markdown+ ...
- 回发或回调参数无效。在配置中使用 pages enableEventValidation=true 或在页面中使用 %@ Page EnableEventValidation=true % 启用了事件验证
WebForm中回发或回调参数无效问题的解决 解决 .NET中回发或回调参数无效问题的解 该错误的详细提示信息为: 回发或回调参数无效.在配置中使用 <pages enableEventVali ...
随机推荐
- 微信小程序基础之创建使用教程
本文档将带你一步步创建完成一个微信小程序,并可以在手机上体验该小程序的实际效果.这个小程序的首页将会显示欢迎语以及当前用户的微信头像,点击头像,可以在新开的页面中查看当前小程序的启动日志. 1. 获取 ...
- CSDN发表文章后老是待审核的原因
最近开始在csdn上写文章,发现老是文章被 待审核 ,于是便在网上搜集了下网友们的反馈,最后做出以下的整理. 1.CSDN检测到文章中的链接大于5,就会将文章列为"待审核",这个其 ...
- 【移动开发】 Android隐藏输入法软键盘的一些说明
刚刚在写一个仿微信的Android聊天软件,在编写的过程中,发现一个严重的BUG---当用户点击输入框用软键盘输入文本的时候点击了"返回好友列表"的按钮,返回到好友列表时软键盘无法 ...
- Android状态栏透明(沉浸式效果)
Android状态栏透明(沉浸式效果) 默认效果 沉浸式效果 方式一 源码 下载地址(Android Studio工程):http://download.csdn.net/detail/q487880 ...
- shape图形的使用
shape图形的使用 在项目中如果用到有规律的常规的图形,在能够掌握的前提下建议使用shape图形,shape图形相对与图片来说,占用资源更小,并且使用起来不会失真. 效果图 shape图形1 < ...
- java中的interface接口
接口:java接口是一些方法表征的集合,但是却不会在接口里实现具体的方法. java接口的特点如下: 1.java接口不能被实例化 2.java接口中声明的成员自动被设置为public,所以不存在pr ...
- MTK8127源码编译出现的错误及相关解决办法
/** * date:2016/8/17 * author: Y.X .YANG */ 按照开发文档提示: 1.MTK提供的开发包目录下有若干个.aa .ab .ac ...的分压缩包.此时应当将这些 ...
- 非ROOT实现静默安装的一些思考与体会,AIDL获取IPackageManager,反射ServiceManager,系统签名
非ROOT实现静默安装的一些思考与体会,AIDL获取IPackageManager,反射ServiceManager,系统签名 最近自家的系统要做一个升级服务,里面有三个功能,第一个是系统升级,也就是 ...
- UNIX网络编程——非阻塞式I/O(套接字)
套接字的默认状态是阻塞的.这就意味着当发出一个不能立即完成的套接字调用时,其进程将被投入睡眠,等待相应的操作完成.可能阻塞的套接字调用可分为以下4类: (1)输入操作,包括read,readv,rec ...
- Docker教程:使用docker配置python开发环境
http://blog.csdn.net/pipisorry/article/details/50808034 Docker的安装和配置 [Docker教程:docker的安装] [Docker教程: ...