找人做jsp网站,深圳建设交易网站,网站建设公司怎样,昆明网络公司哪家最大vue 动态组件组件复用在这篇简短的文章中#xff0c;我将重点介绍ADF动态声明性组件。 我的意思是一个众所周知的ADF标签af#xff1a;declarativeComponent 。 它可以用作将页面设计为页面片段和组件组成的一种非常便捷的方法。 例如#xff0c;我们的页面可以包含以下代码… vue 动态组件组件复用 在这篇简短的文章中我将重点介绍ADF动态声明性组件。 我的意思是一个众所周知的ADF标签afdeclarativeComponent 。 它可以用作将页面设计为页面片段和组件组成的一种非常便捷的方法。 例如我们的页面可以包含以下代码片段 af:declarativeComponent viewIdPageFragment.jsff iddc1f:facet nameTheFacetaf:button textbutton 1 idb1//f:facet /af:declarativeComponent PageFragment.jsff是像这样的普通页面片段 ?xml version1.0 encodingUTF-8?
jsp:root xmlns:jsphttp://java.sun.com/JSP/Page version2.1xmlns:afhttp://xmlns.oracle.com/adf/faces/richaf:panelGroupLayout idpgl1af:outputText valueThis is a page fragment. You can add your content to the following facet:idot1/af:facetRef facetNameTheFacet//af:panelGroupLayout
/jsp:root 如果我们需要将一些参数传递给页面片段可以将片段定义为组件 ?xml version1.0 encodingUTF-8?
jsp:root xmlns:jsphttp://java.sun.com/JSP/Page version2.1xmlns:afhttp://xmlns.oracle.com/adf/faces/rich
af:componentDef varattrsaf:xmlContentcomponent xmlnshttp://xmlns.oracle.com/adf/faces/rich/componentfacetfacet-nameTheFacet/facet-name/facetattributeattribute-nameTitle/attribute-name/attribute/component/af:xmlContentaf:panelGroupLayout idpgl1af:outputText valueThis is a component #{attrs.Title}.You can add your content to the following facet: idot1/af:facetRef facetNameTheFacet//af:panelGroupLayout/af:componentDef
/jsp:root 在此示例中我们可以传递如以下代码片段所示的Title属性的值 af:declarativeComponent viewIdComponentFragment.jsffiddc2TitleButtom Container f:facet nameTheFacetaf:button textbutton 2 idb2//f:facet
/af:declarativeComponent 这项技术最酷的地方是viewId属性不仅可以接受静态字符串而且还可以接受EL表达式 af:declarativeComponent viewId#{TheBean.fragmentViewID}iddc1f:facet nameTheFacetaf:button textbutton 1 idb1//f:facet /af:declarativeComponentpublic String getFragmentViewID() {return PageFragment.jsff;
} 实际上这就是为什么这种构造称为dynamic的原因因此可以将此功能视为构建结构良好灵活而动态的UI的强大工具。 而已 翻译自: https://www.javacodegeeks.com/2014/09/really-dynamic-declarative-components.htmlvue 动态组件组件复用