Re: session taglib

2003-12-05 Thread Scott Reisdorf
You are using a Tag Lib within a Scriptlet.
You can assign the variable using the scriplet by the following:
%
String username = (String) session.getAttribute(userName);
%
hope that helps.
-scott
At 02:40 PM 12/5/2003 +0100, you wrote:
In the Jsp i have:

sess:attribute name=userName/

witch prints the username. Now i want something like:

%

String username= sess:attribute name=userName/;

%

but that doesn't work. How can i assign the session variable to the String 
username ?

Thanks !


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


Re: PrePopulation of FormBean Values

2003-01-06 Thread Scott Reisdorf
Well what if you have this scenario.
You have a form that a user enters in data.
The form then calls the action associated to it.
In that action, you want to populate another object/bean with data so it 
can be displayed on the forwarded jsp page.

With this case the Form that is being passed into the Action will be 
different than the form bean you wish to populate.  Because of this you 
need to construct the new form object and populate it in the request dont you?

-scott


At 08:59 AM 1/6/2003 -0800, you wrote:
A better way is to create a loadObjectAction with
your form.  Invoke the action, and populate the
form, which is passed to your action, fill the form  and
forward it to your jsp page to display.

The is no need to construct the form object and
stick it back to the request.

-Dan

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 8:08 AM
Subject: RE: PrePopulation of FormBean Values


 I do it this way

 In your action class, instantiate a new ActionForm, populate values, and
 then request.set(yourformbeanname in struts conf xml, yourinstance).

 Regards,


 PQ

 This Guy Thinks He Knows Everything
 This Guy Thinks He Knows What He Is Doing

 -Original Message-
 From: ashokd [mailto:[EMAIL PROTECTED]]
 Sent: May 2, 2002 6:23 AM
 To: Struts Users Mailing List
 Subject: PrePopulation of FormBean Values

 Hi,

 How to propopulate the Form values in a Form (which is using the Struts
 FormBean)

 The scope of the FormBean is request.

 Please provide an example on this.

 Thanks in Advance,
 Ashok.D


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


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




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




Question about using multiple struts-config.xml files

2003-01-06 Thread Scott Reisdorf
I am trying to get my application working using multiple struts-config.xml 
files and I am having problems.
I have a few questions regarding setting an application to use multiple 
config files.

This is my current setup
in my web.xml file i declare my config files like below:
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-nameconfig/search/param-name
  param-value/WEB-INF/struts-config-search.xml/param-value
/init-param

My question is this, now because i have my second config file mapped to the 
name config/search, do my actions in my struts-config-search.xml 
file  need to start with /search/actionName, or will struts automatically 
load both configuration files, and thus if the names are unique between the 
2 config files, it will know what file to call?  If the latter is true, 
then what is the purpose behind naming the configuration config/search/


-scott



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



commons-*.jar file Version numbers within Struts Beta 3 Release?

2003-01-02 Thread Scott Reisdorf
I was wondering if anyone knows the version numbers associated with the 
commons-*.jar files that are packaged within the new Struts Beta 3 release?
If you do have the version number to any of the jar files listed below, it 
is much appreciated.

commons-beanutils.jar
commons-collections.jar
commons-dbcp.jar
commons-digester.jar
commons-lang.jar
commons-logging.jar
commons-fileupload.jar
commons-pool.jar
commons-resources.jar
commons-validator.jar


thanks,

-scott


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



Struts Validator printing out starting JavaScript Tag Problem

2002-12-20 Thread Scott Reisdorf
Hi All,
I am having problems using the Struts Validator Plugin and getting it to 
print out the starting JavaScript Tag - Script Language=Javascript
For some reason, if i don't specify the field as depends=required in my 
validation.xml file,  it does not print the start of my Javascript tag 
Script Language=Javascript ;however, when i do add the required as a 
dependency, it works just fine... any solutions for this?

-scott


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



Re: Struts Validator printing out starting JavaScript Tag Problem

2002-12-20 Thread Scott Reisdorf
Nevermind I got it to work.
i had my validation.xml file properties wrong.
Sorry.


At 08:30 AM 12/20/2002 -0800, you wrote:

Hi All,
I am having problems using the Struts Validator Plugin and getting it to 
print out the starting JavaScript Tag - Script Language=Javascript
For some reason, if i don't specify the field as depends=required in my 
validation.xml file,  it does not print the start of my Javascript tag 
Script Language=Javascript ;however, when i do add the required as a 
dependency, it works just fine... any solutions for this?

-scott


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



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




Re: Multiple submit buttons

2002-12-16 Thread Scott Reisdorf
You are rightuse the LookDispatchAction
you just need something like the followingm, where the mapping parameters 
represent the .properties file attributes.

your jsp will look like the following:

html:submit property=action
bean:message key=button.lookupAmazonAuthor/
/html:submit

html:submit property=action
bean:message key=button.lookupAmazonKeyword/
/html:submit

Your Java Class will look like the following:

public class BookLookupDispatchAction extends LookupDispatchAction {


  protected Map getKeyMethodMap() {
Map map = new HashMap();
map.put(button.lookupAmazonAsin, lookupAmazonBookByAsin );
map.put(button.lookupAmazonKeyword, lookupAmazonBookByKeyword );
map.put(button.lookupAmazonAuthor,lookupAmazonBookByAuthor);
return map;
  }

  public ActionForward lookupAmazonBookByAsin(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
  ...
}

 public ActionForward lookupAmazonBookByKeyword(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

 



etc...

Hope this helps.


At 05:34 PM 12/16/2002 +0100, you wrote:

I know that this topic with already evoked in the preceding
messages, but I have evil to make a synthesis.
When a form has several buttons submit (save, update, delete,
cancel, create ...) to perform the action, but
what it is the best method?
1) input type = submit name= update_submit value=bean:message

in the action class
if (pRequest.getParameter(update_submit)!=null){
}else ...
2) use the LookDispatchAction
(http://www.husted.com/struts/tips/003.html)
3) JavaScript with hidden field
I tend to think that the best method is the second is really the
case?
To use  LookDispatchAction I must create a subclass that extends
LookDispatchAction, isn't it ?
Are there disadvantages to use LookDispatchAction ?








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





Re: html:errors location

2002-12-13 Thread Scott Reisdorf
To place the error beside the text field, you explicitly call it next to 
each field.
In your case, simply do this:

html:text property=username /nbsp;html:errors property=username /
br
html:password property=password /nbsp;html:errors property=password /

Hope this helps,

-scott


At 06:52 PM 12/13/2002 -0500, you wrote:

Hi,

According to the TIP  Don't settle for html:error/  at 
http://husted.com/struts/tips/index.html,
from Ted Husted I can add  an error  by the side of the property 
that caused it.

something like this:
To specify that this message is for the username 
property, we would code this instead:

errors.add(
  username, new ActionError(error.username.required));

If we specify a property, we can use the html:errors/ 
tag (or any of the alternatives) like this:

PUsername: html:text property=username//P
PPassword: html:password property=password//P

I Did exactly this. Unfortunately, the error does not appear by 
the side of the input. But,
It appears at page top when I use the html:errors/  tag.

What should I do to put it by the side of an input (html:text 
property/)?


Thanks in advance.
Joao,


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




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




Questions about Struts and BC4J

2002-11-14 Thread Scott Reisdorf
Hi,
I am using JDeveloper 9.03 and BC4J to build an application.
I notice JDeveloper has wizards that will use an existing BC4J Module and 
build the templates and code for a Struts based application.
I was wondering if anyone here has used JDeveloper and BC4J to build a 
Struts Application, and if so, what are your thoughts on the code generated 
by the BC4J wizards.

Thanks,

-Scott Reisdorf


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org