| | |
pass bean property name across JSP pages
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Solved Threads: 0
First, the sample code:
<%-- ================ some.jsp =============== --%>
<%-- bunch of code [...] --%>
<tr>
<td><bean:message key="prompt.desc" /></td>
<td><html:textarea property="desc" /></td>
</tr>
<tr>
<td>
<bean:message key="prompt.notes" />
<tiles:insert page="checkSpellTile.jsp" flush="false"></tiles:insert>
</td>
</tr>
<tr>
<td><html:textarea property="notes" /></td>
</tr>
<%-- ================ end some.jsp =============== --%>
<%-- ================ checkSpellTile.jsp =============== --%>
<%-- some JSP code [...] --%>
<spellingComp:executeSpelling
mode="popup"
textComponentName="notes"
/>
<%-- ================ end checkSpellTile.jsp =============== --%>
Using WebSphere 5.1.
So, my first foray into JSP programming - I have a number of
different JSP pages that need spell check widgets associated
to some text fields. The sample code shown works fine. The
prompt, "Notes ...:" is following by the spell check
[clickable] widget. Then the user clicks the widget, the
spell check is launched and it checks the text in the
"notes" field for the form.
The sticky situation that I can't seem to solve is that each
of the forms associated with each of the different JSP pages
has a different name for the text field (that needs to be
spell checked).
I've tried doing this (between the <tiles:insert...></tiles:insert...>):
<tiles:put name="theNotes" beanName="orderForm" beanProperty="notes"/>
... and then in the checkSpellTile.jsp, inserting this:
<tiles:importAttribute name="theNotes"/>
... and then for the "textComponentName" attribute:
textComponentName="theNotes"
Any ideas how do solve this problem?
<%-- ================ some.jsp =============== --%>
<%-- bunch of code [...] --%>
<tr>
<td><bean:message key="prompt.desc" /></td>
<td><html:textarea property="desc" /></td>
</tr>
<tr>
<td>
<bean:message key="prompt.notes" />
<tiles:insert page="checkSpellTile.jsp" flush="false"></tiles:insert>
</td>
</tr>
<tr>
<td><html:textarea property="notes" /></td>
</tr>
<%-- ================ end some.jsp =============== --%>
<%-- ================ checkSpellTile.jsp =============== --%>
<%-- some JSP code [...] --%>
<spellingComp:executeSpelling
mode="popup"
textComponentName="notes"
/>
<%-- ================ end checkSpellTile.jsp =============== --%>
Using WebSphere 5.1.
So, my first foray into JSP programming - I have a number of
different JSP pages that need spell check widgets associated
to some text fields. The sample code shown works fine. The
prompt, "Notes ...:" is following by the spell check
[clickable] widget. Then the user clicks the widget, the
spell check is launched and it checks the text in the
"notes" field for the form.
The sticky situation that I can't seem to solve is that each
of the forms associated with each of the different JSP pages
has a different name for the text field (that needs to be
spell checked).
I've tried doing this (between the <tiles:insert...></tiles:insert...>):
<tiles:put name="theNotes" beanName="orderForm" beanProperty="notes"/>
... and then in the checkSpellTile.jsp, inserting this:
<tiles:importAttribute name="theNotes"/>
... and then for the "textComponentName" attribute:
textComponentName="theNotes"
Any ideas how do solve this problem?
![]() |
Similar Threads
- struts tutorials (Java)
Other Threads in the JSP Forum
- Previous Thread: how to use Json data In struts action class?
- Next Thread: how to activate jsp in apacha tomcat
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web





