Re: JSTL String concatenation

2004-09-20 Thread Adrian Kamiski
 c:forEach var=sound items=${Sounds} varStatus=status
   tr
 tda href= XX c:out value=${sound.fileName}//a/td
   /tr
 /c:forEach
 
 where XX is the problem bit.  I want to concatenate / + path +
 ${sound.fileName} so that the href gets the full path and but only the
 filename is displayed.
Hi,
Please look at this article maybe it helps you some way:
http://www.samspublishing.com/articles/article.asp?p=31341seqNum=3
or http://www.manning-sandbox.com/thread.jspa?threadID=365tstart=1

Regards,
Adrian

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



Re: DynaActionForm and previous request attributes (no answer found in archives for similar problems)

2004-09-17 Thread Adrian Kamiski
 managing a request attribute in the session by setting it and then making sure we 
 pop it out at the view is messing and defies the semantic use of the request scope.
 
 that's why it is bad practice.
 
Don't shoot me if I'm wrong but HTTP is stateless so without any of:
cookie, session, browser politeness (HTTP referer), hidden field with
url, server won't be know where you come from (and in request scope
you will won't have any information where user was before clicking
Submit) ...

Regards,
Adrian

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



Page with two forms and different sets of errors

2004-09-14 Thread Adrian Kamiski
Hi,
I have two forms on one page:

form-bean name=registerForm
type=org.apache.struts.validator.DynaValidatorForm
  form-property name=login type=java.lang.String/
  form-property name=pass type=java.lang.String/
  form-property name=passc type=java.lang.String/
  form-property name=real_name type=java.lang.String/
  form-property name=real_addr type=java.lang.String/
  form-property name=email type=java.lang.String/
/form-bean
form-bean name=loginForm
type=org.apache.struts.validator.DynaValidatorForm
  form-property name=login type=java.lang.String/
  form-property name=pass type=java.lang.String/
/form-bean

First form is the regular registration form, second is small login
form in the corner of the page.
I want to display errors for each form in different places on the page
(for first form above it, and for second below form in corner).
I'm using basic validators provided by Struts:
form name=registerForm
field property=login depends=required,minlength
msg name=minlength key=registerForm.login.msg/
arg0 key=registerForm.login.displayname/
arg1 name=minlength key=${var:minlength} resource=false 
/
var
var-nameminlength/var-name
var-value3/var-value
/var
/field
field property=pass depends=required,minlength
arg0 key=registerForm.pass.displayname/
arg1 name=minlength key=${var:minlength} 
resource=false /
var
var-nameminlength/var-name
var-value6/var-value
/var
/field
field property=email depends=required,email
arg0 key=registerForm.email.displayname/
/field
/form

For displaying errors I'm using now:

logic:messagesPresent
bean:message key=errors.header/
ul
html:messages id=error
libean:write name=error//li
/html:messages
/ul
hr /
/logic:messagesPresent

I had read that the attribute property of tag messages is Name of
the property for which messages should be displayed. If not specified,
all messages (regardless of property) are displayed., but how can I
set property used by html:messages / in case of using
DynaValidatorForm?
(http://struts.apache.org/userGuide/struts-html.html#messages)

Very similar problem to main was described here:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg76488.html
- but I don't know if this is right solution when one want to use
DynaValidatorForm I mean:
I don't know how can I define:
String property=FormOne;
ActionErrors errors = ...;
ActionError error = ...;
errors.add(property, error);
when I'm using DynaValidatorForm.

I hope I write it clear ... thx in advance for any tips
Best Regards,
Adrian.

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