Iterate a character array

2005-03-21 Thread Victor Grazi
 
I am trying to iterate through an array of characters in a JSP, binding a
text field to each character.

The form bean (call it "form") has a method char[] getCharacters() and
corresponding setter.

The JSP looks like this:


   
Position
 <%-- Display the value. This
displays correctly --%>


<%-- now bind the property - this displays an exception No getter method for
property char of bean org.apache.struts.taglib.html.BEAN' --%>






I have tried using various combinations of nested and logic iterate, and
tried binding the property with and without ${} but no luck. At worst
nothing compiles, and at best, the page is requiring the collection to
return beans, and doesn't seem to want to work with a character array.
Getting and setting form beans is really not the way I wanted to go, because
it's too much load to transform a char string to a list of Strings, and then
accepting a list of strings back and converting them back to characters, for
each access, not to mention creating and GC'ing all of those extra objects.

Do you have any advice?

Thanks,
Victor Grazi




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



RE: Rewrite with Struts?

2005-03-21 Thread Victor Grazi
I am trying to iterate through an array of characters in a JSP, binding a
text field to each character.

The form bean (call it "form") has a method char[] getCharacters() and
corresponding setter.

The JSP looks like this:


   
Position
 <%-- Display the value. This
displays correctly --%>


<%-- now bind the property - this displays an exception No getter method for
property char of bean org.apache.struts.taglib.html.BEAN' --%>






I have tried using various combinations of nested and logic iterate, and
tried binding the property with and without ${} but no luck. At worst
nothing compiles, and at best, the page is requiring the collection to
return beans, and doesn't seem to want to work with a character array.
Getting and setting form beans is really not the way I wanted to go, because
it's too much load to transform a char string to a list of Strings, and then
accepting a list of strings back and converting them back to characters, for
each access, not to mention creating and GC'ing all of those extra objects.

Do you have any advice?

Thanks,
Victor Grazi



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



Re: Struts 1.1 iterate woes

2004-10-04 Thread Victor Grazi
That works, thanks.
But does anyone have a Struts EL version? I prefer to go that route.
Thanks Victor
___
Sent with SnapperMail
www.snappermail.com

.. Original Message ...
On Sun, 3 Oct 2004 18:27:11 -0500 Hubert Rabago <[EMAIL PROTECTED]> wrote:
>I have to admit I always have trouble dealing with the iterate tag.  I
>recently rediscovered how easy it is to do these iterations using the
>nested tags.  Have you tried them?  Maybe something like this would
>work for you:
>
>
>   
>   
>   onchange="changefield(this);"/>
>   
>   
>   Send
>
>
>I don't know if it's considered "best practice" to also surround the
>form with , but I've tried using the basic 
>and it works fine, too.  The result is code I can actually understand.
>:)
>
>If you want to stick to the html tags, take a look at the example in
>http://wiki.apache.org/struts/StrutsCatalogLazyList
>
>hth,
>Hubert
>
>On Sun, 3 Oct 2004 14:16:19 -0400, Victor Grazi <[EMAIL PROTECTED]> wrote:
>> We are trying to use  in a JSP to access items in a list
>> stored in the Form Bean by the Action class but we can't seem to get the
>> syntax right.
>> 
>> I am getting an error meessage from PropertyUtils that displays the 
index as
>> '${index}', which indicates that that struts el expression is not 
resolving
>> to an int.
>> 
>> Here is my exact syntax. The form and action are described in more detail
>> below.
>> 
>> 
>>> property="list">
>> 
>>
>>
>> 
>>
>>
>> 
>>
>>> onchange="changefield(this);"/>
>>
>> 
>>
>>Send
>> 
>> 
>> I have created several Test classes to help me understand the flow...
>> 
>> The form is an instance of TestForm exends ActionForm and its form name 
in
>> struts-config.xml is "testForm". (This is the named form for the action.)
>> TestForm has one property: java.util.List list with accessors public List
>> getList() and public void setList(List list).
>> 
>> List is always a List of LineItem objects where LineItem is a simple
>> JavaBean with properties
>> String id (public String getId() and public void setId(String id)), 
String
>> description (public String getDescription() and public void
>> setDescription(String description)) and boolean isChanged (public void


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



Re: Struts 1.1 iterate woes

2004-10-03 Thread Victor Grazi
Thanks Addy, but I am not clear on your syntax. What is your bVO.lines? 
Remember my list is in my form. Also what is bLine? Not sure where my 
variables correspond
Regards
Victor

.. Original Message ...
On Sun, 3 Oct 2004 15:55:20 -0400 Addy Kapur <[EMAIL PROTECTED]> wrote:
>I have used the following syntax and it works.
>
> 
>  "/>
>"/>
>"/>
>   
>
>
>On Sun, 3 Oct 2004 14:16:19 -0400, Victor Grazi <[EMAIL PROTECTED]> 
wrote:
>> We are trying to use  in a JSP to access items in a list
>> stored in the Form Bean by the Action class but we can't seem to get the
>> syntax right.
>> 
>> I am getting an error meessage from PropertyUtils that displays the 
index as
>> '${index}', which indicates that that struts el expression is not 
resolving
>> to an int.
>> 
>> Here is my exact syntax. The form and action are described in more detail
>> below.
>> 
>> 
>> > property="list">
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> > onchange="changefield(this);"/>
>> 
>> 
>> 
>> Send
>> 
>> 
>> I have created several Test classes to help me understand the flow...
>> 
>> The form is an instance of TestForm exends ActionForm and its form name 
in
>> struts-config.xml is "testForm". (This is the named form for the action.)
>> TestForm has one property: java.util.List list with accessors public List
>> getList() and public void setList(List list).
>> 
>> List is always a List of LineItem objects where LineItem is a simple
>> JavaBean with properties
>> String id (public String getId() and public void setId(String id)), 
String
>> description (public String getDescription() and public void
>> setDescription(String description)) and boolean isChanged (public void
>> setIsChanged(boolean value) and public boolean getIsChanged() )
>> 
>> The Action (TestAction extends Action) "execute" method creates a List 
of 5
>> LineItem objects and stores that List into the form by calling
>> ((TestForm)form).setList(list), then forwards to the jsp (test.jsp)
>> 
>> In the jsp I would like to iterate through the list to perform the
>> following:
>> display the id (as html read-only text) and the
>> description (as html:text) of each line item,
>> then use JavaScript to change the "isChanged" property (in a hidden 
field)
>> when the onchange event is triggered.
>> 
>> I have tried several different syntaxes. I also tried using arrays 
instead
>> of List's. I also specified the type of the LineItem class explicitly in 
the
>> form element. I tried each of the "html:" and "bean:write" lines above 
one
>> at a time to see if any would be successful, but they all produce that 
same
>> error. I have combed the web for a good example of how to accomplish 
this,
>> but I couldn't find anything that handled things in a way that would work
>> for us.
>> 
>> Can you tell me what I am doing wrong and how to accomplish the access?
>> 
>> Thanks/Victor
>> 
>> -
>> 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]



Struts 1.1 iterate woes

2004-10-03 Thread Victor Grazi
We are trying to use  in a JSP to access items in a list
stored in the Form Bean by the Action class but we can't seem to get the
syntax right. 

I am getting an error meessage from PropertyUtils that displays the index as
'${index}', which indicates that that struts el expression is not resolving
to an int.

Here is my exact syntax. The form and action are described in more detail
below.















Send


I have created several Test classes to help me understand the flow...

The form is an instance of TestForm exends ActionForm and its form name in
struts-config.xml is "testForm". (This is the named form for the action.)
TestForm has one property: java.util.List list with accessors public List
getList() and public void setList(List list). 

List is always a List of LineItem objects where LineItem is a simple
JavaBean with properties
String id (public String getId() and public void setId(String id)), String
description (public String getDescription() and public void
setDescription(String description)) and boolean isChanged (public void
setIsChanged(boolean value) and public boolean getIsChanged() )

The Action (TestAction extends Action) "execute" method creates a List of 5
LineItem objects and stores that List into the form by calling
((TestForm)form).setList(list), then forwards to the jsp (test.jsp)

In the jsp I would like to iterate through the list to perform the
following: 
display the id (as html read-only text) and the
description (as html:text) of each line item, 
then use JavaScript to change the "isChanged" property (in a hidden field)
when the onchange event is triggered.

I have tried several different syntaxes. I also tried using arrays instead
of List's. I also specified the type of the LineItem class explicitly in the
form element. I tried each of the "html:" and "bean:write" lines above one
at a time to see if any would be successful, but they all produce that same
error. I have combed the web for a good example of how to accomplish this,
but I couldn't find anything that handled things in a way that would work
for us.

Can you tell me what I am doing wrong and how to accomplish the access?

Thanks/Victor



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



RE: Struts development methodology

2004-09-21 Thread Victor Grazi
Thanks. Yes, IE. It is for an intranet and that is the required and only
supported browser by the bank.
Regards/Victor

-Original Message-
From: Brett Connor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 15, 2004 12:55 AM
To: Struts Users Mailing List
Subject: Re: Struts development methodology

Sounds like a case for mock objects and actions perhaps. I like this kind of
approach because it is useful for early prototyping and testing, leaving a
clear seperation between the responsibilities either side of this interface,
and supports the 'test driven' approach. I have little experience of doing
this with struts (I'm fairly new to struts) but it's my plan to do things
this way.

I'm concerned when you say your UI developers need to check things in IE
before signing things off. Surely they should check in _all_ of the main
browsers, not just IE? I've already had to take steps to change banks
because they only supported proprietry browsers rather than suport the
standards. We should not be allowing these things to slip through IMHO.

Brett Connor


Victor Grazi wrote:

>Not sure I understand.
>What's a CVS? Are u referring to a versioning tool? Yes we have that.
>The  ui developers can do wysiwyg development using struts tags in 
>Dreamweaver. The problem is when they go to view there work in IE, they 
>can't, because the Java people don't work as fast as the ui folks ___
>
>.. Original Message ...
>On Tue, 14 Sep 2004 20:05:02 -0500 Vic <[EMAIL PROTECTED]> wrote:
>  
>
>>Struts works great for this. I assume you have a CVS, and then 
>>leverage the HTML people to write and maintain your JSP pages. They 
>>can use the html input tags or what ever, and DW has plugins for JSP 
>>tag libs, any and all.
>>The java People can write formbeans that map to the html forms and 
>>unit test CRUD.
>>The layered development, done all the time just like that.
>>.V
>>
>>Victor Grazi wrote:
>>
>>
>>>We are developing an important struts application for a major bank, 
>>>and
>>>  
>>>
>we
>  
>
>>>need some advice on methodology...
>>>Our graphic designers are developing the UI in HTML using Dreamweaver
>>>  
>>>
>and
>  
>
>>>Notepad. (They are gifted artists, but they don't much know about 
>>>Struts
>>>  
>>>
>or
>  
>
>>>JSTL).
>>>We also have Java developers who are concurrently creating the Struts 
>>>pieces.
>>>
>>>Question is - how do you synch up the work of these 2 teams?
>>>One approach would be to give the Java team the html pages and have 
>>>them translate the tags to struts. However this becomes difficult to
>>>  
>>>
>maintain,
>  
>
>>>because if the graphics team makes a few small changes, the entire 
>>>page needs to be retranslated to struts.
>>>
>>>Another approach would be to download a Dreamweaver plugin such as 
>>>FWA Visual Struts. We tested that approach and we were actually able 
>>>to get the tags to render in Dreamweaver. However the artists always 
>>>need to view the pages in MS Internet Explorer before signing off, 
>>>and since the Java classes don't exist yet, they can't do that.
>>>
>>>We considered another approach where we would create an XSLT 
>>>transform
>>>  
>>>
>to
>  
>
>>>transform the html pages to a struts equivalent, and embed struts
>>>  
>>>
>specific
>  
>
>>>info into the document using some tags that would not be recognizable 
>>>to the browser. However this is difficult since there is not really a 
>>>1 to
>>>  
>>>
>1
>  
>
>>>correspondence between tags and attributes.
>>>
>>>Ok, so those were our ideas, none of them great.
>>>So can you give us any advice?
>>>
>>>Thanks,
>>>Victor
>>>  
>>>
>>--
>>Please post on Rich Internet Applications User Interface (RiA/SoA) 
>><http://www.portalvu.com>
>>
>>
>>-
>>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]




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



Re: Struts development methodology

2004-09-14 Thread Victor Grazi
Not sure I understand.
What's a CVS? Are u referring to a versioning tool? Yes we have that.
The  ui developers can do wysiwyg development using struts tags in 
Dreamweaver. The problem is when they go to view there work in IE, they 
can't, because the Java people don't work as fast as the ui folks
___

.. Original Message ...
On Tue, 14 Sep 2004 20:05:02 -0500 Vic <[EMAIL PROTECTED]> wrote:
>Struts works great for this. I assume you have a CVS, and then leverage 
>the HTML people to write and maintain your JSP pages. They can use the 
>html input tags or what ever, and DW has plugins for JSP tag libs, any 
>and all.
>The java People can write formbeans that map to the html forms and unit 
>test CRUD.
>The layered development, done all the time just like that.
>.V
>
>Victor Grazi wrote:
>> We are developing an important struts application for a major bank, and 
we 
>> need some advice on methodology...
>> Our graphic designers are developing the UI in HTML using Dreamweaver 
and 
>> Notepad. (They are gifted artists, but they don't much know about Struts 
or 
>> JSTL).
>> We also have Java developers who are concurrently creating the Struts 
>> pieces.
>> 
>> Question is - how do you synch up the work of these 2 teams?
>> One approach would be to give the Java team the html pages and have them 
>> translate the tags to struts. However this becomes difficult to 
maintain, 
>> because if the graphics team makes a few small changes, the entire page 
>> needs to be retranslated to struts.
>> 
>> Another approach would be to download a Dreamweaver plugin such as FWA 
>> Visual Struts. We tested that approach and we were actually able to get the 
>> tags to render in Dreamweaver. However the artists always need to view the 
>> pages in MS Internet Explorer before signing off, and since the Java 
>> classes don't exist yet, they can't do that.
>> 
>> We considered another approach where we would create an XSLT transform 
to 
>> transform the html pages to a struts equivalent, and embed struts 
specific 
>> info into the document using some tags that would not be recognizable to 
>> the browser. However this is difficult since there is not really a 1 to 
1 
>> correspondence between tags and attributes.
>> 
>> Ok, so those were our ideas, none of them great.
>> So can you give us any advice?
>> 
>> Thanks,
>> Victor
>
>
>-- 
>Please post on Rich Internet Applications User Interface (RiA/SoA)
><http://www.portalvu.com>
>
>
>-
>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]



Struts development methodology

2004-09-14 Thread Victor Grazi
We are developing an important struts application for a major bank, and we 
need some advice on methodology...
Our graphic designers are developing the UI in HTML using Dreamweaver and 
Notepad. (They are gifted artists, but they don't much know about Struts or 
JSTL).
We also have Java developers who are concurrently creating the Struts 
pieces.

Question is - how do you synch up the work of these 2 teams?
One approach would be to give the Java team the html pages and have them 
translate the tags to struts. However this becomes difficult to maintain, 
because if the graphics team makes a few small changes, the entire page 
needs to be retranslated to struts.

Another approach would be to download a Dreamweaver plugin such as FWA 
Visual Struts. We tested that approach and we were actually able to get the 
tags to render in Dreamweaver. However the artists always need to view the 
pages in MS Internet Explorer before signing off, and since the Java 
classes don't exist yet, they can't do that.

We considered another approach where we would create an XSLT transform to 
transform the html pages to a struts equivalent, and embed struts specific 
info into the document using some tags that would not be recognizable to 
the browser. However this is difficult since there is not really a 1 to 1 
correspondence between tags and attributes.

Ok, so those were our ideas, none of them great.
So can you give us any advice?

Thanks,
Victor


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



Seeking master detail hello world

2004-09-12 Thread Victor Grazi
Can you point me to a small but complete master detail struts program? I am 
having trouble understanding how to set this up, especially with buttons on 
each row.

For example if the page is displaying a collection of beans as an html 
table, and there is an update and delete button on each row, how do you 
pass the id of the record to those buttons and how does the Action capture 
the button (update or delete, and record id) that was pressed.
Thanks
Victor

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



RE: Generating struts tags from a Java Bean

2004-08-18 Thread Victor Grazi
Not exactly; can you elaborate the step "Model Use of  logic to
generate "

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 18, 2004 11:15 AM
To: Struts Users Mailing List
Subject: Re: Generating struts tags from a Java Bean


The JSP page is read and the tags there are used to do whatever is required
to respond to a call to that page. Usually that is writing a JSP page.
While you cannot use the struts tags between the JSP page and the ultimate
HTML page, you can do something like that with code in the background.  So,
instead of dynamically generating Struts tags as follows:

JSP page  > JSP page  -> HTML page



You could somewhat easily work up something like the following:

JSP page  > Model Use of  logic to
generate > HTML page  from 


That clear?

Michael


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




RE: Generating struts tags from a Java Bean

2004-08-18 Thread Victor Grazi
These tags are going to be reused many times throughout our application, and
I prefer to omit this type of decision logic from the jsp pages. Therefore I
think it pays to design custom tags to accomplish what I need. 

I have been looking at some of the source code for the various tag handlers
that extend BaseTagHandler, and I see there is a lot going on. I would like
to make sure to leverage all of the functionality included in
BaseTagHandler.

I was wondering if there is some documentation out there for creating new
BaseTagHandler extensions, or custom Struts HTML components in general. 

I understand how to create taglibs in general, I am asking whether there is
such specific documentation for Struts.

Much thanks/Victor Grazi

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 17, 2004 4:42 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Generating struts tags from a Java Bean

The standard struts-example webapp has a case of conditional rendering as
well.  The "registration.jsp" page is used for both "Create a New User" and
"Log In As Existing User"., but only in the latter case does it show the
table at the bottom.  This is controlled by the following tag around the
table:

  
...
  

which makes sure that the "action" property on the "RegistrationForm"
bean equals "Edit" before displaying the table.

Craig

On Tue, 17 Aug 2004 16:13 -0400, Victor Grazi <[EMAIL PROTECTED]> wrote:
> The custom tag approach seems like the way to go. Is there any 
> documentation for considerations besides just perusing the source code 
> for exisiting html tags?
> Regards
> Victor
> 
> ... Original Message ...
> 
> 
> On Tue, 17 Aug 2004 10:53:29 -0700 "Jim Barrows" <[EMAIL PROTECTED]>
wrote:
> >
> >
> >> -Original Message-
> >> From: Victor Grazi [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, August 17, 2004 10:35 AM
> >> To: Struts Users Mailing List
> >> Subject: RE: Generating struts tags from a Java Bean
> >>
> >>
> >> the problem we are trying to solve is that depending on user 
> >> entitlements and application state, some fields need to either be a 
> >> drop down or just text.
> >
> >What I would suggest then, is to figure that out in your action 
> >class, and
> pass boolean values as part of the form bean.  Then on the jsp page, 
> use  >
> >Alternatively you could write your own tag library for the field, 
> >which
> would figure out what html to generate based on the attributes you give
it.
>  Something like:
> > applicationState="${applicationState}"/>
> >You can of course get a list of roles from isUserInRole(), or hand 
> >them in if your doing
> something else.
> >
> >If you have only 1 or 2 pages, then the first option may be easier, 
> >but if you're doing it a
> lot then the taglib option might be better.
> >
> >>
> >>
> >> ___
> >> Sent with SnapperMail
> >> www.snappermail.com
> >>
> >> .. Original Message ...
> >> On Tue, 17 Aug 2004 09:46:49 -0700 "Jim Barrows"
> >> <[EMAIL PROTECTED]> wrote:
> >> >
> >> >
> >> >> -Original Message-
> >> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >> >> Sent: Tuesday, August 17, 2004 9:42 AM
> >> >> To: Struts Users Mailing List
> >> >> Subject: Generating struts tags from a Java Bean
> >> >>
> >> >>
> >> >> I would like to generate struts tags from a Java bean, which 
> >> >> would decide what tags to generate based on context.
> >> >> Is there any way to configure the JSP so that it will evaluate 
> >> >> the JavaBean first, before the struts tags, so that the struts 
> >> >> tags can be generated by the beans?
> >> >
> >> >I don't believe so.  Since struts tags only generate html,
> >> you could have
> >> beans that generate html based on context.  However, given that 
> >> struts and jstl have some rather powerful logical statements, you 
> >> might be able to achieve what you want without doing away with 
> >> struts tags, which is what you are basically asking.
> >> >
> >> >What problem are you trying to solve?
> >> >
> >> >
> >> >--
> >> >--- 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]
> >
> 
> -
> 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]



RE: Generating struts tags from a Java Bean

2004-08-17 Thread Victor Grazi
The custom tag approach seems like the way to go. Is there any 
documentation for considerations besides just perusing the source code for 
exisiting html tags?
Regards
Victor

.. Original Message ...
On Tue, 17 Aug 2004 10:53:29 -0700 "Jim Barrows" <[EMAIL PROTECTED]> wrote:
>
>
>> -Original Message-
>> From: Victor Grazi [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, August 17, 2004 10:35 AM
>> To: Struts Users Mailing List
>> Subject: RE: Generating struts tags from a Java Bean
>> 
>> 
>> the problem we are trying to solve is that depending on user 
>> entitlements 
>> and application state, some fields need to either be a drop 
>> down or just 
>> text.
>
>What I would suggest then, is to figure that out in your action class, and 
pass boolean values as part of the form bean.  Then on the jsp page, use 

>Alternatively you could write your own tag library for the field, which 
would figure out what html to generate based on the attributes you give it. 
 Something like:
>
>You can of course get a list of roles from isUserInRole(), or hand them in if your 
>doing 
something else.
>
>If you have only 1 or 2 pages, then the first option may be easier, but if you're 
>doing it a 
lot then the taglib option might be better.
>
>> 
>> 
>> ___
>> Sent with SnapperMail
>> www.snappermail.com
>> 
>> .. Original Message ...
>> On Tue, 17 Aug 2004 09:46:49 -0700 "Jim Barrows" 
>> <[EMAIL PROTECTED]> wrote:
>> >
>> >
>> >> -Original Message-
>> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> >> Sent: Tuesday, August 17, 2004 9:42 AM
>> >> To: Struts Users Mailing List
>> >> Subject: Generating struts tags from a Java Bean
>> >> 
>> >> 
>> >> I would like to generate struts tags from a Java bean, which 
>> >> would decide 
>> >> what tags to generate based on context.
>> >> Is there any way to configure the JSP so that it will evaluate the 
>> >> JavaBean first, before the struts tags, so that the struts 
>> >> tags can be 
>> >> generated by the beans?
>> >
>> >I don't believe so.  Since struts tags only generate html, 
>> you could have 
>> beans that generate html based on context.  However, given 
>> that struts and 
>> jstl have some rather powerful logical statements, you might 
>> be able to 
>> achieve what you want without doing away with struts tags, 
>> which is what 
>> you are basically asking.
>> >
>> >What problem are you trying to solve?
>> >
>> >
>> >-
>> >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]
>


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



RE: Generating struts tags from a Java Bean

2004-08-17 Thread Victor Grazi
the problem we are trying to solve is that depending on user entitlements 
and application state, some fields need to either be a drop down or just 
text.


___
Sent with SnapperMail
www.snappermail.com

.. Original Message ...
On Tue, 17 Aug 2004 09:46:49 -0700 "Jim Barrows" <[EMAIL PROTECTED]> wrote:
>
>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, August 17, 2004 9:42 AM
>> To: Struts Users Mailing List
>> Subject: Generating struts tags from a Java Bean
>> 
>> 
>> I would like to generate struts tags from a Java bean, which 
>> would decide 
>> what tags to generate based on context.
>> Is there any way to configure the JSP so that it will evaluate the 
>> JavaBean first, before the struts tags, so that the struts 
>> tags can be 
>> generated by the beans?
>
>I don't believe so.  Since struts tags only generate html, you could have 
beans that generate html based on context.  However, given that struts and 
jstl have some rather powerful logical statements, you might be able to 
achieve what you want without doing away with struts tags, which is what 
you are basically asking.
>
>What problem are you trying to solve?
>
>
>-
>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]



varying form element types using struts

2004-08-08 Thread Victor Grazi

I am creating  a Struts form with some dynamically populated drop down 
lists. There is a general requirement that any drop down that contains just 
a single element should display as free html text instead of as a drop down.

Is there any way to specify this type of variation using struts?

Regards
Victor


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