Re: Array of Bean and optionsCollection (up)

2007-04-11 Thread Romu

At first sight, u miss the name of the collection in 
html:optionsCollection property=aBean value=code
label=descr/


second u forgot the dot in myBeanCode , it's myBean.code , Struts will do
myBean.getCode().

third : your form property aBean is an array  u use a select ( which a
single property)

not clear but i could have understood wrong .

Good luck




2007/4/11, Marcello Savino [EMAIL PROTECTED]:


Please excuse me but i try again ... (hope will never die)

Hi all, i've the following problem using the tag
html:optionsCollection, the jsp give the following error:
org.apache.jasper.JasperException: No bean specified

Let's say this is my code (actionForm, jsp, bean class)

public class MyForm extends ActionForm {
private myBean[] arrayOfMyBean;
public void reset(ActionMapping mapping, HttpServletRequest
request){
arrayOfMyBean=someClass.getMyBeanArray();
request.setAttribute(aBean, arrayOfMyBean);
super.reset( mapping,  request);
}
public myBean[] getABean(return arrayOfMyBean); // i forgot this
on my previous post, not on my code!
}
__

The jsp:

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:xhtml
/ html:html locale=true body html:form action=/MyAction
html:select property=myBeanCode 
html:optionsCollection property=aBean value=code
label=descr/
/html:select
/html:form
/body
/html:html


myBean Class:

public class myBean implements java.io.Serializable{
private Integer code;
private String descr;

public Integer getCode(){return code;}
public String getDescr(){return descr;}

public void setCode(Integer val){ code=val;}
public void setDescr(String val){ descr=val;} }

_


Could anyone help me?
Any help will be greatly appreciated.
Thanks in advance
Marcello

-
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: [OT][JAVA] suing synchronized block

2007-03-20 Thread Romu

http://www-128.ibm.com/developerworks/library/j-dcl.html


if u use jdk1.5 , it's the second time i read that volatile is a good
solution .





2007/3/20, Christopher Schultz [EMAIL PROTECTED]:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

Please note that this is a mailing list for users of the Struts web
application framework. Your question is more appropriate elsewhere.

That being said, we tend to know a lot about Java...

temp temp wrote:
 I am using a synchronized block and need help using it.

 I have a singleton class which has a global variable Map. I will
 updating this Map at runtime.

I assume that you mean that you have a singleton which contains a map.
The map itself is not global... the fact that the class is a singleton
allows you to treat it as if it is a global variable.

   Example
   synchronized (fActionHandlers) {
   fActionHandlers.put(
   vAction.getClassName(),
   vConfigAction);
   }

 I want this update to be synchronized. The above code is this right?

That depends. Is fActionHandlers the map you want to protect? If so,
then your code is correct. Another option is to use a Map that is
already synchronized (such as a Hashtable) or add synchronization to
your Map using java.util.Collections.synchronizedMap.

 My assumption about this is JVM will allow only one thread at a time
 to execute the code in the synchronized block is this right ?

The JVM will only allow one thread to execute that code /for the object
used as the monitor/ -- that is, as long as fActionHandlers is always
a reference to the the same object.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGAAi69CaO5/Lv0PARAhoiAKCKqA1tI9lAjaDHnIlNy6M5wSbakgCgwFRB
46yOi9fT3L0/jaN1Sn79UM0=
=huj5
-END PGP SIGNATURE-

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




Re: [S2] guice plugin - ROCKS!

2007-03-12 Thread Romu

Should be a bomb on Spring forum .

readed the wiki etc , it reminded me the Gwt vs dojo .



2007/3/12, Ron Chan [EMAIL PROTECTED]:



Guice is used as the internal IOC within struts2 but that is recommended
for
use in applications
But there is now a plugin which will use an external version of guice to
do
your depency injection

http://docs.google.com/Doc?id=dd2fhx4z_5df5hw8

I just converted a mini app over the weekend from using spring to guice
and
first impressions is that it ROCKS!

Using the same set of managers and daos,
- the app now starts up twice as fast
- using mvn jetty:run, recompiling and restarting the app no longer give
me
memory problems
- I loose all the application-*.xml files and together with codebehind and
zero conf the number of xml files are drastically reduced

SWEET


--
View this message in context:
http://www.nabble.com/-S2--guice-plugin---ROCKS%21-tf3388853.html#a9432699
Sent from the Struts - User mailing list archive at Nabble.com.


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




Re: [FRIDAY] WebDev Pushmi-Pullyu

2007-03-10 Thread Romu

respect for the http://www.ghettojava.com/blog/default/ .



2007/3/9, Ted Husted [EMAIL PROTECTED]:


On 3/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 There is also much confusion across the board regarding WW and S2.  Are
they
 the same?  Is support dead for S1?  Unless you have had your nose
pressed up
 to the incubator for the past year, It really is confusing.

Is there something that we didn't cover here?

* http://struts.apache.org/roadmap.html


 What about publishing a Cook Book or bolster up the guides and tutorials
to
 reveal more than snippets of experimental code.  What about a book on
the
 framework?  I love the motivation behind this effort, but I actually
wonder
 if S2 was released prematurely.

I think we'd all love to see things like that, but we need volunteers
to step up and do the work. AFAIK, all of the committers work fulltime
elsewhere during the day, and we give to open source what we can,
after hours, on our own dime.

If anyone would like to join in the fun, the best place to start is
the How to Help FAQ.

* http://struts.apache.org/helping.html

-Ted.

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




Re: html:button

2007-02-27 Thread Romu

html:button property=ok value=Ok onclick=validateSomething() /

n


2007/2/26, Michael Jouravlev [EMAIL PROTECTED]:


I have no idea, but does it work without Javascript assigned to the
button?

On 2/25/07, Strachan, Paul [EMAIL PROTECTED] wrote:
 Hi,

 I realise this is probably not a struts problem and I feel a bit silly
posting this question but here goes:

 I'm using html:button with EventDispatchAction but my button properties
do not appear in the request - the html source fragment goes something like:

 script type=text/javascript
   function doEdit(id) {
 document.TeachingMethodForm.teachingMethodId.value=id;
 document.TeachingMethodForm.submit();
   }
 /script
 form name=TeachingMethodForm method=post
action=/eat3/admin/teachingMethods.do
   input type=hidden name=applicationId value=486
   input type=hidden name=teachingMethodId value=
 ...
  td
input type=button name=edit value=Edit
onclick=javascript:doEdit('100');
  /td
 ...
 /form

 Using Firefox the request header looks like:

 http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
 POST /eat3/admin/teachingMethods.do HTTP/1.1
 Host: xxx.xxx.43.6:8988
 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2)
Gecko/20070219 Firefox/2.0.0.2
 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
 Accept-Language: en-us,en;q=0.5
 Accept-Encoding: gzip,deflate
 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
 Keep-Alive: 300
 Proxy-Connection: keep-alive
 Referer: http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
 Cookie: JSESSIONID=996b2b06231c8176feb489f64b56816acb4b73a11148
 Content-Type: application/x-www-form-urlencoded
 Content-Length: 144
 applicationId=486teachingMethodId=100
 HTTP/1.x 200 OK
 Transfer-Encoding: chunked
 Date: Mon, 26 Feb 2007 07:40:07 GMT
 Content-Type: text/html;charset=windows-1252
 Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
 Content-Location:
http://xxx.xxx.43.6:8988/eat3/WEB-INF/jsps/set_layout/layout.jsp
 Via: 1.1 ugcpx03 (NetCache NetApp/6.0.5)

 I am expecting to see edit=Edit in the request and I dont understand
why its not there.  This is contrary to the taglib documentation.

 Any hints?

 Thanks,
 Paul

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




Re: html:button

2007-02-27 Thread Romu

try with html tag may be ?

html:button property=ok value=Ok onclick=validateSomething() /





2007/2/27, Romu [EMAIL PROTECTED]:


html:button property=ok value=Ok onclick=validateSomething() /




2007/2/26, Michael Jouravlev [EMAIL PROTECTED]:

 I have no idea, but does it work without Javascript assigned to the
 button?

 On 2/25/07, Strachan, Paul [EMAIL PROTECTED] wrote:
  Hi,
 
  I realise this is probably not a struts problem and I feel a bit silly
 posting this question but here goes:
 
  I'm using html:button with EventDispatchAction but my button
 properties do not appear in the request - the html source fragment goes
 something like:
 
  script type=text/javascript
function doEdit(id) {
  document.TeachingMethodForm.teachingMethodId.value=id;
  document.TeachingMethodForm.submit();
}
  /script
  form name=TeachingMethodForm method=post
 action=/eat3/admin/teachingMethods.do
input type=hidden name=applicationId value=486
input type=hidden name=teachingMethodId value=
  ...
   td
 input type=button name=edit value=Edit
 onclick=javascript:doEdit('100');
   /td
  ...
  /form
 
  Using Firefox the request header looks like:
 
  http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
  POST /eat3/admin/teachingMethods.do HTTP/1.1
  Host: xxx.xxx.43.6:8988
  User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2)
 Gecko/20070219 Firefox/2.0.0.2
  Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
 ,text/plain;q=0.8,image/png,*/*;q=0.5
  Accept-Language: en-us,en;q=0.5
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q= 0.7,*;q=0.7
  Keep-Alive: 300
  Proxy-Connection: keep-alive
  Referer: http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
  Cookie: JSESSIONID=996b2b06231c8176feb489f64b56816acb4b73a11148
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 144
  applicationId=486teachingMethodId=100
  HTTP/1.x 200 OK
  Transfer-Encoding: chunked
  Date: Mon, 26 Feb 2007 07:40:07 GMT
  Content-Type: text/html;charset=windows-1252
  Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
  Content-Location:
 http://xxx.xxx.43.6:8988/eat3/WEB-INF/jsps/set_layout/layout.jsp
  Via: 1.1 ugcpx03 (NetCache NetApp/6.0.5)
 
  I am expecting to see edit=Edit in the request and I dont understand
 why its not there.  This is contrary to the taglib documentation.
 
  Any hints?
 
  Thanks,
  Paul

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





Re: html:button

2007-02-26 Thread Romu

the name of your form is not correct :

TeachingMethodForm -- should be teachingMethodForm.

it could be annoying.

could u post the place ( struts-config) where u declare your form?
form-bean
   name=teachingMethodForm
   type=packagename etc.TeachingMethodForm
   /



2007/2/26, Strachan, Paul [EMAIL PROTECTED]:


Hi,

I realise this is probably not a struts problem and I feel a bit silly
posting this question but here goes:

I'm using html:button with EventDispatchAction but my button properties do
not appear in the request - the html source fragment goes something like:

script type=text/javascript
  function doEdit(id) {
document.TeachingMethodForm.teachingMethodId.value=id;
document.TeachingMethodForm.submit();
  }
/script
form name=TeachingMethodForm method=post
action=/eat3/admin/teachingMethods.do
  input type=hidden name=applicationId value=486
  input type=hidden name=teachingMethodId value=
...
td
   input type=button name=edit value=Edit
onclick=javascript:doEdit('100');
/td
...
/form

Using Firefox the request header looks like:

http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
POST /eat3/admin/teachingMethods.do HTTP/1.1
Host: xxx.xxx.43.6:8988
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2)
Gecko/20070219 Firefox/2.0.0.2
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
Cookie: JSESSIONID=996b2b06231c8176feb489f64b56816acb4b73a11148
Content-Type: application/x-www-form-urlencoded
Content-Length: 144
applicationId=486teachingMethodId=100
HTTP/1.x 200 OK
Transfer-Encoding: chunked
Date: Mon, 26 Feb 2007 07:40:07 GMT
Content-Type: text/html;charset=windows-1252
Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
Content-Location:
http://xxx.xxx.43.6:8988/eat3/WEB-INF/jsps/set_layout/layout.jsp
Via: 1.1 ugcpx03 (NetCache NetApp/6.0.5)

I am expecting to see edit=Edit in the request and I dont understand why
its not there.  This is contrary to the taglib documentation.

Any hints?

Thanks,
Paul



**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

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




Re: [S2] doubt working with dates in brazilian format (dd/MM/yyyy)

2007-02-26 Thread Romu

if u got a form ( and any data) of type Date( java.util) then u can use:

1. bean:write name=myForm property=dateCreation format=dd/MM//

2. i guess it works as well with html:text ..

the solution 1 is working , it's extracted from one jsp i made 1 week ago :)

for the validation, well it should be in validation.xml (or u can code the
java script)


good luck

2007/2/25, Wesslan [EMAIL PROTECTED]:


I really like -MM-DD because that's the way we always write dates in
Sweden... :)

-Original Message-
From: Stefan [mailto:[EMAIL PROTECTED]
Sent: den 24 februari 2007 22:40
To: Struts Users Mailing List
Subject: Re: [S2] doubt working with dates in brazilian format
(dd/MM/)

Daniel Amadei schrieb:
 Hi All,

 I'm working with dates but I'm not able to convert dates to be
 displayed automatically using the brazilian format (e. g. dd/MM/).
 Also I'd like to know how to validate my dates using this format and
 not the standard.

 If somebody could point me to the docs where I can find some info
 about those 2 items it would be great!

 BTW: I`m not using the datetimepicker.

 Thanks,
 Daniel

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


Hi Daniel,

not exactly what you asked. Just as an idea/opinion about international
date
formats:
http://www.w3.org/QA/Tips/iso-date

Regards
Stefan

--

Stefan Riegel
TELIG GmbH



-
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: [BEER] As Bugs Bunny would say, What a maroon.

2007-02-20 Thread Romu

speaking to

2007/2/15, Ted Husted [EMAIL PROTECTED]:


http://www.apple.com/getamac/

... As seen on Comedy Central.

-Ted.

On 2/15/07, Greg Reddin [EMAIL PROTECTED] wrote:
 I didn't see the Mac ad, but I saw several others.  I guess they never
 rolled around to it, probably because I'm on a Mac.

 Greg

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




Re: [OT] Did JIRA copy from LucasArts?

2006-12-04 Thread Romu

similar but one has a crown  the other plays with balls :)



2006/12/4, Antonio Petrelli [EMAIL PROTECTED]:


It is strange how JIRA logo is very similar to LucasArts' one.

http://www.atlassian.com/software/jira/
http://www.lucasarts.com/

Ciao
Antonio

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




Re: Struts considering exceptions in Action class .execute() as unhandled

2006-11-26 Thread Romu

try without exception  see if the goto_graceful_error_page works properly
?




2006/11/26, Ted Husted [EMAIL PROTECTED]:


As explained, the code doesn't make any sense to me. An Action is a
Java class, and it can't violate the rules of Java. The rules say that
an Exception thrown in a try block is handled by the closest catch
block. There's nothing Struts can do about that.

Though, Struts does have a declarative exception handling feature that
will branch to a graceful error page without embedding a try/catch
in every Action.

*
http://struts.apache.org/1.x/userGuide/building_controller.html#exception_handler

-Ted.

On 11/24/06, Mon Cab [EMAIL PROTECTED] wrote:

 I have an action class with an execute method as follows


 public ActionForward execute(   ActionMapping mapping,
 ActionForm form,
 HttpServletRequest req,
 HttpServletResponse res
 )
 throws Exception
 {

 try
 {
  Do something innocuous;
  Foo foo = new FooWhichThrowsAnExceptionInConstructor();
 }

 catch (Exception e)
 {
  mapping.findForward(goto_graceful_error_page);
 }

   }

 But instead of going to the graceful error page the user gets the HTTP
 Status 500 - page and I see the following in the error log.

 org.apache.struts.action.RequestProcessor - Unhandled Exception thrown:
 class java.lang.Exception

 I put debug println's around the code and found that execution stopped
 immediately at the call to the foo constructor, and the catch block was
 never entered.

 I am not doing anything outside of the try block.  Is this behaviour
 standard in struts?  Shouldn't I be going to my graceful error page?
 Can anyone shed any light on this?

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




Re: [Struts 2] execute() method not firing in Action

2006-11-07 Thread Romu

it might be in your jsp , in the tag  html:form action=/XXX

with XXX is the name of your action

if struts controller dont find the action an error will pop up .





2006/11/7, Mark Menard [EMAIL PROTECTED]:


On 11/7/06 9:07 AM, Wesley Wannemacher [EMAIL PROTECTED] wrote:

 [question]
 Below, I have copy/pasted the Source for the Action as well as my
 struts.xml file (actually another file that is included from the
 struts.xml file). Are there any glaring errors that I am simply missing?
 [/question]

Hi Wesley,

I'm by no means a Struts 2 expert, but here's my guess. I've never used
the
! notation for actions. Take a look at this page:
http://cwiki.apache.org/WW/action-configuration.html and be sure that you
have it properly configured. I think the s2 path going forward is to
remove
support for the ! notation.

Take care,

Mark

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




Re: Starting validation

2006-11-07 Thread Romu

validations are linked to xml files:

action
   path=/XXX
   name=yourForm
   scope=session
   validate=false
type=yyyAction
   forward name=succees path=/WEB-INF/jsp/success.jsp/

   /action

with name tag, struts will look in validation.xml files to see the rules etc
, and it wil generates the javascript .

check if u got javascript validation code  in your jsp  ?





2006/11/7, Thom Burnett [EMAIL PROTECTED]:


What are common simple mistakes that would prevent validation from
occuring?
I've got a simple struts application that runs correctly except that
validation doesn't occur. The form info is accepted as correct when
required
information is missing.

I'm trying to figure out what's missing from my setup or understanding.

The ValidatorForm (my extension) class has appropriate get and set
functions
for all fields.
(The fields are spread over 3 jsp pages, if that matters.)
I've added the validator plugin to the struts-config, the action mapping
has
validate=true and a valid input path,  added the validation-rules and
validation.xml file, added the resource properties file with the standard
errors (taken from the struts file).

If I write my own validate method in the form bean that validation works
properly. It's my understanding that if I'm using the validation
framework,
I should not have a validate() method in the form.

Am I misunderstanding something? Any ideas what might be setup wrong or
missing.




Re: plz unsubscribe me

2006-10-05 Thread Romu

aye or lots of people starting to hate Struts ? :)



2006/10/5, Antonio Petrelli [EMAIL PROTECTED]:


BABJIVALI SHAIK ha scritto:



It must be a virus :-D

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




Re: Abdel est en vacance!

2006-08-28 Thread Romu

bon ben bonnes vacances  !

Le 28/08/06, [EMAIL PROTECTED] [EMAIL PROTECTED] a écrit :



Je serai absent(e) du  28/08/2006 au 11/09/2006.

Je suis absent pour le moment, et je répondrai à votre message dès mon
retour.
merci



**
La présente communication (et tout fichier rattaché) s'adresse uniquement
au(x) destinataire(s) précité(s) et ne peut être autrement distribuée,
copiée ou utilisée.  Le contenu de cette communication peut être assujetti
au privilège du secret professionnel.  Tout droit à ce privilège est
expressément revendiqué et nullement abandonné.  Si vous avez reçu cette
communication par erreur, veuillez nous en avertir immédiatement en
répondant à ce courriel ou en nous appelant.  Veuillez également effacer
cette communication (et tout fichier rattaché) sans en conserver une
copie.
Merci.

***

This communication (and any attachments) is directed in confidence to the
addressee(s) listed above, and may not otherwise be distributed, copied or
used.  The contents of this communication may also be subject to
lawyer-client privilege, and all rights to that privilege are expressly
claimed and not waived.  If you have received this communication in error,
please notify us by reply e-mail or by telephone and delete this
communication (and any attachments) without making a copy.  Thank you.



problem of the character in validation xml

2006-08-11 Thread Romu

hey

I  list all the characaters accepted in a html:text  balise .

the current list which works is :

constant
   constant-nameenseigneCommerciale/constant-name
   constant-value^[A-Z0-9,/';%?!.()\-\s]*$/constant-value
/constant

the problem is when i want to add the  character .

it says the entity name should be followed by the enity reference .

think it's xml rules .
anyone has tried it yet , i mean to define entity in the validation.xmlfile ?

thanks .


Re: problem of the character in validation xml

2006-08-11 Thread Romu

thanks  it worked .

i have low skills in xml :) though it s look like html .



2006/8/11, [EMAIL PROTECTED] [EMAIL PROTECTED]:






Use amp instead of  in validation.xml file.





 Romu
 [EMAIL PROTECTED]
   To
   Struts Users Mailing List
 08/11/2006 03:53  user@struts.apache.org
 PM cc

   Subject
 Please respond to problem of the  character in
   Struts Users   validation xml
   Mailing List
 [EMAIL PROTECTED]
  he.org







hey

I  list all the characaters accepted in a html:text  balise .

the current list which works is :

constant
constant-nameenseigneCommerciale/constant-name
constant-value^[A-Z0-9,/';%?!.()\-\s]*$/constant-value
/constant

the problem is when i want to add the  character .

it says the entity name should be followed by the enity reference .

think it's xml rules .
anyone has tried it yet , i mean to define entity in the
validation.xmlfile ?

thanks .



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




Re: about javascript

2006-08-11 Thread Romu

did u tried to initialise the form , in constructor ?

class myform extends ... {


private String field1 = ;
private String field2 = ;
private String field3 = ;

}


2006/8/11, [EMAIL PROTECTED] [EMAIL PROTECTED]:



html:file property=theFile /

html:text property=url /

html:submit value=Upload Logo onclick= return
button2();/html:submit

function button2()

{

  var theFile = document.forms[0].elements['theFile'].value;
if( theFile ==   theFile.length = 0)
  {
alert(Please enter the value for the field theFile);
document.forms[0].elements['theFile'].focus();
return false;
  }





Similarly u can write for other two filds

return true;
}

-Original Message-
From: Gomathi [mailto:[EMAIL PROTECTED]
Sent: Friday, August 11, 2006 5:37 PM
To: Struts Users Mailing List
Subject: Re: about javascript

no,
i have three text fields in my one jsp
i want to check these  fields if it is empty using java script client
side validation html:text property=title /

html:file property=theFile /

html:text property=url /

html:submit value=Upload Logo onclick=button2()/html:submit

in button2()

{

how to check this empty fields



}




- Original Message -
From: Krishna, Hari [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, August 11, 2006 5:10 PM
Subject: RE: about javascript


r u going to check for mandatory fields.

 -Original Message-
 From: Gomathi [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 11, 2006 4:45 PM
 To: Struts Users Mailing List
 Subject: about javascript


 hai
 i am working in struts1.1
 i have threee fields in html:text
 how to check these empty fields when submitting the submit button
using
 java script
 its very uergent
 with kindly regards
 gomes
 Notice:  All email and instant messages (including attachments) sent
to
 or from Franklin Templeton Investments (FTI) personnel may be
retained,
 monitored and/or reviewed by FTI and its agents, or authorized
 law enforcement personnel, without further notice or consent.

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



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s) and
may contain proprietary, confidential or privileged information. If you are
not the intended recipient, you should not disseminate, distribute or copy
this e-mail. Please notify the sender immediately and destroy all copies of
this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com

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




Re: Validator not getting called and I can't see why [resolved]

2006-08-07 Thread Romu

U mean a javascript error ?

u need to define  a message.properties file too which will define the error
messa


2006/8/6, Bart Busschots [EMAIL PROTECTED]:


OK, I got all this figured out in the end.

The validator was being called but because of problems with the page
attribute in the form the validator appears to have been receiving a
page value of zero and hence not validating the items on pages 1 or two
because neither 1 nor 2 are less that or equal to zero! When I did get
the validator to be called it still wasn't working right but I got that
fixed too.

Anyhow, I did up a blog post about it which can be found here:
http://www.bartbusschots.ie/blog/?p=262

If people thing an edited version of this would be a useful addition to
the Wiki work away, just credit me or link to the original blog post and
I'll be more than happy.

Cheers for your help guys,

Bart.

Bart Busschots wrote:
 I'm either missing something stupid (which is always possible) or I've
 managed to break the validator. I have an app that uses validator all
 over the place and it's working fine in all my other actions but for
 this one action it is simply not getting called.

 I can't see any difference between this action/form/validation and all
 the other ones that are working.

 This is the form:

  form-bean name=createStudentGroupForm
 type=org.apache.struts.validator.DynaValidatorForm
   form-property name=groupName type=java.lang.String /
   form-property name=noStudents type=java.lang.String /
   form-property name=groupType type=java.lang.String /
   form-property name=wikiText type=java.lang.String /
   form-property name=studentNames type=java.lang.String[] /
  /form-bean

 This is the action:

  action path=/mentor/createStudentGroupStep1
 type=vtie.portal.mentor.CreateStudentGroupPrepareAction
 name=createStudentGroupForm scope=session validate=true
 input=/home/mentor/addStudentGroupForm.jsp
   forward name=createAnonymous
 path=/do/mentor/createAnonymousStudentGroup /
   forward name=getStudentNames
 path=/home/mentor/getStudentNamesForm.jsp /
   forward name=fail path=/home/mentor/addStudentGroupForm.jsp /
  /action

 And this is the validation:

  form name=createStudentGroupForm
   field property=groupName page=1 depends=required, mask
varvar-namemask/var-namevar-value^[a-zA-Z]+[\w\
 ]*$/var-value/var
arg0 key=mentor.createStudentGroup.groupName.label/
   /field
   field property=noStudents page=1 depends=required, integer
arg0 key=mentor.createStudentGroup.noStudents.label/
   /field
   field property=studentNames page=2 depends=required
arg0 key=mentor.createStudentGroup.studentNames.label/
   /field
  /form

 Can anyone see something obviously wrong there?

 Cheers,

 Bart.

 -
 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: Validator not getting called and I can't see why [resolved]

2006-08-07 Thread Romu

for example  :
mentor.createStudentGroup


.groupName.label = the Student Group Name




2006/8/7, Romu [EMAIL PROTECTED]:


U mean a javascript error ?

u need to define  a message.properties file too which will define the
error messa


2006/8/6, Bart Busschots  [EMAIL PROTECTED]:

 OK, I got all this figured out in the end.

 The validator was being called but because of problems with the page
 attribute in the form the validator appears to have been receiving a
 page value of zero and hence not validating the items on pages 1 or two
 because neither 1 nor 2 are less that or equal to zero! When I did get
 the validator to be called it still wasn't working right but I got that
 fixed too.

 Anyhow, I did up a blog post about it which can be found here:
 http://www.bartbusschots.ie/blog/?p=262

 If people thing an edited version of this would be a useful addition to
 the Wiki work away, just credit me or link to the original blog post and
 I'll be more than happy.

 Cheers for your help guys,

 Bart.

 Bart Busschots wrote:
  I'm either missing something stupid (which is always possible) or I've
  managed to break the validator. I have an app that uses validator all
  over the place and it's working fine in all my other actions but for
  this one action it is simply not getting called.
 
  I can't see any difference between this action/form/validation and all
  the other ones that are working.
 
  This is the form:
 
   form-bean name=createStudentGroupForm
  type=org.apache.struts.validator.DynaValidatorForm
form-property name=groupName type=java.lang.String  /
form-property name=noStudents type=java.lang.String /
form-property name=groupType type=java.lang.String /
form-property name=wikiText type= java.lang.String /
form-property name=studentNames type=java.lang.String[] /
   /form-bean
 
  This is the action:
 
   action path=/mentor/createStudentGroupStep1
  type=vtie.portal.mentor.CreateStudentGroupPrepareAction
  name=createStudentGroupForm scope=session validate=true
  input=/home/mentor/addStudentGroupForm.jsp
forward name=createAnonymous
  path=/do/mentor/createAnonymousStudentGroup /
forward name=getStudentNames
  path=/home/mentor/getStudentNamesForm.jsp /
forward name=fail path=/home/mentor/addStudentGroupForm.jsp /
   /action
 
  And this is the validation:
 
   form name=createStudentGroupForm
field property=groupName page=1 depends=required, mask
 varvar-namemask/var-namevar-value^[a-zA-Z]+[\w\
  ]*$/var-value/var
 arg0 key=mentor.createStudentGroup.groupName.label/
/field
field property=noStudents page=1 depends=required, integer
 arg0 key=mentor.createStudentGroup.noStudents.label/
/field
field property=studentNames page=2 depends=required
 arg0 key= mentor.createStudentGroup.studentNames.label/
/field
   /form
 
  Can anyone see something obviously wrong there?
 
  Cheers,
 
  Bart.
 
  -
  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: including action.do in JSP:include

2006-08-07 Thread Romu

your other actions works ? else try refresh on Eclipse if u develp ith
eclipse IDE.


else  do u have declared your taglib in your web.xml , after your servlet
mapping:

web-app
 display-name/display-name

 !-- Standard Action Servlet Configuration (with debugging) --
 servlet
/servlet

 !-- Standard Action Servlet Mapping --
 servlet-mapping
   servlet-nameaction/servlet-name
   url-pattern*.do/url-pattern




   /servlet-mapping
welcome-file-list
   welcome-fileindex2.jsp/welcome-file
 /welcome-file-list
 !-- Struts Tag Library Descriptors --

taglib
   taglib-uri/tags/struts-bean/taglib-uri
   taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib


2006/8/7, Vijay Gupta [EMAIL PROTECTED]:


Michael thanks for the help bu I could not figure out why I am getting
this error when declaring taglib on top of JSP (%@ taglib prefix=c
uri=http://java.sun.com/jsp/jstl/core; %), I have jstl.jar and
standard.jar in WEB-INF/lib folder.



Error 500--Internal Server Error
java.lang.NoClassDefFoundError:
javax/servlet/jsp/jstl/core/ConditionalTagSupport
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericCla
ssLoader.java:480)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoa
der.java:182)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAware
ClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoa
der.java:224)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAware
ClassLoader.java:41)
at
weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1325)
at
weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1269)
at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:292)
at
weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
at
weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5053)
at
weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4891)
at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4737)
at
weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2147)
at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1933)
at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1806)
at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
at weblogic.servlet.jsp.JspParser.parse(JspParser.java:234)
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
at
weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:388)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:238)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:188)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.jav
a:535)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:373)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:463)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:315)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatche
rImpl.java:322)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav
a:1063)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProc
essor.java:263)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr
ocessor.java:386)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Tiles
RequestProcessor.java:318)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
229)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1006)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:419)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:315)
at

Re: Client Side Validation

2006-08-02 Thread Romu

your form shoud have been named :
attendeeDetailsForm, like bean no caps for first letter .

then
validateAttendeeDeta


onsubmit=validateAttendeeDeta

 ilsForm ();

 or

validateAttendeeDeta


onsubmit=validateAttendeeDeta

 ilsForm (this);



u can see the javascript generated in the source of your jsp btw .
hope it helps






2006/8/2, Chetan Pandey [EMAIL PROTECTED]:


I have this:

html:form action=/addAttendeeDetails  onsubmit=return
validateRequired(this)

Where validateRequired comes from the following Javascript code in my
validator-rules.xml

validator name=required
classname=org.apache.struts.validator.FieldChecks
   method=validateRequired
 methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionMessages,
   org.apache.commons.validator.Validator,
   javax.servlet.http.HttpServletRequest
  msg=errors.required


javascript![CDATA[
function validateRequired(form) {

}
  ]]
 /javascript
/validator

But no Client-side Validation is occuring

-Original Message-
From: Lixin Chu [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 02, 2006 10:35 AM
To: Struts Users Mailing List
Subject: Re: Client Side Validation

do you have something like:
onsubmit=validateAttendeeDetailsForm (this);
in html:form ?

and form name is not attendeeDetailsForn ?




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




Re: Messages and Validator

2006-08-02 Thread Romu

interesting question , but u will suffer low performance i think ( one
database access  for each message ? ) .

i think if it's in a property file it's for simulate a static class .


2006/8/2, Jean-Marie Pitre [EMAIL PROTECTED]:



Hello,

I am using Validator framework with a Struts application.
I would like to know if it is possible to use message provided by a
database (or java class) rather than a propertie file ?

Thank you,

Jean-Marie.

---
Email Disclaimer
http://www.cofidis.be/emaildisclaimer.php


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




Re: html:optionsCollection problem

2006-08-01 Thread Romu

html:select   name=nameForm property=pays 

html:options collection=empresas property=value labelProperty=label/

/html:select

where pays is the property of your form


2006/8/1, Francisco Exposito Aguilera [EMAIL PROTECTED]:


I´ve added it into a html:form action=nameaction.do but I obtain the
error

Cannot create iterator for [EMAIL PROTECTED]

I´ve modified some code because I want to obtain a select with all info of
a
table which is placed in a database when the page is loaded; and this page
only comes from a link, not from another page with an associated action
(therefore, nothing has been saved in session).

public class Prueba implements Serializable
{
private Collection empresas=new ArrayList();
DTOEmpresa empresa = new DTOEmpresa();

public Collection getEmpresas()
{
empresa.setNifEmpresa(A);
empresas.add(empresa);
return(empresas);
}
public void setEmpresas(String empresa)
{
empresas.add(empresa);
}
}

jsp:useBean id=test class=project.struts.General.Prueba/
html:select property=rempresa
html:options collection=test property=nifempresa/
/html:select


I don´t know if I have explained my issue as I should.

Thanks a lot.



From: Monkeyden [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: Struts Users Mailing List user@struts.apache.org
Subject: Re: html:optionsCollection problem
Date: Tue, 1 Aug 2006 11:13:36 -0400

Looks like it may not be wrapped in a html:form tag in your JSP.  You
probably also want a field named toSelect, with accessor and mutators
in
your form bean, to hold the selected value.

On 8/1/06, Francisco Exposito Aguilera [EMAIL PROTECTED] wrote:

Hi,

I have a Bean:

package project.struts.General;
import java.util.ArrayList;
import java.util.Collection;
import java.io.*;

public class Prueba implements Serializable
{
private Collection empresas=new ArrayList();

public Collection getEmpresas()
{
empresas.add(string1);
empresas.add(string2);
return(empresas);
}
}

and a jsp where I write:

jsp:useBean id=test class=project.struts.General.Prueba /
html:select property=toSelect
html:optionsCollection property=empresas name=test/
/html:select

But it doesn't work. I receive the error
javax.servlet.ServletException: Cannot find bean under name
org.apache.struts.taglib.html.BEAN

How can I solve this issue? Or what is the correct way to generate this?

Thanks in advance

_
Un amor, una aventura, compañía para un viaje. Regístrate gratis en MSN
Amor
 Amistad. http://match.msn.es/match/mt.cfm?pg=channeltcid=162349


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



_
Horóscopo, tarot, numerología... Escucha lo que te dicen los astros.
http://astrocentro.msn.es/


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




Re: html:optionsCollection problem

2006-08-01 Thread Romu

u put the collection empresas in the request or session, try both i think .

2006/8/1, Romu [EMAIL PROTECTED]:


html:select   name=nameForm property=pays 

html:options collection=empresas property=value
labelProperty=label/

/html:select

where pays is the property of your form


2006/8/1, Francisco Exposito Aguilera [EMAIL PROTECTED]:

 I´ve added it into a html:form action=nameaction.do but I obtain the
 error

 Cannot create iterator for [EMAIL PROTECTED]

 I´ve modified some code because I want to obtain a select with all info
 of a
 table which is placed in a database when the page is loaded; and this
 page
 only comes from a link, not from another page with an associated action
 (therefore, nothing has been saved in session).

 public class Prueba implements Serializable
 {
 private Collection empresas=new ArrayList();
 DTOEmpresa empresa = new DTOEmpresa();

 public Collection getEmpresas()
 {
 empresa.setNifEmpresa(A);
 empresas.add(empresa);
 return(empresas);
 }
 public void setEmpresas(String empresa)
 {
 empresas.add(empresa);
 }
 }

 jsp:useBean id=test class=project.struts.General.Prueba/
 html:select property=rempresa
 html:options collection=test property=nifempresa/
 /html:select


 I don´t know if I have explained my issue as I should.

 Thanks a lot.



 From: Monkeyden [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List  user@struts.apache.org
 To: Struts Users Mailing List user@struts.apache.org
 Subject: Re: html:optionsCollection problem
 Date: Tue, 1 Aug 2006 11:13:36 -0400
 
 Looks like it may not be wrapped in a html:form tag in your JSP.  You
 probably also want a field named toSelect, with accessor and mutators
 in
 your form bean, to hold the selected value.
 
 On 8/1/06, Francisco Exposito Aguilera [EMAIL PROTECTED] wrote:
 
 Hi,
 
 I have a Bean:
 
 package project.struts.General;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.io.*;
 
 public class Prueba implements Serializable
 {
 private Collection empresas=new ArrayList();
 
 public Collection getEmpresas()
 {
 empresas.add(string1);
  empresas.add(string2);
 return(empresas);
 }
 }
 
 and a jsp where I write:
 
 jsp:useBean id=test class= project.struts.General.Prueba /
 html:select property=toSelect
 html:optionsCollection property=empresas name=test/
 /html:select
 
 But it doesn't work. I receive the error
 javax.servlet.ServletException: Cannot find bean under name
 org.apache.struts.taglib.html.BEAN
 
 How can I solve this issue? Or what is the correct way to generate
 this?
 
 Thanks in advance
 
 _
 Un amor, una aventura, compañía para un viaje. Regístrate gratis en
 MSN
 Amor
  Amistad. http://match.msn.es/match/mt.cfm?pg=channeltcid=162349
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 _
 Horóscopo, tarot, numerología... Escucha lo que te dicen los astros.
 http://astrocentro.msn.es/


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