html5 form template,Rendering form template for HTML5 forms

Rendering form template for HTML5 forms

Render Endpoint

HTML5 forms have the notion of Profiles which are exposed as REST Endpoints to enable Mobile Rendering of Form Templates. These Profiles have associated Profile Renderer. They are JSP pages responsible for generating HTML representation of the form by calling the Forms OSGi service. The JCR path of the Profile node determines the URL of the render end point. The default render end point of the form pointing to ‘default’ profile looks like:

https://:/content/xfaforms/profiles/default.html?contentRoot=&template=

For example, http://localhost:4502/content/xfaforms/profiles/default.html?contentRoot=c:/xdps&template=sampleForm.xdp

For a custom profile, the endpoint changes accordingly. For example, the end point for the custom profile with the name hrforms is:

http://localhost:4502/content/xfaforms/profiles/hrforms.html?contentRoot=c:/xdps&template=sampleForm.xdp

If your template resides in the AEM repository in an application called FormSubmission, the URI is:

http://localhost:4502/content/xfaforms/profiles/default.html?

contentRoot=crx:///content/dam/formsanddocuments/FormSubmission/1.0

&template=sampleForm.xdp

Render Parameters

The request parameters supported while rendering form as HTML are:

Parameter

Description

template

This parameter specifies the name of the template file.

contentRoot

This parameter specifies the path where the template and the associated resources reside. This path can be the server file system path or a repository path or http or an ftp path.

submitUrl

This parameter specifies the url to which the form data xml is posted.

Merge Data with form template

Parameter

Description

dataRef

This parameter specifies absolute path of the data file that is merged with the template. This parameter can be a URL to a rest service returning the data in xml format.

data

This parameter specifies the UTF-8 encoded data bytes that are merged with the template. If this parameter is specified, the HTML5 form ignores dataRef parameter.

Passing the render parameter

HTML5 forms support three methods for passing the render parameters. You can pass parameters via URLs, key-value pairs, and profile node. In the render parameter, key-value pair holds highest precedence followed by profile node. The URL Request parameter holds least precedence.

URL request parameters: You can specify the render parameters in the URL. In the URL request parameters, the parameters are visible to the end user. For example, the following submit URL contains template parameter in the URL: http://localhost:4502/content/xfaforms/profiles/default.html?contentRoot=/Applications/FormSubmission/1.0&template=sampleForm.xdp

SetAttribute request parameters: You can specify the render parameters as a key-value pair. In the SetAttribute request parameters, the parameters are not visible to the end user. You can forward a request from any other JSP to HTML5 form profile renderer JSP and use setAttribute on request object to pass all the render parameters. This method has highest precedence.

Profile node request parameters: You can specify the render parameters as node properties of a profile node. In the profile node request parameters, the parameters are not visible to the end user. Profile node is the node where request is sent. To specify parameters as node properties, use CRXDE lite.

Submit Parameters

HTML5 forms submit data; execute server-sided scripts and web-services on AEM servers. For detailed information on parameters used to execute server-sided scripts and web-services on AEM servers, see HTML5 forms Service Proxy.

内容概要:本文档介绍了一个多目标规划模型,该模型旨在优化与水资源分配相关的多个目标。它包含四个目标函数:最小化F1(x),最大化F2(x),最小化F3(x)和最小化F4(x),分别对应于不同的资源或环境指标。每个目标函数都有具体的数值目标,如F1的目标值为1695亿立方米水,而F2则追求达到195.54亿立方米等。此外,模型还设定了若干约束条件,包括各区域内的水量限制以及确保某些变量不低于特定百分比的下限。特别地,为了保证模型的有效性和合理性,提出需要解决目标函数间数据尺度不一致的问题,并建议采用遗传算法或其他先进算法进行求解,以获得符合预期的决策变量Xi(i=1,2,...,14)的结果。 适合人群:对数学建模、运筹学、水资源管理等领域感兴趣的科研人员、高校师生及从业者。 使用场景及目标:①适用于研究涉及多目标优化问题的实际案例,尤其是水资源分配领域;②帮助读者理解如何构建和求解复杂的多目标规划问题,掌握处理不同尺度数据的方法;③为从事相关工作的专业人士提供理论参考和技术支持。 阅读建议:由于文档涉及到复杂的数学公式和专业术语,在阅读时应先熟悉基本概念,重点关注目标函数的具体定义及其背后的物理意义,同时注意理解各个约束条件的设计意图。对于提到的数据尺度不一致问题,建议深入探讨可能的解决方案,
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值