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

专业网站建设哪里有有网站源码 怎么做网站

专业网站建设哪里有,有网站源码 怎么做网站,百度微信网站,阿里云1m服务器可以搭建网站jsf服务在大型软件开发项目中#xff0c;面向服务的体系结构非常常见#xff0c;因为它提供了可供不同团队或部门使用的功能接口。 创建用户界面时#xff0c;应应用相同的原理。 对于具有开票部门和客户管理部门等的大型公司#xff0c;组织结构图可能如下所示#xff1a… jsf服务 在大型软件开发项目中面向服务的体系结构非常常见因为它提供了可供不同团队或部门使用的功能接口。 创建用户界面时应应用相同的原理。 对于具有开票部门和客户管理部门等的大型公司组织结构图可能如下所示 如果计费部门要开发一个用于创建发票的新对话框则可能如下所示 如您所见上面的屏幕在上部引用了一个客户。 单击短名称文本字段后面的“ ..”按钮将打开以下对话框允许用户选择客户 按“选择”后客户数据将显示在发票表格中。 也可以通过简单地输入客户编号或在发票屏幕上的文本字段中输入简称来选择客户。 如果输入了唯一的短名称则根本不会出现选择对话框。 而是直接显示客户数据。 只有不明确的简称会导致打开客户选择屏幕。 客户功能将由属于客户管理团队的开发人员提供。 一种典型的方法是由客户管理开发团队提供一些服务而计费部门的开发人员创建用户界面并调用这些服务。 但是这种方法需要在这两个不同部门之间建立更强的耦合而不是实际需要的耦合。 发票只需要一个唯一的ID即可引用客户数据。 创建发票对话框的开发人员实际上并不想知道如何查询客户数据或在后台使用哪些服务来获取该信息。 客户管理开发人员应提供UI的完整部分以显示客户ID并处理客户的选择 使用JSF 2使用复合组件很容易实现。 客户管理部门和计费部门之间的逻辑接口包括三个部分 复合组件XHTML 复合组件的支持bean 侦听器界面用于处理选择结果 提供者客户管理部门 复合组件 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdhtml xmlnshttp://www.w3.org/1999/xhtmlxmlns:uihttp://java.sun.com/jsf/faceletsxmlns:hhttp://java.sun.com/jsf/htmlxmlns:fhttp://java.sun.com/jsf/corexmlns:compositehttp://java.sun.com/jsf/compositexmlns:icehttp://www.icesoft.com/icefaces/componentxmlns:acehttp://www.icefaces.org/icefaces/componentsxmlns:icecorehttp://www.icefaces.org/icefaces/coreui:compositioncomposite:interface namecustomerSelectionPanel displayNameCustomer Selection Panel shortDescriptionSelect a customer using its number or short namecomposite:attribute namemodel typeorg.fuin.examples.soui.view.CustomerSelectionBean requiredtrue / /composite:interfacecomposite:implementationui:param namemodel value#{cc.attrs.model}/ice:form idcustomerSelectionFormicecore:singleSubmit submitOnBlurtrue /h:panelGroup idtable layoutblocktabletrtdh:outputLabel forcustomerNumbervalue#{messages.customerNumber} //tdtdh:inputText idcustomerNumbervalue#{model.id} requiredfalse //tdtdnbsp;/tdtdh:outputLabel forcustomerShortNamevalue#{messages.customerShortName} //tdtdh:inputText idcustomerShortNamevalue#{model.shortName} requiredfalse //tdtdh:commandButton action#{model.select}value#{messages.select} //td/trtrtdh:outputLabel forcustomerNamevalue#{messages.customerName} //tdtd colspan5h:inputText idcustomerNamevalue#{model.name} readonlytrue //td/tr/table/h:panelGroup/ice:form/composite:implementation/ui:composition/html 复合组件的后备bean package org.fuin.examples.soui.view;import java.io.Serializable;import javax.enterprise.context.Dependent; import javax.inject.Inject; import javax.inject.Named;import org.apache.commons.lang.ObjectUtils; import org.fuin.examples.soui.model.Customer; import org.fuin.examples.soui.services.CustomerService; import org.fuin.examples.soui.services.CustomerShortNameNotUniqueException; import org.fuin.examples.soui.services.UnknownCustomerException;Named Dependent public class CustomerSelectionBean implements Serializable {private static final long serialVersionUID 1L;private Long id;private String shortName;private String name;private CustomerSelectionListener listener;Injectprivate CustomerService service;public CustomerSelectionBean() {super();listener new DefaultCustomerSelectionListener();}public Long getId() {return id;}public void setId(final Long id) {if (ObjectUtils.equals(this.id, id)) {return;}if (id null) {clear();} else {clear();this.id id;try {final Customer customer service.findById(this.id);changed(customer);} catch (final UnknownCustomerException ex) {FacesUtils.addErrorMessage(ex.getMessage());}}}public String getShortName() {return shortName;}public void setShortName(final String shortNameX) {final String shortName (shortNameX ) ? null : shortNameX;if (ObjectUtils.equals(this.shortName, shortName)) {return;}if (shortName null) {clear();} else {if (this.id ! null) {clear();}this.shortName shortName;try {final Customer customer service.findByShortName(this.shortName);changed(customer);} catch (final CustomerShortNameNotUniqueException ex) {select();} catch (final UnknownCustomerException ex) {FacesUtils.addErrorMessage(ex.getMessage());}}}public String getName() {return name;}public CustomerSelectionListener getConnector() {return listener;}public void select() {// TODO Implement...}public void clear() {changed(null);}private void changed(final Customer customer) {if (customer null) {this.id null;this.shortName null;this.name null;listener.customerChanged(null, null);} else {this.id customer.getId();this.shortName customer.getShortName();this.name customer.getName();listener.customerChanged(this.id, this.name);}}public void setListener(final CustomerSelectionListener listener) {if (listener null) {this.listener new DefaultCustomerSelectionListener();} else {this.listener listener;}}public void setCustomerId(final Long id) throws UnknownCustomerException {clear();if (id ! null) {clear();this.id id;changed(service.findById(this.id));}}private static final class DefaultCustomerSelectionListener implementsCustomerSelectionListener {Overridepublic final void customerChanged(final Long id, final String name) {// Do nothing...}}} 用于处理结果的侦听器接口 package org.fuin.examples.soui.view;/*** Gets informed if customer selection changed.*/ public interface CustomerSelectionListener {/*** Customer selection changed.** param id New unique customer identifier - May be NULL.* param name New customer name - May be NULL.*/public void customerChanged(Long id, String name);} 用户计费部门 发票Bean只是通过注入来使用客户选择Bean并使用侦听器接口连接到它 package org.fuin.examples.soui.view;import java.io.Serializable;import javax.annotation.PostConstruct; import javax.enterprise.context.SessionScoped; import javax.enterprise.inject.New; import javax.inject.Inject; import javax.inject.Named;Named(invoiceBean) SessionScoped public class InvoiceBean implements Serializable {private static final long serialVersionUID 1L;Inject Newprivate CustomerSelectionBean customerSelectionBean;private Long customerId;private String customerName;PostConstructpublic void init() {customerSelectionBean.setListener(new CustomerSelectionListener() {Overridepublic final void customerChanged(final Long id, final String name) {customerId id;customerName name;}});}public CustomerSelectionBean getCustomerSelectionBean() {return customerSelectionBean;}public String getCustomerName() {return customerName;}} 最后在发票XHTML中使用了复合组件并将其链接到注入的支持bean !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdhtml xmlnshttp://www.w3.org/1999/xhtmlxmlns:uihttp://java.sun.com/jsf/faceletsxmlns:hhttp://java.sun.com/jsf/htmlxmlns:fhttp://java.sun.com/jsf/corexmlns:fuinhttp://fuin.org/examples/soui/faceletsxmlns:customerhttp://java.sun.com/jsf/composite/customerui:composition template/WEB-INF/templates/template.xhtmlui:param nametitle value#{messages.invoiceTitle} /ui:define nameheader/ui:defineui:define namecontentcustomer:selection-panel model#{invoiceBean.customerSelectionBean} //ui:defineui:define namefooter/ui:define/ui:composition/html 摘要 总之用户界面中引用其他部门数据的部分应由提供数据的部门负责。 然后可以很容易地对提供的代码进行任何更改而无需对使用代码进行任何更改。 此方法的另一个重要好处是协调应用程序的用户界面。 显示相同数据的控件和面板始终看起来相同。 每个部门还可以为其提供的用户界面组件创建一个存储库从而使设计新对话框的过程像将正确的组件放在一起一样容易。 参考 A Java Developers Life博客上的JCG合作伙伴 Michael Schnell提供的面向服务的UI 。 翻译自: https://www.javacodegeeks.com/2012/09/service-oriented-ui-with-jsf.htmljsf服务
http://www.zqtcl.cn/news/423043/

相关文章:

  • 阿里服务器可以做多少个网站在家怎么利用电脑赚钱
  • 免费建设一个网站google官方版下载
  • 心馨人生珠海网站建设外贸型企业网站建设
  • 好网站建设公司昆明乐清网站优化推广
  • 哪些网站用天平做logo站长工具app官方下载
  • 做餐厅logo用什么软件网站手机自适应网站源码
  • 股票网站模板辽宁工程建设信息网站
  • 毕业设计某网站开发的开题报告范文广西建设教育网站
  • 浏览小城镇建设的网站商丘网站公司
  • python学习网站做好网络推广的技巧
  • 网站有几种类型小说网站开发源码
  • 给城市建设提议献策的网站网站建设可研报告
  • 常德论坛网站陕西建设官方网站
  • 怎么做网站访问量上海网站排名提升
  • 新乡企业网站建设胶州做网站公司
  • 网站后台权限分配说明什么网站是做家教的
  • 网站备案 空间备案 域名备案网站制作与管理技术标准实训教程
  • 东莞免费企业网站模板推广有没有专门做线下活动的网站
  • 驾校网站制作郑州手机网站建设多少钱
  • c2c网站建设策划书怎么看网站关键词密度
  • 网站在线支付方案网站建设 sam大叔排名三天上首页
  • 温岭新站seo网站免费进入窗口软件有哪些
  • 网站未备案什么意思网站 php .net
  • 网站开发第三方登录设计七牛图床 wordpress
  • 大连网站设计案例宁波品牌网站设计价格
  • 响应式表白网站源码黑龙江建设网电话
  • wordpress企业建站生产企业做网站的费用怎么做账
  • 天都城网站建设wordpress pluings
  • 惠州做网站的公司有哪些wordpress主动推送
  • jsp做的网站带数据库新手网站设计定价