Create inputText Components on Xpages Form

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
	<xp:panel binding="#{InputTextComponentBackingBean.baseComponentFirst}"></xp:panel>
	<xp:panel binding="#{InputTextComponentBackingBean.baseComponentMid}"></xp:panel>
	<xp:panel binding="#{InputTextComponentBackingBean.baseComponentLast}"></xp:panel>
	<xp:button value="Submit" id="button1">
		<xp:eventHandler event="onclick" submit="true"
			refreshMode="complete" immediate="false" save="true" id="eventHandler1">
			<xp:this.action><![CDATA[#{javascript:InputTextComponentBackingBean.doLoadComponents()}]]></xp:this.action>
		</xp:eventHandler>
	</xp:button>
</xp:view>





Use this XSnippet in conjunction with the BackingBean added earlier to create HTML inputText items on your Xpages @ once, info that can be used in the case one needs to dynamically provide records to specific components, per user request.

Brief Instructions:
(1) Create New Xpages form with copy of XML above
(2) Create a facesConfig file, reference BackingBean
(3) Copy and paste BackingBean mentioned
(4) Run Form, Click button to create anew
 <!--CREATE HTML_FORM COMPONENTS: Dököll Solutions, Inc.-->
 <managed-bean>
   <managed-bean-name>InputTextComponentBackingBean</managed-bean-name>
   <managed-bean-class>com.dokoll.solutions.inc.Utils.InputTextComponentBackingBean
</managed-bean-class>
   <managed-bean-scope>session</managed-bean-scope>
 </managed-bean>

Watch it at work:
http://youtu.be/vkqlCqN4nwQ

XPages
Köll S Cherizard
February 1, 2014 9:55 PM
Rating
11

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.



No comments yetLogin first to comment...