cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Getting form controls data in multiple jsp action includes

Former Member
0 Likes
466

I am having 3 jsp files which are included in a single jsp using jsp action includes.

Now each external include is having different form. In the JspDynPage Processor

i am getting null using

InputField inputFld = (InputField)pageContext.getComponentForId("input1");

Please advise me how to get form controls data and how to deal this.

Thanks

Markandeya

The detailed code i used is

1.mainPage.jsp

<jsp:include page="incECHeaderExt.jsp" flush="true" />

<jsp:include page="incPartItemsExt.jsp" flush="true" />

<jsp:include page="incFooterExt.jsp" flush="true" />

2. incECHeaderExt.jsp

<%@ taglib uri="tagLib" prefix="hbj" %>

<hbj:content id="editPageContext" >

<hbj:page title="Edit Claim">

<hbj:form id="form1" >

<hbj:inputField id="input1"

design="STANDARD"

value="aa"

type="STRING"

/>

<!-- many controls-->

</hbj:form>

</hbj:page>

</hbj:content>

3. incPartItemsExt.jsp

<%@ taglib uri="tagLib" prefix="hbj" %>

<hbj:content id="editPageContext" >

<hbj:page title="Edit Claim">

<hbj:form id="form2" >

<hbj:inputField id="input2"

design="STANDARD"

value="bb"

type="STRING"

/>

<!-- many controls-->

</hbj:form>

</hbj:page>

</hbj:content>

4. incFooterExt.jsp

<%@ taglib uri="tagLib" prefix="hbj" %>

<hbj:content id="editPageContext" >

<hbj:page title="Edit Claim">

<hbj:form id="form3" >

<hbj:button

id="button_Submit"

text="Submit"

onClick="saveClick"

design="EMPHASIZED"

width="100"

/>

</hbj:form>

</hbj:page>

5. JSPDynPage method

public void onSaveClick(Event event) throws PageException {

InputField inputFld = (InputField)pageContext.getComponentForId("input1");

if(inputFld != null){

absVal = inputFld.getValueAsDataType();

objHeader.setValueAt(absVal,1,9);

}

}

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

The controls of same form/page in which button click event is triggered are accesible with

InputField inputFld = (InputField)this.getComponentForId("input1");

This is giving 'null' for all other external jsp

forms.

Please let us know how to access all forms controls in the external jsp pages.

Thanks

Markandeya

Former Member
0 Likes

Please update me on this

Former Member
0 Likes

please help out , if u have any kind of information to share with this problem

Former Member
0 Likes

Hi,

This an urgent requirement and my work is held up.

I have to split to external jsps due to 64 kb problem

Any ideas??

Any help is highly appreciated.

Thanks

Markandeya