我使用Eclipse Neon OEPE 12.2.1.5创建了一个简单的JSPX文件和任务流
任务流程XML mainTab.xml
<?xml version="1.0" encoding="UTF-8"?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/adf/controller http://xmlns.oracle.com/adf/controller/adfc-config_1_0.xsd">
<task-flow-definition id="mainTab">
<default-activity>view1</default-activity>
<view id="view1">
<page>/view1.jsff</page>
</view>
<view id="view2">
<page>/view2.jsff</page>
</view>
<control-flow-rule>
<from-activity-id>view1</from-activity-id>
<control-flow-case>
<from-outcome>openView2</from-outcome>
<to-activity-id>view2</to-activity-id>
</control-flow-case>
</control-flow-rule>
<control-flow-rule>
<from-activity-id>view2</from-activity-id>
<control-flow-case>
<from-outcome>openView1</from-outcome>
<to-activity-id>view1</to-activity-id>
</control-flow-case>
</control-flow-rule>
<use-page-fragments/>
</task-flow-definition>
</adfc-config>
主JSPX文件
<?xml version='1.0' encoding='UTF-8'?>
<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 id="d1">
<af:form id="f1">
<af:panelStretchLayout id="psl1">
<f:facet name="center">
<af:region value="#{bindings.mainTab.regionModel}"
id="r1" />
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>
首先查看view1.jsff
<?xml version='1.0' encoding='UTF-8'?>
<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">
<af:panelStretchLayout id="psl1">
<f:facet name="center">
<af:panelGroupLayout layout="vertical" id="p1">
<af:outputText id="o1" value="Hello View 1"></af:outputText>
<af:button id="b1" text="Load View 2" action="openview2"></af:button>
</af:panelGroupLayout>
</f:facet>
</af:panelStretchLayout>
</jsp:root>
第二次观看view2.jsff
<?xml version='1.0' encoding='UTF-8'?>
<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">
<af:panelStretchLayout id="psl1">
<f:facet name="center">
<af:panelGroupLayout layout="vertical" id="p1">
<af:outputText id="o1" value="Hello View 2"></af:outputText>
<af:button id="b1" text="Load View 1" action="openview1"></af:button>
</af:panelGroupLayout>
</f:facet>
</af:panelStretchLayout>
</jsp:root>
运行JSPX文件 Hello View 1 并出现按钮加载视图2 ,但点击按钮没有任何反应
我也在action="openview1"
操作值与导航案例结果
不匹配
我用action="view1"
在eclipse中尝试了自动完成goto
仍然按钮什么都不做