I18n and Oracle Database fails

2002-11-09 Thread Mr Alireza Fattahi
Hi,

I did a lot about i18n but I still have problem. I do
every thing that was said in :
http://www.anassina.com/struts/i18n/i18n.html

Every thing works fine. Now in my action form I read
the form inputs and want to insert the data into
Oracle
tables. The data will be inserted in wrong encoding. 

I did the below test:
I entered a Farsi string with 2 charcters in my form.
After submit, In the action form, 
when I print the length of this charcter I get 2. But
shouldn't I get 4 as character length, because it is
all unicode.

Should I say oracle that I am inserting unicode? How?


__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Where should we change dispatch

2002-11-09 Thread Mr Alireza Fattahi
hi, 

we have a form that has more than one action. The
actions of the form 
could are changed depending on previous action.
Actually there is a state diagram
between actions. For example if A,B,C are actions
then:
A-- B -- C

Now where we can change the action ( dispatch
parameter)? 
There are two solutions:

1) change dispath in action form

  DynaActionForm dynaForm = (DynaActionForm) form; 
  dynaForm.set(dispatch,A);

2) put logic.equlas tags in jsp and change the dispath
hidden form 

 logic:equal parameter=dispatch value=A 
   html:hidden property=dispathc value=B /
 /logic:equal

Which one is better

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




initiate an object and put it in session

2002-11-05 Thread Mr Alireza Fattahi
Hi,

I want to initiate put an object and put it in the
session when each session begins.
 
Where should i put this code?

I tried to write a sevlet that starts at the starup of
the system, but I do not have access to session object
in its 'init' method.

Thanks


__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Re: Manually call strust validation

2002-11-03 Thread Mr Alireza Fattahi
Thanks, but i get Nullpointer exception, Can you
please help me with more details.

This is my code:
ValidatorActionForm vl = new ValidatorActionForm();
ActionErrors err = new ActionErrors();
err  = vl.validate ( mapping, request );

Is above correct should my action calss extend
ValidatorActionForm?


__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Re: Manually call strust validation

2002-11-03 Thread Mr Alireza Fattahi
I got the answer!

Here is code

DynaActionForm dy = (DynaActionForm) form;
ActionErrors err  = new ActionErrors();
err = dy.validate(mapping,request)

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Manually call strust validation

2002-11-02 Thread Mr Alireza Fattahi
Hi,
I am using validitor feature. I have turn the
validation OFF on struts_config.xml. How can I
manually do the validation on my action class by
calling validitor objects. 

Thanks.
P.S: I want validate my form, not before the action is
executed but after I have done some logics.

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Dynamic form and Upload

2002-11-01 Thread Mr Alireza Fattahi
Hi,
I want to use struts dynamic form feature. 
There is form which has an upload file filed and some
input text. I used below in struts_config.xml


 form-bean
  name=TenderVwcredForm
  dynamic=true
 
type=org.apache.struts.validator.DynaValidatorForm
  form-property name=tenderTitle 
type=java.lang.String/
  form-property name=productName 
type=java.lang.String/
  form-property name=tenderFile  
type=org.apache.struts.upload.FormFile/
  /form-bean



But I got the classcast exception:

error BeanUtils.populate
org.apache.commons.beanutils.ConversionException:
Cannot assign value of type 'java.lang.String' to 
property 'tenderFile' of type
'org.apache.struts.upload.F
ormFile'


Please help.

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Re: Dynamic form and Upload

2002-11-01 Thread Mr Alireza Fattahi
Thanks for your reply,
I have seen the example and an work with it, But my
problem is I can not do that in an dynamic form. How
should I do it in dynamic form, and what should I put
in struts.config.xml?
As I told I got the class cast expetion.

Thanks

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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