当前位置: 首页 > news >正文

怎么用模板做网站创意设计椅子

怎么用模板做网站,创意设计椅子,网站移动端指的是什么,弹窗广告最多的网站我将展示如何以编程方式“即时”将火车停靠站添加到ADF火车中。 在我的用例中#xff0c;我有一些票务预订应用程序。 它具有训练模型的有限任务流。 在火车的第一站#xff0c;用户输入乘客的数量#xff0c;在随后的站点#xff0c;他们输入一些乘客的信息。 带有乘客信息… 我将展示如何以编程方式“即时”将火车停靠站添加到ADF火车中。 在我的用例中我有一些票务预订应用程序。 它具有训练模型的有限任务流。 在火车的第一站用户输入乘客的数量在随后的站点他们输入一些乘客的信息。 带有乘客信息的站点数量必须根据在第一个火车站点提交的值进行动态更改。 因此描述的行为的结果应如下所示 有界任务流具有以下结构 StartView活动是一个页面片段我们在其中输入乘客人数而DynamicView活动提供了一个页面片段来输入乘客的信息。 目前我们只有一个活动来提供乘客的信息如果乘客人数大于一个我将添加其他活动。 在StartView页面片段的inputNumberSpinbox提交其值设置为某些PageFlowScope支持bean的passengersNumber财产和行动的提交按钮是同一个bean的方法 public class MainTrain {//Extra added train stopsprivate ListActivityId dynamicStops new ArrayListActivityId();//Value of inputNumberSpinboxprivate int passengersNumber 1;public String buttonPress(){//The number of extra added train stops is greater than neededif (passengersNumber dynamicStops.size())clearExtraStops();else //The number of extra added train stops is less than needed if (passengersNumber-1 dynamicStops.size()) addDynamicStops(); return null;} 因此通过按Submit按钮我们可以根据inputNumberSpinbox的值添加一些火车停靠点或清除额外的停靠点 。 我们将所有添加的动态停靠点保存在dynamicStops列表中。 让我们看一下clearExtraStops方法 private void clearExtraStops() {for (int i dynamicStops.size(); i passengersNumber; i--) {//Get ActivityId to be removedActivityId removeActivityId dynamicStops.get(i-1);//Get current train model and remove train stopTrainModel trainModel TrainUtils.findCurrentTrainModel();trainModel.getTrainStops().remove(removeActivityId);//Remove activity from task flow definitiongetTaskFlowDefinition().getActivities().remove(removeActivityId);dynamicStops.remove(i-1);} } 该方法删除了两件事火车模型中的火车停靠点和任务流定义中的活动。 addDynamicStops方法将变得更加有趣 private void addDynamicStops() { for (int i dynamicStops.size(); i passengersNumber - 1; i) {//Creating new ActivityIdActivityId activityId new ActivityId(getTaskFlowId(), new StringBuilder(DynamicView).append(i).toString()); //The main trick of the post.//We consider DynamicView activity as a base for new train stop and new activity//Get base activity (DynamicView) and its train stopActivity baseActivity getBaseDynamicActivity();TrainStopContainer stopContainer (TrainStopContainer)baseActivity.getMetadataObject();TrainStop baseTrainStop stopContainer.getTrainStop();//Create new Activity based on DynamicView but with new ActivityId ActivityImpl activityImpl new ActivityImpl(baseActivity, activityId); //Add created activity to the task flow definitiongetTaskFlowDefinition().getActivities().put(activityId, activityImpl);//Create new train stop based on the DynamicViews train stopTrainStopModel trainStopModel new TrainStopModel(new TrainStopImpl(baseTrainStop, i2), activityId);//Add created train stop to the train stop modelTrainModel trainModel TrainUtils.findCurrentTrainModel();trainModel.getTrainStops().put(activityId, trainStopModel); //Add created activity to our listdynamicStops.add(activityId); } }private Activity getBaseDynamicActivity() {ActivityId baseActivityId new ActivityId(getTaskFlowId(), DynamicView); MetadataService metadataService MetadataService.getInstance();return metadataService.getActivity(baseActivityId); }private TaskFlowDefinition getTaskFlowDefinition() {MetadataService metadataService MetadataService.getInstance();return metadataService.getTaskFlowDefinition(getTaskFlowId()); }private TaskFlowId getTaskFlowId() {ControllerContext controllerContext ControllerContext.getInstance(); ViewPortContext currentViewPortCtx controllerContext.getCurrentViewPort(); TaskFlowContext taskFlowCtx currentViewPortCtx.getTaskFlowContext(); return taskFlowCtx.getTaskFlowId(); } 因此本文的主要技巧是创建新的活动并基于DynamicView的现有活动来停止站点。 为了实现这个想法我创建了两个类 ActivityImpl和TrainStopImpl 。 这些类只不过是相应地实现Activity和TrainStop接口的代理类。 它们将接口实现委派给基本实例除了一些特定的方法例如用于ID和DisplayName的getter之外 public class TrainStopImpl implements TrainStop { //Base instance private TrainStop baseTrainStop;private int mpassNo;private static final String PASSANGER_FORM Passengers data: ;public TrainStopImpl(TrainStop trainStop, int passNo) {baseTrainStop trainStop; mpassNo passNo;}//Specific implementationpublic String getDisplayName() {return new StringBuilder(PASSANGER_FORM).append(mpassNo).toString();}public String getOutcome() {return baseTrainStop.getOutcome();}public String getSequential() {return baseTrainStop.getSequential();}...public class ActivityImpl implements Activity {private Activity baseActivity;private ActivityId mid;public ActivityImpl(Activity activity, ActivityId id) {baseActivity activity;mid id;}//Specific implementationpublic ActivityId getId() {return mid;}public String getType() {return baseActivity.getType();}public Object getMetadataObject() {return baseActivity.getMetadataObject();} ... 这篇文章的另一张图片只是为了展示它的工作原理 就这样 您可以下载JDeveloper 11.1.1.2.0的示例应用程序 。 参考 动态ADF列车。 通过ADF实践博客中的JCG合作伙伴 Eugene Fedorenko以编程方式添加火车停靠站 。 翻译自: https://www.javacodegeeks.com/2012/05/dynamic-adf-train-adding-train-stops.html
http://www.sadfv.cn/news/284257/

相关文章:

  • 三层架构做网站还是系统自己的简历网站怎么做
  • 手机端建站建设部网站危险性较大
  • c 做网站加载多个图片图片直链在线生成网站
  • 扫码进入网站如何做鹿岛建设 网站
  • 做外汇上什么网站看新闻汕头市做网站
  • 在银行网站如何做理财风险评测自己做网站怎么样
  • 手机网站拦截怎么解除做培训的网站
  • 做网站应该注意哪些方面重庆官方推广网站
  • 宁波网站建设制作的公司网站加载等待
  • 网站搜索排名优化怎么能将网站做的不简单
  • 网站推广填空题安卓优化软件
  • 画册设计内容怎样做seo搜索引擎优化
  • 网页制作与网站开发 实验报告双语 网站 数据怎么做
  • 为企业做网站要向谁索要资料免费行情软件网站mnw
  • 网络推广100种方法免费seo优化关键词分类
  • 做一个网站如何做上海缘震网络科技有限公司
  • yollow网站推广哪个做简历的网站比较好
  • 庆阳工程建设网站精美 企业网站模板
  • 旺道seo网站优化大师android应用市场下载安装
  • 网站做任务个人可以做网站维护吗
  • 住房城乡建设部网站诚信wordpress无法修改
  • 模型网站大全免费国外男女直接做的视频网站
  • wordpress 4.6下载湖南竞价优化哪家好
  • 展览展示设计有限公司上海关键词优化排名软件
  • 淘宝客cms网站模板下载地址物理机安装虚拟机做网站好处
  • 网站开发数据库动态管理产品推广方案 推广方案怎么写
  • 高校门户网站建设建议wordpress仪表盘空白
  • 网站开发技术与功能 需求说明wordpress模板文件是那个
  • 校园网站建设的必要性论文牛商网是干啥的
  • 汉网可以建设网站不met metro wordpress