Re: getting the current thread inside an action

2003-09-23 Thread Michael Thompson
Thread.currentThread();
   --m


Menke, John wrote:

Is there a way to get reference to the current thread from within an Action?

-
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: Action Form Design Question

2003-09-22 Thread Michael Thompson
That hits on some points, I did read that thread earlier this week(I'll 
even read it again), and I'm starting to agree on not shoving everything 
in the ActionForm, but I don't recall it hitting on an Action needing 
one form for input and one form for output.  If I totally ignore it, the 
second page will render, but what if I need my html form in the second 
JSP(JSPB) to be prepopulated with the results of the processing in ActionA?

Scenario:
I have jspA that is rendered with ActionFormA.  Now user submits that 
data to ActionA.  ActionA recieves an ActionFormA as its input form in 
execute.  Now ActionA needs to forward to jspB which expectes an 
ActionFormB, what is the cleanest way to handle this in struts(see code 
below).  Do struts users run across this case often or do I need to 
rethink my Action/Form design? 

   --m

Robert Taylor wrote:

This was discussed earlier this week. 

Some solutions are addressed here:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg81101.html
robert

 

-Original Message-
From: Michael Thompson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 6:10 PM
To: struts-user
Subject: Action Form Design Question
I've hit a stumbling block and I'm not quite sure how to work around 
it.  I've written struts apps in the past and I've taken the approach of 
putting everything in the ActionForm so that the jsp has a one stop shop 
for all it's display needs.  So where I've hit an issue is when say I 
have jsp A that is rendered with form A.  When user submits data to 
action A, the ActionForm pushed to execute is form A.  What happens when 
I need to forward from action A to jsp B which is rendered with form B?  
I need to populate an ActionForm B to send to jsp B, but I don't have 
one.  Is it "normal" to create a form of a different type in your 
Action?  So essentially the code would look something like:

public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
  FormA inputForm = (FormA)form;
  Result result = doSomeCrunchingOnDataSubmittedViaFormA(inputForm);
FormB outputForm = getInstanceOfFormB(mapping, request);  //this 
would stash in request/session also
  populateFormBWithResults(outputForm, result);

  return mapping.findForward("success");
}
getInstanceOfFormB is a little hazy, but I did notice a method in 
RequestUtils that might help.  Seems like this might be breaking some 
struts abstractions by knowing what form to create etc.

Is this the correct way to approach this or should I think about a 
redesign of my forms and actions?  Thanks in advance!
--m



-
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]


Action/Form Design Q

2003-09-21 Thread Michael Thompson
I've hit a stumbling block and I'm not quite sure how to work around 
it.  I've written struts apps in the past and I've taken the approach of 
putting everything in the ActionForm so that the jsp has a one stop shop 
for all it's display needs.  So where I've hit an issue is when say I 
have jsp A that is rendered with form A.  When user submits data to 
action A, the ActionForm pushed to execute is form A.  What happens when 
I need to forward from action A to jsp B which is rendered with form B?  
I need to populate an ActionForm B to send to jsp B, but I don't have 
one.  Is it "normal" to create a form of a different type in your 
Action?  So essentially the code would look something like:

public void execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response)
 throws Exception
{
   FormA inputForm = (FormA)form;
   Result result = doSomeCrunchingOnDataSubmittedViaFormA(inputForm);
  
   FormB outputForm = getInstanceOfFormB(mapping, request);  //this 
would stash in request/session also
   populateFormBWithResults(outputForm, result);

   return mapping.findForward("success");
}
getInstanceOfFormB is a little hazy, but I did notice a method in 
RequestUtils that might help.  Seems like this might be breaking some 
struts abstractions by knowing what form to create etc.

Is this the correct way to approach this or should I think about a 
redesign of my forms and actions?  Thanks in advance!
 --m



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


Re: Action Form Design Question

2003-09-21 Thread Michael Thompson
Thanks Robert!

I agree on letting struts do it's job where available, that's why I 
thought my code snippet below was a little goofy.  My only question 
about your suggestions is in solution 2 you mention having a second 
action.  You're not suggesting action chaining are you?  If not, how do 
you hook into second action "the struts way"?   Or would this be one 
place where action chaining is accepted?

Thanks again!

   --m

Robert Taylor wrote:

I would say the solution depends on the process.

If the process of going from pageA to pageB to ... pageN, is
a wizard style process then you might think of placing all
your data in the same form and putting the form in session scope.
If you don't want to put your form in session scope AND the
data you capture along the way can be stored in hidden fields,
then you could also use a single form placed in request scope.
If the process is somewhat disjoint and you have separate forms,
then is the data to be rendered in pageB unique to the user? Is
it static data? If so, place that data in ServletContext and
make it available to all users and you don't need a set up action
for pageB. 

If the data IS unique to the user AND you have separate forms then
in this situation, I would still let Struts perform the form creation.
-Soluation 1:
Place the data retrieved from processing pageA in request scope
and forward to the page and tell the particular html component to look
for the data in the request under some defined name.
-Solution 2: 
Insert and additional preparation action in between the action processing
pageA and pageB; call it ShowPageB or something of the sort. ShowPageB
action would access the data out of request scope and populate the form
defined for pageB and forward to pageB.

There are so many ways to approach this solution. It's subjective to the
complexity of the process. I wouldn't stress over the fact of having 
to place data in the request scope temporarily. 

What I would stress is let Struts do its job where possible - like
creating action forms.
robert



 

-Original Message-
From: Michael Thompson [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 20, 2003 11:09 AM
To: Struts Users Mailing List
Subject: Re: Action Form Design Question
//
///
//I've been having issues with posting to this list, so I apologize if 
this is a repost.
//
///

That hits on some points, I did read that thread earlier this week(I'll 
even read it again), and I'm starting to agree on not shoving everything 
in the ActionForm, but I don't recall it hitting on an Action needing 
one form for input and one form for output.  If I totally ignore it, the 
second page will render, but what if I need my html form in the second 
JSP(JSPB) to be prepopulated with the results of the processing 
in ActionA?

Scenario:
I have jspA that is rendered with ActionFormA.  Now user submits that 
data to ActionA.  ActionA recieves an ActionFormA as its input form in 
execute.  Now ActionA needs to forward to jspB which expectes an 
ActionFormB, what is the cleanest way to handle this in struts(see code 
below).  Do struts users run across this case often or do I need to 
rethink my Action/Form design?
  --m

Robert Taylor wrote:

   

This was discussed earlier this week. 

Some solutions are addressed here:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg8
 

1101.html
   

robert



 

-Original Message-
From: Michael Thompson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 6:10 PM
To: struts-user
Subject: Action Form Design Question
I've hit a stumbling block and I'm not quite sure how to work around 
it.  I've written struts apps in the past and I've taken the 
   

approach of 
   

putting everything in the ActionForm so that the jsp has a one 
   

stop shop 
   

for all it's display needs.  So where I've hit an issue is when say I 
have jsp A that is rendered with form A.  When user submits data to 
action A, the ActionForm pushed to execute is form A.  What 
   

happens when 
   

I need to forward from action A to jsp B which is rendered with 
   

form B?  
   

I need to populate an ActionForm B to send to jsp B, but I don't have 
one.  Is it "normal" to create a form of a different type in your 
Action?  So essentially the code would look something like:

public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
 FormA inputForm = (FormA)form;
 Result result = doSomeCrunchingOnDataSubmittedViaFormA(inputForm);
   FormB outputForm = getInstanceOfFormB(mapping, request);  //this 
w

Re: Action Form Design Question

2003-09-20 Thread Michael Thompson
/
//I've been having issues with posting to this list, so I apologize if 
this is a repost.
/

That hits on some points, I did read that thread earlier this week(I'll 
even read it again), and I'm starting to agree on not shoving everything 
in the ActionForm, but I don't recall it hitting on an Action needing 
one form for input and one form for output.  If I totally ignore it, the 
second page will render, but what if I need my html form in the second 
JSP(JSPB) to be prepopulated with the results of the processing in ActionA?

Scenario:
I have jspA that is rendered with ActionFormA.  Now user submits that 
data to ActionA.  ActionA recieves an ActionFormA as its input form in 
execute.  Now ActionA needs to forward to jspB which expectes an 
ActionFormB, what is the cleanest way to handle this in struts(see code 
below).  Do struts users run across this case often or do I need to 
rethink my Action/Form design?
  --m

Robert Taylor wrote:

This was discussed earlier this week. 

Some solutions are addressed here:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg81101.html
robert

 

-Original Message-
From: Michael Thompson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 6:10 PM
To: struts-user
Subject: Action Form Design Question
I've hit a stumbling block and I'm not quite sure how to work around 
it.  I've written struts apps in the past and I've taken the approach of 
putting everything in the ActionForm so that the jsp has a one stop shop 
for all it's display needs.  So where I've hit an issue is when say I 
have jsp A that is rendered with form A.  When user submits data to 
action A, the ActionForm pushed to execute is form A.  What happens when 
I need to forward from action A to jsp B which is rendered with form B?  
I need to populate an ActionForm B to send to jsp B, but I don't have 
one.  Is it "normal" to create a form of a different type in your 
Action?  So essentially the code would look something like:

public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
  FormA inputForm = (FormA)form;
  Result result = doSomeCrunchingOnDataSubmittedViaFormA(inputForm);
FormB outputForm = getInstanceOfFormB(mapping, request);  //this 
would stash in request/session also
  populateFormBWithResults(outputForm, result);

  return mapping.findForward("success");
}
getInstanceOfFormB is a little hazy, but I did notice a method in 
RequestUtils that might help.  Seems like this might be breaking some 
struts abstractions by knowing what form to create etc.

Is this the correct way to approach this or should I think about a 
redesign of my forms and actions?  Thanks in advance!
--m



-
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]


Action Form Design Question

2003-09-19 Thread Michael Thompson
I've hit a stumbling block and I'm not quite sure how to work around 
it.  I've written struts apps in the past and I've taken the approach of 
putting everything in the ActionForm so that the jsp has a one stop shop 
for all it's display needs.  So where I've hit an issue is when say I 
have jsp A that is rendered with form A.  When user submits data to 
action A, the ActionForm pushed to execute is form A.  What happens when 
I need to forward from action A to jsp B which is rendered with form B?  
I need to populate an ActionForm B to send to jsp B, but I don't have 
one.  Is it "normal" to create a form of a different type in your 
Action?  So essentially the code would look something like:

public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
  FormA inputForm = (FormA)form;
  Result result = doSomeCrunchingOnDataSubmittedViaFormA(inputForm);
FormB outputForm = getInstanceOfFormB(mapping, request);  //this 
would stash in request/session also
  populateFormBWithResults(outputForm, result);

  return mapping.findForward("success");
}
getInstanceOfFormB is a little hazy, but I did notice a method in 
RequestUtils that might help.  Seems like this might be breaking some 
struts abstractions by knowing what form to create etc.

Is this the correct way to approach this or should I think about a 
redesign of my forms and actions?  Thanks in advance!
--m



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


ignore me: test

2003-09-19 Thread Michael Thompson
Well, I had a disclaimer in the subject, but since you are here, I've 
been trying to send messages since 1100 CST and not one has hit the 
list.  Things usually don't take this long, 10 min tops.  I'm sending 
this test mail to see if it has anything to do with my mail client settings.
 --m



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


Re: Quick Java question..

2003-08-21 Thread Michael Thompson
Or wait till 1.5 ;)

http://developer.java.sun.com/developer/community/chat/JavaLive/2003/jl0729.html

*Neal Gafter*: Then there's autoboxing/unboxing and varargs. Boxing 
allows you to use a primitive int instead of a |java.lang.Integer|, and 
unboxing does the reverse. varargs allows you to declare a method that 
takes a variable number of arguments, which are automatically packed up 
into an array before being passed to the method.

   --m

Alex Shneyderman wrote:

You can make your parms Object []
This way you can pass as many params as you want.
Of course you will need to keep track of what element is what.
Maybe Java 1.5 will have the feature you are looking for :-)

Alex.

 

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 6:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Quick Java question..
sorry, dude, but param arguments are evaluated at compile time.  The
   

best
 

you could do is overload the method.

Mark

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 6:00 PM
To: Struts Mailing List
Subject: Quick Java question..
Hey as I've been building my actions I was thinking it could be useful
   

for
 

me to have a method that does some database querying, but I would like
   

to
 

give the user the ability to narrow down that query with as many input
fields as he needs.  Is there a way to write a method that takes a
   

non-set
 

amount of arguments?  (Other than just passing the method a growable
array..
which is a viable alternative)
Ie

public String myfunction(String a, String b, String c on down the
   

line
 

indefinitly)

?
I thought I had seen this done somewhere somehow but I may be wrong.
Thanks!
-
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: Best Practice, Variable Number Of Form Elements

2003-07-08 Thread Michael Thompson
If you have indexed props with lists of java objects
on your form:
public Person getPerson(int index);
public void setPerson(int index, Person person);
public Collection getPersons();
and you have a  or whatever

then struts(beanutils really?) will do something like

yourFormInstance.getPerson(4).setName(theValue);

What I've done in the past is lazily create person objects in the 
getPerson method

private ArrayList _persons = new ArrayList();

public Person getPerson(int index)
{
   while (index < _people.size())
   _people.add(new Person());
   return _people.get(index);
}
There are other methods for doing this lazy loading.  I'm pretty sure 
I've seen a LazyLoadingList or something in the jakarta commons projects.

   --m

James Childers wrote:

The PROBLEM is submitting this form. I haven't found a way to 
make Struts
auto-allocate space in a collection (or a Map, for that matter) in an
ActionForm for the submit action. Almost every example on 
this I've seen
deals with a fixed number of elements, and most of these 
still focus on the
pre-populate action. These examples completely avoid this issue.

So, when the number of elements on the form VARIES, what is the "best
practice" in design for this? I'm talking about an indexed or mapped
collection that contains other Java Beans. How can you get these to 
submit properly into an ActionForm? If there are options, can you weigh 
the pros/cons of each?

For example, I'm sure a session-scope bean would accomplish 
this, but I stay away from session-scope beans because of clustered 
deployment issues.
   

Make your Form elements String[] objects. These will automatically be populated (and sized) when the form is submitted. Since the ServletRequest interface works with attributes using Strings, this is just about the only way to do things. You can't pass Java objects across HTTP, at least not using GET or POST. You're forced to deal with strings by the protocol.

If you need to use something other than array, another solution is needed. Once your Form is passed to your Action, you can get the number of elements you will need using request.getParameterValues(String). This method returns a String[]; you could get the length of this array and use it to size your collection object as needed.

As an aside, I think you may be worrying about storing things in session more than is warranted. Modern containers are very good at tracking session information across clusters. We have a cluster of over a dozen systems for our site, and we have never encountered any problems with storing data in session. We try to minimize the use of sessions for the sake of efficiency and design, not because of problems with data being replicated across different systems.

-= J

-
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: Best way of implementing application-specific config objects

2003-06-27 Thread Michael Thompson
You may also want to look at the ServeletContextListeners available in the 2.3 
servlet spec.  This will allow you to specify a listener class in your web.xml. 
 This listener must implement javax.servlet.ServletContextListener.

http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html

you can then initialize your config factory in the contextInitialized method.

This way your solution is not tied to struts.

	--m

[EMAIL PROTECTED] wrote:
Thanks man! I will check that out right away!!

=== 
 Augusto Cesar Guagliano
 [EMAIL PROTECTED]
 Project Manager
 +55 19 9106.9024
 Infosoftware Consulting
 http://www.infosoftware.com.br
===
 
Esta mensagem pode conter informação confidencial e/ou privilegiada. Se 
você não for o destinatário ou a pessoa autorizada a receber esta 
mensagem, não pode usar, copiar ou divulgar as informações nela contidas 
ou tomar qualquer ação baseada nessas informações. Se você recebeu esta 
mensagem por engano, por favor avise imediatamente o remetente, 
respondendo o e-mail e em seguida apague-o. Agradecemos sua cooperação.

This message may contain confidential and/or privileged information. If 
you are not the addressee or authorized to receive this for the addressee, 
you must not use, copy, disclose or take any action based on this message 
or any information herein. If you have received this message in error, 
please advise the sender immediately by reply e-mail and delete this 
message. Thank you for your cooperation.





[EMAIL PROTECTED]
27/06/2003 11:54
Please respond to "Struts Users Mailing List"
 
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
cc: 
Subject:Re: Best way of implementing application-specific config objects



You can make use of the struts plugin component. The plugins are loaded
before the application is loaded. The strugs-config.xml has an entry for
the plugin section, wherein you can define some customized plugins for 
your
application. Hope this helps..



-
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: Forms with dynamically generated fields

2003-06-24 Thread Michael Thompson
You can always use mapped properties though.

public String getSomeProperty(String parameter);
public void setSomeProperty(String parameter, String value);
  

You might extract your keys from your form and loop over them with a c:forEach or a logic:iterate.

	--m

Piers Dunleavy wrote:
I have a JSP that generates a form based. The JSP creates a set of input
fields on fly based on some prior information that the user entered.
Therefore the number of fields for that form will differ from user to user.
What is the best approach in Struts for dealing with this. Obviously, I
can't simply define a DynaActionForm in the struts-config file, for there
won't be a fixed number of fields.
-Piers

-
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: How much should Struts be aware of my persistence system

2003-06-20 Thread Michael Thompson
A, didn't quite catch that.  I don't know that I'd be putting that 
kind of knowledge(OJB) in my struts actions.  I'd probably wrap that up 
behind some interface.

public interface FooManager
{
public Collection getFoos()
throws SomeKindOfPersistenceExcpetion;
}
Struts Action would grab and instance of FooManager (JNDI, Factory, 
singletons, whatever) and call getFoos().

getFoos implementation would do all OJB specific stuff.

Right/Wrong whatever... just my $0.02...

	--m

Alen Ribic wrote:
Hi Michael

Thanks for your response.

Do you mean a global object reference that will be shared by all user
invocations?
If so, that will not work in my case because I need a new instance for each
separate action method invocation.
That's suppose to be best practice for when using OJB persistence system.
OJB-user list question from me...

Where do you suggest for the instantiation of Persistence
Broker to reside?
For maximum scalability try to keep instantiation and closing of a broker
instance as close together as possible. best thing is to open a broker at
the beginning of a command and to close it at the end (in a finally block to
make sure it really is called!)

--Alen



- Original Message -
From: "Michael Thompson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 3:59 PM
Subject: Re: How much should Struts be aware of my persistence system


I've done stuff like this in a javax.servlet.ServletContextListener.

the contextInitialized method gets called when the app is ready to
recieve reqs, so initialization of "global" objects can be done there.
There may be a way to do it in a more struts like fashion...
--m
Alen Ribic wrote:

Hi all

Where do you think is the best place to initialise your persistence,

ORM,

system in Struts?
Action classes, etc.?
I would like to make the Struts framework least aware of my Persistence
system.
I'm using OJB with PB API and Struts 1.1.

Apparently, best practice, when using OJB PB API is to create an

instance of

Broker before executing business command and then close the Broker after
execution.
Any ideas as to what particular design I should implement here to get

most

out of role separation?

--Alen



-
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: How much should Struts be aware of my persistence system

2003-06-20 Thread Michael Thompson
I've done stuff like this in a javax.servlet.ServletContextListener.

the contextInitialized method gets called when the app is ready to 
recieve reqs, so initialization of "global" objects can be done there.

There may be a way to do it in a more struts like fashion...
--m
Alen Ribic wrote:
Hi all

Where do you think is the best place to initialise your persistence, ORM,
system in Struts?
Action classes, etc.?
I would like to make the Struts framework least aware of my Persistence
system.
I'm using OJB with PB API and Struts 1.1.

Apparently, best practice, when using OJB PB API is to create an instance of
Broker before executing business command and then close the Broker after
execution.
Any ideas as to what particular design I should implement here to get most
out of role separation?
--Alen



-
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: form bean

2003-06-20 Thread Michael Thompson
Could you not make the parameters just a string list on the form bean?



...

Kind of like dealing with a table with variable # of rows.
--m
[EMAIL PROTECTED] wrote:
hi all,
i have a situation in which i have to display a form which
has 'dynamic parameters', meaning that for each request, since i have
to retrieve parameters for the entered function from a function repository,
i may have different parameters for the form.
so, i cannot associate any ActionForm to the Action class that is processing
the request..
Here are the steps, for clarity:
1 - user enters the name of a function in an input form
2 - a form bean will be populated with the parameters retrieved for specific function
3- user has to enter a value for those parameters
step 3 is the problem. the formbean used in 2 contains a java.util.List of all 
parameters retrieved, but
it contains only the names.
so, in step 3 user has to enter a value for those parameters.. and since parameters 
vary from function
to function, i cannot write a proper form bean.
anyone has some idea on how to solve the situation?
i can always put a 'dummy' action form that will not be used..but it does not seem to 
me a proper
solution...
regards
marco
-
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: [FRIDAY] RE: how to make conformation massage?

2003-06-20 Thread Michael Thompson
Look at javax.swing.JOptionPane

	--m

Chappell, Simon P wrote:
I could do with a conformation massage right now, especially for my shoulders ... anyone else? ;-)

Simon "Sorry Craig, but I couldn't resist it" Chappell


-Original Message-
From: dream weaver [mailto:[EMAIL PROTECTED]
Sent: Friday, June 20, 2003 8:32 AM
To: Struts Users Mailing List
Subject: how to make conformation massage?



-
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: Using Struts-EL

2003-06-18 Thread Michael Thompson
I could be wrong, but I think I noticed that some of the struts-el 
taglibs did not contain some of the tags from the non-el taglibs.  It's 
been a while so I don't remember the exact tags.
	--m

[EMAIL PROTECTED] wrote:
Hi, Kris

One more question about using Struts-el. Is there any permance overhead if we replace all Struts taglibs with their corresponding Struts-EL tablibs ? Where can I find Struts-EL API ?

Zaili

-Original Message-
From: Zaili Xu 
Sent: Wednesday, June 18, 2003 2:01 PM
To: 'Struts Users Mailing List'
Subject: RE: Using expression in Struts tags

Thank you very much, Kris.

Zaili

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:48 PM
To: Struts Users Mailing List
Subject: Re: Using expression in Struts tags
What you're using is the JSTL Expression Language and not a request-time
expression (RT EXPR). A request-time expression is just a JSP expression:
<%= request.getParameter("foo") %>

You may be interested in the Struts-EL library which integrates the JSTL EL into
a subset of the Struts tags:
http://jakarta.apache.org/struts/userGuide/building_view.html#struts-el

In can be found in the "contrib/struts-el" directory of the Struts distribution.

Quoting [EMAIL PROTECTED]:


Hi, Struts veterans

I have a general question about using expression in Struts tags. The Struts
html tag API tells that the "property" property of  tag is (RT
EXPR), that is run time expression allowed. But when I use 
 it does not work. What is the
correct way of using run time expression in Struts html tags ? Am I missing
something such as some jar file ?

Thanks a lot in advance

Zaili




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