Hi John, thanks for answering - you might be right on the issue I should
use a EL tag instead of scriplet.

What i am basically interested in : When processing a jsp using a
html:form tag, i guess html:form brings the current form bean object
into some scope accessible to my jsp - but under what name does that tag
expose it?

My form bean is defined in struts config as 

                <form-bean name="ParameterForm"
        
type="com.ucpmorgen.mobiletix.app.param.ParameterForm">
                </form-bean>

Cause when used (please forgive my ignorance on your EL solution for
now): <% if (ParameterForm.getStructure_changeable().intValue() == 1) {
%> so.. uuupppps ... the jsp compiler always asked for a static method
on ParameterForm. uuupppps , because I suddenly think that naming the
variable like the class of form bean( the name after it is exposed
later), is an most unlucky coincident, isn't it?!?!!? -> if is, then i
should rename the bean name in the struts config.

Anyway, is the exposed from bean cast to the correct type for usage :
- inside EL-Tag you wrote it is correctly typed 
- but for scriplet, isn't it just exposed as being of type
java.lang.Object ?!?!


-----Original Message-----
From: John Espey [mailto:[EMAIL PROTECTED]
Sent: Sonntag, 23. Februar 2003 17:21
To: Struts Users Mailing List
Subject: RE: seeking shortcut name of current FormBean inside every
html:from


maybe I'm missing something, but if you use an EL tag (like the core:if
or
core:choose or logic-el:equals) you wouldn't need to do any scriptlet or
casting.

<c:if test="${parameterForm.structure_changeable eq 1}">

</c:if>

as far as the constants, i'm not sure I follow.
Hope this helps though...
> -----Original Message-----
> From: Jörg Maurer [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 23, 2003 8:40 AM
> To: Struts Users Mailing List (E-mail)
> Subject: seeking shortcut name of current FormBean inside every
> html:from
>
>
> Hi strut-users!
>
> Since this post i have been using massively e.g. <bean:define
> id="parameterForm" name="ParameterForm" type="ParameterForm"/>
> in my jsp´s to grab the reference to the current FormBean like e.g.
>
> <html:form action="/parameter">
> ...
>       <bean:define id="parameterForm" name="ParameterForm"
> type="ParameterForm"/>
>       <% if (parameterForm.getStructure_changeable().intValue() == 1)
> { %>
> </html:form>
>
> Please mail the applicable "shortcut" name (as i have forgotten the
full
> name, has'nt it been sth. like "org.apache.struts....") and in which
> class those constants are denoted. Addendum : Once i got that
reference,
> do i have to cast that reference to the correct form type - like : <%
if
> (((ParameterForm)xxxFromBean).getStructure_changeable().intValue() ==
1)
> { %>
>
>
> Tanks a lot  Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to