extending the Struts custom tags

2002-02-10 Thread Mike D

we have developed a framework on our project which dynamically writes out 
correct tags on the page, including value data and properties. For example:

xx:cmp name=person property=name could either write out an anchor tag 
or just the value of the person's name property - depending on permissions 
set for the current user. The tag property name person is the name of the 
person bean in the request.

I can't figure out how to couple this with struts ActionForms. 

I can see these 2 possible solutions:

1. Extend the Struts custom tags to incorporate our component-security model
2. Add Struts functionality to our custom tags to work with ActionForms

I would be really greatful for any ideas or suggestions.

Mike

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




Re: extending the Struts custom tags

2002-02-10 Thread Mike D

(Ted)

Well, the main features I'm after is the MVC model: i.e. the Controller with 
it's action mappings, the Actions and the Form handling. I really like how 
the ActionForms create a nice request handling and user entry model. The 
validate() method, the custom tags that populate with data if you have the 
form in the Request, etc.

I guess we could extend the controller (if that's the right class) so that it 
would automatically populate our beans rather than the ActionForms... what do 
you think?

How does the populating the ActionForm from the request data after the post 
work?

Many thanks in advance!

Mike


On Sunday 10 February 2002 11:23 am, you wrote:
 The ActionForms are just JavaBeans, stored in the session or request,
 like any other.

 What Struts functionality would you need to add to your tags?

 -- Ted Husted, Husted dot Com, Fairport NY USA.
 -- Java Web Development with Struts.
 -- Tel +1 585 737-3463.
 -- Web http://www.husted.com/struts/

 Mike D wrote:
  we have developed a framework on our project which dynamically writes out
  correct tags on the page, including value data and properties. For
  example:
 
  xx:cmp name=person property=name could either write out an anchor
  tag or just the value of the person's name property - depending on
  permissions set for the current user. The tag property name person is
  the name of the person bean in the request.
 
  I can't figure out how to couple this with struts ActionForms.
 
  I can see these 2 possible solutions:
 
  1. Extend the Struts custom tags to incorporate our component-security
  model 2. Add Struts functionality to our custom tags to work with
  ActionForms
 
  I would be really greatful for any ideas or suggestions.
 
  Mike
 
  --
  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]




Struts, i18n databases

2001-08-10 Thread Mike D


I'm also curious as to how it easy it is to replace/extend (whatever you 
think is the better approach) the framework to allow it to pull i18n stuff 
out of a database... What layer/level would be the most sensible place to 
implement this? Does anyone know a project where this has been done?


From: Ted Husted [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Struts  Internationalization
Date: Thu, 09 Aug 2001 16:49:19 -0400

The best place to ask a questoin like this is Struts-USER where there
are more people to help you, so i'll copy them in on a brief reply ;-)

The Application Resources files can be named after the locales in the
usual way, and then the appropriate locale is automatically selected for
each user, based on a locale attribute in their session.

Rajan Gupta wrote:
 
  I believe that Application Resource file is used for getting 
internalized
  messages for text to be displayed on the screen. How do we specify
  different application resources depending upon locale to be picked up. 
Can
  we specify multiple application resources for ActionServlet init.
  I believe the answer is in MessageTag but do not know how to use the
  international feature the way it is intended to be used.
 
  Can somebody throw in some pointers to any documents?
 
  Thanks
  Rajan
 
  __
  Do You Yahoo!?
  Make international calls for as low as $.04/minute with Yahoo! Messenger
  http://phonecard.yahoo.com/


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




data beans and ActionForm

2001-08-09 Thread Mike D

if I have a separate data bean, which is a property in the ActionForm, how 
do I initialise that bean? I.e.:

ActionForm someActFrm {

  private SomeBean someBean = null;

  public SomeBean getSomeBean () {
...
  }
  public void setSomeBean (SomeBean someBean) {
this.someBean = someBean;
  }
  public void setName(String someString) {
someBean.setName(someString);
  }
}

how and where do I create an instance of the bean, so that I have a bean in 
the form, rather than it being null all the time...

Will be greatful for any help!

Mike

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp