Re: weird thing with xwork 2.0.3

2007-07-03 Thread alex xander
thx alot,
u solve my problem. that's work

Zoran Avtarovski [EMAIL PROTECTED] wrote: I got caught out on this as well.

You have to add the DTD statement to your validators.xml file like this:


 -//OpenSymphony Group//XWork Validator
Config 1.0//EN
   
http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd;


2.0.1 didn't need it, but 2.0.8 does.

Z.


 i use struts 2.0.8 and tomcat 6.0.10 as server
 i want to upgrade from xwork 2.0.1 to 2.0.3.
 everything work fine with xwork 2.0.1
 but with xwork 2.0.3 i find some weird thing
 i got error just when i run com.bba.security.Login.java, but when i put it on
 another package for example com.bba.test.Login.java
 everything work fine again
 here is my struts.xml
 
 
 
 type=redirect/backend/home.action
 /index.jsp
 /index.jsp
 
 
 and here is the stack trace
 
 
 Document is invalid: no grammar found. -
 file:///E:/data%20kerja/tomcat-channeling/bin/validators.xml:1:12
  com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
  
 com.opensymphony.xwork2.validator.ValidatorFileParser.parseValidatorDefinition
 s(ValidatorFileParser.java:125)
  
 com.opensymphony.xwork2.validator.ValidatorFileParser.parseValidatorDefinition
 s(ValidatorFileParser.java:99)
  
 com.opensymphony.xwork2.validator.ValidatorFactory.retrieveValidatorConfigurat
 ion(ValidatorFactory.java:344)
 i don't know why is xwork search for validator.xml in folder tomcat-root/bin
 not in tomcat-root/webapps/myweb/WEB-INF/classes
 
 i don't make any extra configuration
 can some one help me?
 
 

 -
 Be a better Globetrotter. Get better travel answers from someone who knows.
 Yahoo! Answers - Check it out.
 -
 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]



   
-
Pinpoint customers who are looking for what you sell. 

Re: Configuring Tiles in S2

2007-07-03 Thread Antonio Petrelli

2007/7/2, Dave Newton [EMAIL PROTECTED]:


The tiles plugin page [1] gives the basics. Tiles2 was
in a bit of flux when I used it for a previous
application so my code may not be up-to-date; I'd
check the Tiles site [2, but I don't know if it's the
right URL] for current DTD/tag docs.

d.

[1]
http://struts.apache.org/2.x/docs/tiles-plugin.html
[2]
http://struts.apache.org/struts-sandbox/tiles/index.html




Mmm... the wiki contains some old references.
And Tiles 2 is not sandboxed anymore. Dave, where have you been in the last
year? :-)

Antonio


Re: Configuring Tiles in S2

2007-07-03 Thread Manoj . Gupta

Thanks Chris.
I think it moved one step further..

now my web.xml looks like


?xml version=1.0 encoding=UTF-8?
web-app id=WebApp_9 version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

display-nameMortgage Application/display-name

filter
filter-namemortgage/filter-name

filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
/filter

filter-mapping
filter-namemortgage/filter-name
url-pattern/*/url-pattern
/filter-mapping

servlet
servlet-nametiles/servlet-name

servlet-classorg.apache.tiles.servlet.TilesServlet/servlet-class
load-on-startup1/load-on-startup
/servlet
context-param
param-nametiles-definitions/param-name
param-value/WEB-INF/tiles-config.xml/param-value
/context-param
listener

listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-class
/listener
/web-app


tiles-config.xml
--

?xml version=1.0 encoding=UTF-8?
!DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD
Tiles Configuration 2.0//EN
http://tiles.apache.org/dtds/tiles-config_2_0.dtd;

 tiles-definitions
definition  name=selectProd path=/pages/selectproduct.jsp/
/tiles-definitions


and struts.xml
---

result-types
  result-type name=tiles
class=org.apache.struts2.views.tiles.TilesResult/
/result-types

action name=selectProduct
result type=tilesselectProd/result
/action


when i try to try to load the page the following error occurs

08:57:36,479 INFO  [BasicTilesContainer] Initializing Tiles2 container. . .
08:57:36,479 WARN  [BasicTilesContainer] Unable to find configured
definition '/
WEB-INF/tiles.xml'
08:57:36,479 INFO  [BasicTilesContainer] Tiles2 container initialization
complet
e.
08:57:36,479 INFO  [TilesAccess] Publishing TilesContext for context:
org.apache
.tiles.servlet.ServletContextAdapter
08:57:39,932 WARN  [BasicTilesContainer] Unable to find the definition
'selectPr
od'
08:57:39,932 ERROR [[default]] Servlet.service() for servlet default threw
excep
tion
org.apache.tiles.definition.NoSuchDefinitionException: selectProd
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
java:398)
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
java:374)
at
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java


I am not able to understand why is it try to look for tiles.xml in WEB-INF
directory and thus not finding the definition.
I tries renaming the file to tiles.xml but that also did not help(then the
NullPointer error re-appered)


Any help will be much appreciated.

Manoj.








   
 Chris Pratt 
 [EMAIL PROTECTED] 
 ail.com   To 
   Struts Users Mailing List 
 02/07/2007 19:35  user@struts.apache.org
cc 
   
 Please respond to Subject 
   Struts Users   Re: Configuring Tiles in S2 
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   
   




You may need to include the context-param to define your
tiles-config.xmlfile for the listener.

  context-param
param-nametiles-definitions/param-name
param-value/WEB-INF/tiles-config.xml/param-value
  /context-param


  (*Chris*)

On 7/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 i have done the following configuration 

 struts.xml
 --
 result-types
   result-type name=tiles
 class=org.apache.struts2.views.tiles.TilesResult/
 /result-types


 action name=selectProduct
 result type=tilesselectProduct/result
 /action

 web.xml
 
 servlet
  servlet-nametiles/servlet-name
  servlet-classorg.apache.tiles.servlet.TilesServlet/servlet-class
  init-param
  param-namedefinitions-config/param-name
  param-value/WEB-INF/tiles-config.xml/param-value
  

RE: handle set of list of objects

2007-07-03 Thread prafull.jain

Hi,
 I did same thing but I am not getting any values. its showing null value but 
value is already there.
please give me any other solution.
 
Thanks  Regards,
Prafull Jain 



From: Vikash Manoranjan [mailto:[EMAIL PROTECTED]
Sent: Mon 02/07/2007 5:31 PM
To: 'Struts Users Mailing List'
Subject: RE: handle set of list of objects



As you are picking value from set. And while fetching value from set, it
gives reference of the object. Therefore whatever change you will do with
the value will updating the set object too. No need to set the Set
explicitly. Now u need to set the Set object back to FormBean. Since u have
the object of the FormBean (as mentioned in ur code) u can set it very
easily. And finally fetch it in ur action class. Just try this...this should
work

Thanks and Regards,

Vikash Manoranjan



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 02 July 2007 16:57
To: user@struts.apache.org
Subject: RE: handle set of list of objects





Thanks  Regards,
Prafull Jain J




From: Prafull Jain (WT01 - SECURITIES)
Sent: Mon 02/07/2007 4:47 PM
To: Struts Users Mailing List; 'Struts Users Mailing List'
Subject: RE: handle set of list of objects


Hi Vikash,

I want to do this using actionForm. I am using struts - jsp tag. Every
fields are releated to my actionForm. but I am able to set properties of
fields which are getting set of list of objects values, in my actionForm. I
have only 2 question.

1) how to set properties of fields which are getting set of list of objects
values.

2) how to define this property in actionForm.

In my jsp, I  am doing like..

*
%

Set isidSet = overViewForm.getIsid() ;

request.setAttribute(isid,isidSet);

%

c:forEach var=isid items=${isid}

...

td class=first

input id=identifierType name=identifierType type=text disabled=true
value=c:out value=${isid.ID_CTXT_TYP}/ /

/td

td

input id=identifierValue name=identifierValue type=text
disabled=true value=c:out value=${isid.ISS_ID}/ /

/td

td class=first

input id=identifierPurpose name=identifierPurpose type=text
disabled=true value=c:out value=${isid.LAST_CHG_USR_ID}/ /

/td

/c:forEach






Thanks  Regards,
Prafull Jain J




From: Vikash Manoranjan [mailto:[EMAIL PROTECTED]
Sent: Mon 02/07/2007 4:36 PM
To: 'Struts Users Mailing List'
Subject: RE: handle set of list of objects



Put the set object into session and retrive it from session in your action
class and after retrivial remove it from session.


Thanks and Regards,

Vikash Manoranjan



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 02 July 2007 16:26
To: user@struts.apache.org
Subject: handle set of list of objects




Hi,

In my struts application, I am getting results from database, based on my
search query.

In result, I am getting set of list of objects mean set contain lists and
list contain objects.

I am passing these values from my action class to jsp page using one bean
class.

Now I want to pass all changed value from jsp page to my next action class
using actionForm.

but problem is, How can I do. because there are set of list of objects.

pls give me suggestion. pls let me know, if any one need others information.






Thanks  Regards,
Prafull Jain J




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]






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



Re: Configuring Tiles in S2

2007-07-03 Thread Antonio Petrelli

2007/7/2, Chris Pratt [EMAIL PROTECTED]:

You may need to include the context-param to define your
tiles-config.xmlfile for the listener.

  context-param
param-nametiles-definitions/param-name
param-value/WEB-INF/tiles-config.xml/param-value
  /context-param


It's wrong, the correct (deprecated but still working) parameter name
is definitions-config.
Anyway, notice that Struts 2.0.8 uses Tiles 2.0.3. With Tiles 2.0.4
the configuration parameters changed the names, so the new name is:
http://tiles.apache.org/config-reference.html#org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG

Antonio

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



Re: Configuring Tiles in S2 - solved

2007-07-03 Thread Manoj . Gupta
Thanks Antonio...
It worked.



   
 Antonio  
 Petrelli 
 antonio.petrelli  To 
 @gmail.com   Struts Users Mailing List 
   user@struts.apache.org
 03/07/2007 09:07   cc 
   
   Subject 
 Please respond to Re: Configuring Tiles in S2 
   Struts Users   
   Mailing List   
 [EMAIL PROTECTED] 
  he.org  
   
   




2007/7/2, Chris Pratt [EMAIL PROTECTED]:
 You may need to include the context-param to define your
 tiles-config.xmlfile for the listener.

   context-param
 param-nametiles-definitions/param-name
 param-value/WEB-INF/tiles-config.xml/param-value
   /context-param

It's wrong, the correct (deprecated but still working) parameter name
is definitions-config.
Anyway, notice that Struts 2.0.8 uses Tiles 2.0.3. With Tiles 2.0.4
the configuration parameters changed the names, so the new name is:
http://tiles.apache.org/config-reference.html#org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG


Antonio

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


This message has been checked for viruses and spam by the Virgin Money
email scanning system powered by Messagelabs.






This e-mail is intended to be confidential to the recipient. If you receive a 
copy in error, please inform the sender and then delete this message. Virgin 
Money do not accept responsibility for changes made to any e-mail after 
sending. Virgin Money have swept, and believe this e-mail to be free of viruses 
and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the 
Financial Services Authority. Registered in England no. 3072766. Entered on the 
Financial Services Authority's Register http://www.fsa.gov.uk/register/. 
Register Number 179271. The Virgin Deposit Account is a personal bank account 
with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the 
Financial Services Authority. Registered in England no. 3000482. Entered on the 
Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed 
representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, 
Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email 
scanning system powered by Messagelabs.

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



Struts 2 displaying message from resource bundle

2007-07-03 Thread Manoj . Gupta
HI

Using Struts 2   I am trying to  display  message from a resource bundle

in the struts.xml

constant name=struts.custom.i18n.resources
value=ApplicationResources.properties/

jsp
--
s:actionmessage key=test.error /

I have copied the ApplicationResources.properties in the classpath

but it is not reading the message from the property file, it displays the
key.

Please let me know if iam doing something wrong...


This e-mail is intended to be confidential to the recipient. If you receive a 
copy in error, please inform the sender and then delete this message. Virgin 
Money do not accept responsibility for changes made to any e-mail after 
sending. Virgin Money have swept, and believe this e-mail to be free of viruses 
and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the 
Financial Services Authority. Registered in England no. 3072766. Entered on the 
Financial Services Authority's Register http://www.fsa.gov.uk/register/. 
Register Number 179271. The Virgin Deposit Account is a personal bank account 
with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the 
Financial Services Authority. Registered in England no. 3000482. Entered on the 
Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed 
representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, 
Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email 
scanning system powered by Messagelabs.

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



Setting the target of the result page of an action/interceptor

2007-07-03 Thread Session A Mwamufiya
Hi,

I'm using an interceptor to implement the login to my app, my welcome page uses 
2 frames, and I would like to have my login jsp page load as a single window 
once my session object expires when a user clicks on a link in one frame that 
triggers a window to be loaded in the other frame.  Would anyone know how 
whether the target frame of a result can be set before it is displayed?

Thanks,
Session


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



答复: Struts 2 displaying message from resource bundle

2007-07-03 Thread chenshibing
Actually, I didn't understand why you gave s:actionmessage .../ a key 
attribute. Meanwhile, you should change constant 
name=struts.custom.i18n.resources
value=ApplicationResources.properties/ to constant 
name=struts.custom.i18n.resources
value=ApplicationResources/

Crazyreal

-邮件原件-
发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
发送时间: 2007年7月3日 18:01
收件人: Struts Users Mailing List
主题: Struts 2 displaying message from resource bundle

HI

Using Struts 2   I am trying to  display  message from a resource bundle

in the struts.xml

constant name=struts.custom.i18n.resources
value=ApplicationResources.properties/

jsp
--
s:actionmessage key=test.error /

I have copied the ApplicationResources.properties in the classpath

but it is not reading the message from the property file, it displays the
key.

Please let me know if iam doing something wrong...


This e-mail is intended to be confidential to the recipient. If you receive a 
copy in error, please inform the sender and then delete this message. Virgin 
Money do not accept responsibility for changes made to any e-mail after 
sending. Virgin Money have swept, and believe this e-mail to be free of viruses 
and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the 
Financial Services Authority. Registered in England no. 3072766. Entered on the 
Financial Services Authority's Register http://www.fsa.gov.uk/register/. 
Register Number 179271. The Virgin Deposit Account is a personal bank account 
with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the 
Financial Services Authority. Registered in England no. 3000482. Entered on the 
Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed 
representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, 
Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email 
scanning system powered by Messagelabs.

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



[S2] FCKeditor

2007-07-03 Thread Mark P Ashworth

Good Day,

I am busy updating my Struts 2 plug-in that contains a tag for the Open
Flash Chart component and I was wondering if anybody would be interested in
a tag for the popular FCKeditor component?

I have the basic editor working and based upon response will make it
available in the Connext-Graph plug-in.

Regards,
Mark P Ashworth
http://ww.connext.co.za 
-- 
View this message in context: 
http://www.nabble.com/-S2--FCKeditor-tf4017623.html#a11410028
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: Configuring Tiles in S2

2007-07-03 Thread Dave Newton
--- Antonio Petrelli wrote:
 And Tiles 2 is not sandboxed anymore. Dave, where
 have you been in the last year? :-)

Using Google to search for Tiles 2 ;)

d.



  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz

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



datetimepicker

2007-07-03 Thread David Harland
Hi Musachy 

Is it possible for me to download the fixed version of the
datetimepicker (that will allow me to set the displayFormat to something
other than the default) from somewhere or must I wait for 2.1 to be
released. Is there a estimate of when that might be if this is so.

Thanks

Dave.   

__
Ufi Limited 
Registered in England No.  3980770 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

learndirect Solutions Ltd 
Registered in England No. 5081669 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

UFI Charitable Trust 
Registered in England No.  3658378 
Registered Charity No.  1081028 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

This email has been scanned by the MessageLabs Email Security System.

__

collections and struts

2007-07-03 Thread is_maximum

Hi all 

I have problem using a list in my action form

consider following action form:

public vlass MyForm extends ActionForm{

 private SetSponsor sponsors;

//and its getter and setter
}

now in JSP I have now problem to display them but for update!!!

here is the code of jsp:


logic:iterate name=myForm property=sponsors id=sponsor 
html:hidden indexed=true property=sponsorId name=sponsor  /
c:out value=${sponsor.sponsor.name} /
html:checkbox indexed=true name=sponsor
property=deleted/html:checkbox
/logic:iterate



the problem is when I click on checkboxes no change will submit to the
action form
and setter method won't call at all
 
before this, I put the html:text and it didnt work as well, I mean no change
will be sent to the action form therefore I cant see changes from my action

what is wrong with this code?

I even put two setter method as follow
public void setSponsors(Set sponsors){
// ...
}

and 

public void setSponsor(int index, Sponsor s){
//
}

but neither of them will be called

this really confused me, any help would be appreciated

thank you in advance
-- 
View this message in context: 
http://www.nabble.com/collections-and-struts-tf4017923.html#a11411020
Sent from the Struts - User mailing list archive at Nabble.com.


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



Struts 2 Package Namespace and URL generation

2007-07-03 Thread Richard Sayre

I have a package defined as follows:

package name=design namespace=/Design extends=struts-default

   action name=selectCustomer
   result/JSP/Design/selectCustomer.jsp/result
   /action

  action name=selectLocation
   result/JSP/Design/location.jsp/result
   /action

/package

I am using the name space to encapsulate the JSP from the user.

When I create a form using struts tags like this:

s:form action=selectLocation  s:form

The 'action' is rendered as follows:

form id=selectLocation name=selectLocation onsubmit=return
true; action=/WebTest/Design/selectLocation.action method=post

Which is correct.  However if I specify the name space in the action
attribute like this:


s:form action=/Design/selectLocation  s:form

The following will render:

form id=selectLocation name=selectLocation onsubmit=return
true; action=/WebTest/Design/selectLocation method=post

With out the .action appended to the URL.

I plan on having a selectLocation action in several different name
spaces.  If I render the form the first way:

s:form action=selectLocation  s:form

How will struts know which name space I am referring to?  It seems
that I cannot hard code the name space or the .action will not appear.
I could hard code the .action but I would prefer not to in case this
.action extension ever changes.


Thank you,

Rich

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



Adding global-exception-mappings tag to struts.xml causes SAXParseException

2007-07-03 Thread Anton Pussep
Hello,

I created a very simple application in order to test exception handling.
Unfortunately when I add a global-exception-mappings tag to my
struts.xml (see file below) the application is not even deployed
anymore, and here is what Tomcat complains about:

The content of element type package must match
(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,global-results?,global-exception-mappings?,action*).
-
file:/opt/tomcat/5.5.23/webapps/playground/WEB-INF/classes/struts.xml:22:15

Well, line 22 is the package closing tag and to me it seems like my
struts.xml matches the DTD very well, in fact I only use an action and a
global-exception-mappings tag inside of the package. The funny thing is
that when I remove the action tag the app is deployed perfectly well, it
just does not have any actions then. I am pretty sure there is something
I do not know/understand yet. Can you tell what the problem might be?

06: struts
07: package name=playground-default extends=struts-default
08:
09: action name=ExceptionThrower
10: class=action.ExceptionThrower
11: result/exceptionHandling.jsp/result
12: result name=input/exceptionHandling.jsp/result
13: result name=error/error.jsp/result
14: /action
15:
16: global-exception-mappings
17: exception-mapping
18: result=error
19: exception=java.lang.Throwable/
20: /global-exception-mappings
21:
22: /package
23: /struts

Best,
Anton



signature.asc
Description: OpenPGP digital signature


Re: Struts 2 Package Namespace and URL generation

2007-07-03 Thread Richard Sayre

On 7/3/07, Dave Newton [EMAIL PROTECTED] wrote:

--- Richard Sayre [EMAIL PROTECTED] wrote:
 How will it know which name space I am referring to?


AFAIR it uses the current namespace unless you supply
a namespace attribute.

d.



Thank you.  I should have triple checked the doumentation.  I missed
it when I read through.

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



Format values in MessageResources

2007-07-03 Thread Ramon Xuriguera i Albareda

Hi,
I've just noticed that it's possible to format args in a
MessageResources' key (see
http://www.jguru.com/faq/view.jsp?EID=915891). I'm trying to do the
following:

In MessageResources.properties
label.mean=Nota mitjana: {0,number}

Then, in my JSP:
bean:message key=label.mean arg0=${mybean.mean}/

I get this error:
14:52:58,546-ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/TFC].[jsp]
-Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: unknown format type at
at java.text.MessageFormat.makeFormat(Unknown Source)
at java.text.MessageFormat.applyPattern(Unknown Source)
at java.text.MessageFormat.init(Unknown Source)
at 
org.apache.struts.util.MessageResources.getMessage(MessageResources.java:302)


Do I have to define these formats somewhere?

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



Re: Adding global-exception-mappings tag to struts.xml causes SAXParseException

2007-07-03 Thread Dave Newton
--- Anton Pussep [EMAIL PROTECTED] wrote:
 The content of element type package must match
 ([...],global-exception-mappings?,action*).
 it seems like my struts.xml matches the DTD very
well

Not particularly ;)

 package name=playground-default ...
   action name=ExceptionThrower...
   global-exception-mappings

The DTD warning is giving you the expected *order* of
elements.

d.



   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

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



Re: datetimepicker

2007-07-03 Thread Musachy Barroso

Hi Dave, right now there is no estimate on when will 2.1 be released (open
source style :) ), but 2.1 is as stable as 2.0.x are, you can just download
it and build it yourself, here are some instructions on how to do that:

http://struts.apache.org/2.x/docs/building-with-maven.html

if all you need is a datepicker, I would recommend looking at the YUI
plugin, it is lightweight, and IMO better. (the releases depend on me so I
can get things fixed right away :) )

regards
musachy

On 7/3/07, David Harland [EMAIL PROTECTED] wrote:


Hi Musachy

Is it possible for me to download the fixed version of the
datetimepicker (that will allow me to set the displayFormat to something
other than the default) from somewhere or must I wait for 2.1 to be
released. Is there a estimate of when that might be if this is so.

Thanks

Dave.

__
Ufi Limited
Registered in England No.  3980770
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

learndirect Solutions Ltd
Registered in England No. 5081669
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

UFI Charitable Trust
Registered in England No.  3658378
Registered Charity No.  1081028
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

This email has been scanned by the MessageLabs Email Security System.

__





--
Hey you! Would you help me to carry the stone? Pink Floyd


Re: datetimepicker

2007-07-03 Thread Shervin Asgari

Musachy Barroso wrote:
Hi Dave, right now there is no estimate on when will 2.1 be released 
(open
source style :) ), but 2.1 is as stable as 2.0.x are, you can just 
download

it and build it yourself, here are some instructions on how to do that:

http://struts.apache.org/2.x/docs/building-with-maven.html

if all you need is a datepicker, I would recommend looking at the YUI
plugin, it is lightweight, and IMO better. (the releases depend on me 
so I

can get things fixed right away :) )


You can also use Joda Time.
It's really easy to use, powerful and has lots of features. Check it out.
http://joda-time.sourceforge.net/

Shervin Asgari

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



Re: Adding global-exception-mappings tag to struts.xml causes SAXParseException

2007-07-03 Thread Anton Pussep

 The DTD warning is giving you the expected *order* of
 elements.

Aha, good to know. =) Yes, it works perfectly fine. Thanks a lot!

Best,
Anton



signature.asc
Description: OpenPGP digital signature


RE: datetimepicker

2007-07-03 Thread David Harland
Many thanks,

I'll try YUI out.

Dave. 

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2007 14:15
To: Struts Users Mailing List
Subject: Re: datetimepicker

Hi Dave, right now there is no estimate on when will 2.1 be released
(open source style :) ), but 2.1 is as stable as 2.0.x are, you can just
download it and build it yourself, here are some instructions on how to
do that:

http://struts.apache.org/2.x/docs/building-with-maven.html

if all you need is a datepicker, I would recommend looking at the YUI
plugin, it is lightweight, and IMO better. (the releases depend on me so
I can get things fixed right away :) )

regards
musachy

On 7/3/07, David Harland [EMAIL PROTECTED] wrote:

 Hi Musachy

 Is it possible for me to download the fixed version of the 
 datetimepicker (that will allow me to set the displayFormat to 
 something other than the default) from somewhere or must I wait for 
 2.1 to be released. Is there a estimate of when that might be if this
is so.

 Thanks

 Dave.

 __
 Ufi Limited
 Registered in England No.  3980770
 Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

 learndirect Solutions Ltd
 Registered in England No. 5081669
 Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

 UFI Charitable Trust
 Registered in England No.  3658378
 Registered Charity No.  1081028
 Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

 This email has been scanned by the MessageLabs Email Security System.

 __




--
Hey you! Would you help me to carry the stone? Pink Floyd


- --
ML {UFI}

__
Ufi Limited 
Registered in England No.  3980770 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

learndirect Solutions Ltd 
Registered in England No. 5081669 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

UFI Charitable Trust 
Registered in England No.  3658378 
Registered Charity No.  1081028 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

This email has been scanned by the MessageLabs Email Security System.

__

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



Re: datetimepicker

2007-07-03 Thread Musachy Barroso

There is also JSCalendar: http://sourceforge.net/projects/jscalendar

musachy

On 7/3/07, David Harland [EMAIL PROTECTED] wrote:


Many thanks,

I'll try YUI out.

Dave.

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: 03 July 2007 14:15
To: Struts Users Mailing List
Subject: Re: datetimepicker

Hi Dave, right now there is no estimate on when will 2.1 be released
(open source style :) ), but 2.1 is as stable as 2.0.x are, you can just
download it and build it yourself, here are some instructions on how to
do that:

http://struts.apache.org/2.x/docs/building-with-maven.html

if all you need is a datepicker, I would recommend looking at the YUI
plugin, it is lightweight, and IMO better. (the releases depend on me so
I can get things fixed right away :) )

regards
musachy

On 7/3/07, David Harland [EMAIL PROTECTED] wrote:

 Hi Musachy

 Is it possible for me to download the fixed version of the
 datetimepicker (that will allow me to set the displayFormat to
 something other than the default) from somewhere or must I wait for
 2.1 to be released. Is there a estimate of when that might be if this
is so.

 Thanks

 Dave.

 __
 Ufi Limited
 Registered in England No.  3980770
 Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

 learndirect Solutions Ltd
 Registered in England No. 5081669
 Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

 UFI Charitable Trust
 Registered in England No.  3658378
 Registered Charity No.  1081028
 Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

 This email has been scanned by the MessageLabs Email Security System.

 __




--
Hey you! Would you help me to carry the stone? Pink Floyd


- --
ML {UFI}

__
Ufi Limited
Registered in England No.  3980770
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

learndirect Solutions Ltd
Registered in England No. 5081669
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

UFI Charitable Trust
Registered in England No.  3658378
Registered Charity No.  1081028
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP

This email has been scanned by the MessageLabs Email Security System.

__

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





--
Hey you! Would you help me to carry the stone? Pink Floyd


Re: Struts 2 displaying message from resource bundle

2007-07-03 Thread Manoj Gupta
   
  i also tried using
  s:i18n name=ApplicationResources
  The i18n value for test.error in ApplicationResources is s:property 
value=text('test.error') /
  /s:i18n
  in the struts.xml
  constant name=struts.custom.i18n.resources
  value=ApplicationResources/
   
   
  still it is not diplaying the message from the resource file.
  Any idea?
   
   


-
 Here’s a new way to find what you're looking for - Yahoo! Answers 

Set a session value in the view

2007-07-03 Thread meeboo

Hey all

How can I achieve something like this:
%session.removeAttribute(successMessage);%

with the s:set tag? 

I tried s:set name=session.get('successMessage') value=null/ but it
didn't work.

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Set-a-session-value-in-the-view-tf4018422.html#a11412642
Sent from the Struts - User mailing list archive at Nabble.com.


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



Validation dies because of request param array?

2007-07-03 Thread Scott Kingdon

I am using Struts 2. I get this error whenever I turn on validation. The
struts automatically returns the input page.

07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR [ParametersInterceptor]
ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error
setting expression 'name' with value '[Ljava.lang.String;@188e507'

There are several parameters that are being passed in to the action. It is
only failing in this one. I have changed the name of the parameter. But the
problem persists with that name.

struts.xml action config includes this interceptor:
interceptor-ref name=paramsPrepareParamsStack/

If I remove the validation xml the problem goes away. But then I have lost
validation. If I remove 'name' from the validation in the xml the problem is
still there. That is, even if there is no mention of the 'name' parameter in
the validation xml, I still get the error.

I have other Actions that are configured the exact same way and work just
fine.

I have tried rebuilding from scratch. No fix there.

It looks like somehow there is are two 'name' parameters being sent in. So
struts is handling it with an array. To ensure this is struts I have sent
requests to the server by pasting the url in the browser with only one name
paramater. I still get the error.

I feel like I have done everything but the one thing that will work. g!

Any ideas?


Re: Set a session value in the view

2007-07-03 Thread cilquirm

You should be able to do

s:set name=successMessage value=null scope=session/

or (I'm assuming you have access to the jstl) , you can always do 
c:remove var=successMessage scope=session/

hth,
-a


meeboo wrote:
 
 
 Hey all
 
 How can I achieve something like this:
 %session.removeAttribute(successMessage);%
 
 with the s:set tag? 
 
 I tried s:set name=session.get('successMessage') value=null/ but it
 didn't work.
 
 Thanks!
 

-- 
View this message in context: 
http://www.nabble.com/Set-a-session-value-in-the-view-tf4018422.html#a11412923
Sent from the Struts - User mailing list archive at Nabble.com.


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



Struts 2 Validation

2007-07-03 Thread Manoj Gupta
Hi All,
   
  I am trying to use struts 2 validation for the first time.
   
  I have a action class called TestAction.java and two form bean attribute like
   
  Form01 f1; - with getter/setter
  Form 02 f2 ; with getter/setter
   
  as the form will be populated from two different pages i want to validate the 
form beans individually
   
  so i have two validator files i.e.
   
   TestAction-TestAction!f1-validator.xml and 
   TestAction-TestAction!f2-validator.xml 
   
  and saved them in the same directory as the action file
   
  but these files are not getting executed Any help will be much appreciated
   
  Thanks,
  Manoj.
   


-
 Here’s a new way to find what you're looking for - Yahoo! Answers 

Re: [S2] Session Invalidation through SessionAware interface

2007-07-03 Thread Gabriel Belingueres

Changing the SessionAware interface would certainly break backward
compatibility, plus it would affect action testability.

If you don't like the downcast to SessionMap, I would rather consider
creating an additional interface, something like:

public interface SessionMapAware {
 public void setSessionMap(SessionMap map);
}

then you can safely add any methods you like to the SessionMap class.

Gabriel

2007/7/1, Srinivas.N. [EMAIL PROTECTED]:


Wouldn't it be cleaner if

(1) the setSession(Map session) signature of SessionAware was changed to
setSession(SessionMap session) and
(2) the implementation of the invalidate method on internally took care of
dealing with already timed out sessions? (if one really wanted to know if
the session was already invalidated, it can probably return that as a
boolean)

- Srinivas


newton.dave wrote:

 --- Ray Clough [EMAIL PROTECTED] wrote:
 Then to invalidate the Session, I do this [code]

 Oh, I had no idea! If you have wiki karma maybe add a
 FAQ entry, otherwise with your permission I'll do it.

 d.




 

 Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games.
 http://sims.yahoo.com/

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




--
View this message in context: 
http://www.nabble.com/-S2--Session-Invalidation-through-SessionAware-interface-tf4003103.html#a11385428
Sent from the Struts - User mailing list archive at Nabble.com.


-
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: result type Jasper [Struts 2]

2007-07-03 Thread CannonFL


The Jasper Report plug-in is working.  However, the PDF that's returned is
displayed in the same browser window that initiated the action.  I want the
PDF to display in a new browser window.  That way, my original window is not
overwritten by the report.

I've tried opening another window with java script {
window.open('displayJasperReport.jsp') } and then calling the action that
generates the jasper report from it using s:action name=generateReport
executeResult=true/ , this does work, however the result isn't rendered
correctly in the browser.  Instead of seeing a nice PDF in the browser, I
see a string that starts with:

%PDF-1.4 % 3 0 obj  stream x���MO�0���s\`�3�q�J6�����`X�6��mq!K

I'm guessing the content-type isn't being set.

To recap, calling the action from a a:submit and having the results
returned to the same browser window works perfectly.  Calling the action
using a:action from a popup opened via window.open does excecute the action
class.  However, what's returned is not displayed as a PDF.

Thanks in advance for the help...
Frank




honey0303 wrote:
 
 
 hello again..
 i got this error..when i try to include struts-plugin.xml
 
 
 Message ID:
  
 WebModule[/myeis]Exception starting filter struts2 The package name
 'jasperreports-default' at location package - jar
 Complete Message
 
 file:/opt/SDK/domains/domain1/applications/j2ee-modules/myeis/WEB-INF/lib/struts2-jasperreports-plugin-2.0.5.jar!/struts-plugin.xml:8:43
 is already been used by another package at location package -
 file:/opt/SDK/domains/domain1/applications/j2ee-modules/myeis/WEB-INF/classes/struts-plugin.xml:8:43
 - package -
 jar:file:/opt/SDK/domains/domain1/applications/j2ee-modules/myeis/WEB-INF/lib/struts2-jasperreports-plugin-2.0.5.jar!/struts-plugin.xml:8:43
 
 
 here is my struts-plugin.xml
 
 struts
 package name=jasperreports-default
 
  result-types
   result-type name=jasper
 class=org.apache.struts2.views.jasperreports.JasperReportsResult/
  /result-types
 /package
 
 /struts
 
 and my action mapping
 
 action name=eis_hr_002 class=apps.eis_hr_002
 result name=success type=jasper
 /result
 /action 
 
 please help me..thank you so much
 
 
 RobinCamus [EMAIL PROTECTED] wrote: 
 I saw your others post so if i understand correctly, you want to use
 jasperreports so here is what i ve done:
 in struts.xml:
 -
 -
 
 - 
 -  
 class=org.apache.struts2.views.jasperreports.JasperReportsResult /
 - 
 -
 -...
 -...
 -...
 -...
 -   
 class=maintenanceHistoryQueryAction method=search
 -  
 -WEB-INF/pages/reports.jasper/maintenance_report.jasper
 -maintenanceHistoryQueryList
 -PDF
 -  
 -
 -...
 -...
 -
 
 actually if you re using jasperreports,
 org.apache.struts2.views.jasperreports.JasperReportsResult is the good
 class
 for the result class.
 WEB-INF/pages/reports.jasper/maintenance_report.jasper is your precompiled
 rapport (i ve build them with ireports)
 maintenanceHistoryQueryList is the list with the data you need for your
 report
 
 you can find all those information on jasperreports forum...
 
 Robin
 
 
 honey0303 wrote:
 
 still i got the error even if i include that in my default package..
 
 e.g.
 
 
 
 
 
 


 class=org.apache.struts2.views.jasperreports.JasperReportsResult /
  
 ...
 
 
 still have same error..
 
 what you mean by this..
 
 You ll have to find the result class you need to point at..
 
 i am really new at Struts..please help me..thanks again.
 
 
 
 
 RobinCamus wrote:
 
 I had to implement a jasper type for jasper report:
 I think you need to define a result type in struts.xml like
 
 
 
 
 
 class=org.apache.struts2.views.jasperreports.JasperReportsResult /


 
 
 You ll have to find the result class you need to point at.
 I hope it helps
 
 Robin
 
 
 honey0303 wrote:
 
 Hi i'm trying to integrate jasper with struts 2..but i got an error
 because of my result type jasper 
 
 i've followed this tutorial..
 
 
 class=com.mevipro.test.action.JasperAction
  
 
 
 my question is how can i defined a jasper result type? 
 i need answers ASAP..Thanks in advance 
 
 
 
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/result-type-Jasper--Struts-2--tf3882770.html#a11006929
 Sent from the Struts - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 

 -
 Be a better Globetrotter. Get better travel answers from someone who
 knows.
 Yahoo! Answers - Check it out.
 

-- 
View this message in context: 
http://www.nabble.com/result-type-Jasper--Struts-2--tf3882770.html#a11413180
Sent from the Struts - User mailing list archive at Nabble.com.



Re: Validation dies because of request param array?

2007-07-03 Thread cilquirm

Do you have struts.devMode = true?

I had the same problem and I was forced to change struts.devMode = false

I believe this is a change from 2.0.6  ( and in some regards, a worse one at
that ).

I'm still investigating it, but please try turning devMode off and seeing if
it helps.



Scott Kingdon wrote:
 
 I am using Struts 2. I get this error whenever I turn on validation. The
 struts automatically returns the input page.
 
 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR [ParametersInterceptor]
 ParametersInterceptor - [setParameters]: Unexpected Exception catched:
 Error
 setting expression 'name' with value '[Ljava.lang.String;@188e507'
 
 There are several parameters that are being passed in to the action. It is
 only failing in this one. I have changed the name of the parameter. But
 the
 problem persists with that name.
 
 struts.xml action config includes this interceptor:
 interceptor-ref name=paramsPrepareParamsStack/
 
 If I remove the validation xml the problem goes away. But then I have lost
 validation. If I remove 'name' from the validation in the xml the problem
 is
 still there. That is, even if there is no mention of the 'name' parameter
 in
 the validation xml, I still get the error.
 
 I have other Actions that are configured the exact same way and work just
 fine.
 
 I have tried rebuilding from scratch. No fix there.
 
 It looks like somehow there is are two 'name' parameters being sent in. So
 struts is handling it with an array. To ensure this is struts I have sent
 requests to the server by pasting the url in the browser with only one
 name
 paramater. I still get the error.
 
 I feel like I have done everything but the one thing that will work.
 g!
 
 Any ideas?
 
 

-- 
View this message in context: 
http://www.nabble.com/Validation-dies-because-of-request-param-array--tf4018521.html#a11413408
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: Validation dies because of request param array?

2007-07-03 Thread cilquirm


I should correct myself. My problem may not be related, since it was due to
the CookieInterceptor's handling of setValue.

Can you post your pojo and your query string?



cilquirm wrote:
 
 Do you have struts.devMode = true?
 
 I had the same problem and I was forced to change struts.devMode = false
 
 I believe this is a change from 2.0.6  ( and in some regards, a worse one
 at that ).
 
 I'm still investigating it, but please try turning devMode off and seeing
 if it helps.
 
 
 
 Scott Kingdon wrote:
 
 I am using Struts 2. I get this error whenever I turn on validation. The
 struts automatically returns the input page.
 
 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR [ParametersInterceptor]
 ParametersInterceptor - [setParameters]: Unexpected Exception catched:
 Error
 setting expression 'name' with value '[Ljava.lang.String;@188e507'
 
 There are several parameters that are being passed in to the action. It
 is
 only failing in this one. I have changed the name of the parameter. But
 the
 problem persists with that name.
 
 struts.xml action config includes this interceptor:
 interceptor-ref name=paramsPrepareParamsStack/
 
 If I remove the validation xml the problem goes away. But then I have
 lost
 validation. If I remove 'name' from the validation in the xml the problem
 is
 still there. That is, even if there is no mention of the 'name' parameter
 in
 the validation xml, I still get the error.
 
 I have other Actions that are configured the exact same way and work just
 fine.
 
 I have tried rebuilding from scratch. No fix there.
 
 It looks like somehow there is are two 'name' parameters being sent in.
 So
 struts is handling it with an array. To ensure this is struts I have sent
 requests to the server by pasting the url in the browser with only one
 name
 paramater. I still get the error.
 
 I feel like I have done everything but the one thing that will work.
 g!
 
 Any ideas?
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Validation-dies-because-of-request-param-array--tf4018521.html#a11413932
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: How to convert a list of object to XML

2007-07-03 Thread Matthias Fischer

Hi,

From reading the javadoc in the org.apache.struts2.views.xslt package,
I believe yet another option would be to create a custom AdapterNode 
class for your Book object and register it with the XSLT AdapterFactory.  If 
I read it correctly, Struts2 would use your BookAdapterNode class to render 
the XML.  If you named your method, getBooks, this may give you the xml that you 
are looking for.
  
Does anyone of you understand how I can register the custom 
AdapterFactory? The Javadoc says I have to call the register method in 
AdapterFactory, but where in my code do I do this... where is it 
instantiated? Any ideas?


Matthias

--
---
Matthias Fischer   Fon: +49-7541-6047-148
doubleSlash Net-Business GmbH  Fax: +49-7541-6047-111
Müllerstr. 12 B[EMAIL PROTECTED]
D-88045 Friedrichshafenhttp://doubleSlash.de
---
doubleSlash Net-Business GmbH
Geschäftsführung: Konrad Krafft, Oliver Belikan, Jan Schubert
Sitz, Registergericht: Friedrichshafen, Amtsgericht Ulm HRB 631718
---



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



RE: [S2] Validation alias

2007-07-03 Thread Crocker, Patrick

The s:submit method= / approach definitely works for specifying
specific methods on the action, and actually works via the
org.apache.struts2.dispatcher.mapper.DefaultActionMapper class (the same
class that makes the s:submit action= / work).

Anyway, you are right about the different approaches creating different
aliases...  I changed my configuration to use the wildcard approach and
that DID work.

I *think* that the reason the s:form action=cruds:submit
method=save //s:form approach does not produce the desired
MyAction-crudsave-validation.xml match is that this approach does not
modify the actual action name and therefore only matches on
MyAction-crud-validation.xml.

For reference, here is my revised (working) configuration:

struts.xml:
---

package name=myPackage namespace=/myNamespace
extends=struts-default
  action name=index class=mySpringAction method=browse
result name=browse/WEB-INF/jsp/browse.jsp/result
interceptor-ref name=defaultStack /
interceptor-ref name=store
  param name=operationModeRETRIEVE/param
/interceptor-ref
  /action
  action name=crud_* class=mySpringAction method={1}
result name=input/WEB-INF/jsp/form.jsp/result
result name=success type=redirect-actionindex/result
result name=browse type=redirect-actionindex/result
result name=cancel type=redirect-actionindex/result
interceptor-ref name=defaultStack /
interceptor-ref name=store
  param name=operationModeSTORE/param
/interceptor-ref
  /action
/package

MySpringAction.java:

public class MySpringAction extends ActionSupport {

  public String browse() throws Exception {
// do some stuff
return BROWSE;
  }

  public String input() throws Exception {
// do some stuff
return INPUT;
  }

  public String save() throws Exception {
// do some stuff
return SUCCESS;
  }

  public String delete() throws Exception {
// do some stuff
return SUCCESS;
  }

  public String cancel() throws Exception {
// do some stuff
return CANCEL;
  }
}

form.jsp:
-
s:form action=crud
  !-- form stuff in here --
  s:submit action=crud_save /
  s:submit action=crud_delete /
  s:submit action=crud_cancel /
/s:form

validation file(s):
---
MySpringAction-crud_save-validation.xml

So, what was the goal of all this?
--
When the Save button is pressed, the form is validated using
MySpringAction-crud_save-validation.xml.  When the Delete or
Cancel buttons are pressed, no validation is performed.  however, if
validation was needed for these, validation files could be created for
them: MySpringAction-crud_delete-validation.xml and
MySpringAction-crud_cancel-validation.xml, respectively.

Thanks for your help Jeromy!

- Patrick Crocker.


-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 02, 2007 6:04 PM
To: Struts Users Mailing List
Subject: Re: [S2] Validation alias

Crocker, Patrick wrote:
 Unfortunately, I can't get that 
 (MySpringAction-crudsave-validation.xml)
 to work.  The validation never fires.  Am I missing something, or just

 barking up the wrong tree all-together?

   
The last time I checked you had to use the wildcard approach to call
methods in your action rather than via the method= attribute in the
form.  At the very least, the two different methods create different
aliases that the validation interceptor searches for and the
documentation describes the former approach.

ie. This will find MySpringAction-crudsave-validation.xml

action name=crud* class=mySpringAction method={1}

...

s:form action=crud
  !-- form stuff in here... --
  s:submit action=crudsave /
/s:form


I never investigated what the validation filename should be for the
method= approach, sorry, but this will get you closer.



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




***
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***

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



Re: [S2] FCKeditor

2007-07-03 Thread Andrew Stepanenko

Hi Mark,

I would be interested in richtexteditor tag based on FCKeditor in
Struts2. Currently I ported the richtexteditor tag from WebWork to
some older Struts2 build. So if you can provide a convenient way,
which would allow upgrading the core lib while using the same plugin,
or if the plugin would be updated together with the core lib, that
would be great!

Regards,
--
Andrew Stepanenko,
Software engineer,
Ukrainian-Dutch Faculty of Economics and Management
Ternopil State Economic University
Shevchenko Street 9, Ternopil, 46000 UKRAINE
Web: http://unf.tane.edu.ua


On 7/3/07, Mark P Ashworth [EMAIL PROTECTED] wrote:


Good Day,

I am busy updating my Struts 2 plug-in that contains a tag for the Open
Flash Chart component and I was wondering if anybody would be interested in
a tag for the popular FCKeditor component?

I have the basic editor working and based upon response will make it
available in the Connext-Graph plug-in.

Regards,
Mark P Ashworth
http://ww.connext.co.za
--
View this message in context: 
http://www.nabble.com/-S2--FCKeditor-tf4017623.html#a11410028
Sent from the Struts - User mailing list archive at Nabble.com.


-
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: Validation dies because of request param array?

2007-07-03 Thread Scott Kingdon

By making that change the error has gone away. However it is now silently
dying for some other reason. I need to track that down. If I have more
problems I will post the code.



On 7/3/07, cilquirm [EMAIL PROTECTED] wrote:




I should correct myself. My problem may not be related, since it was due
to
the CookieInterceptor's handling of setValue.

Can you post your pojo and your query string?



cilquirm wrote:

 Do you have struts.devMode = true?

 I had the same problem and I was forced to change struts.devMode = false

 I believe this is a change from 2.0.6  ( and in some regards, a worse
one
 at that ).

 I'm still investigating it, but please try turning devMode off and
seeing
 if it helps.



 Scott Kingdon wrote:

 I am using Struts 2. I get this error whenever I turn on validation.
The
 struts automatically returns the input page.

 07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR [ParametersInterceptor]
 ParametersInterceptor - [setParameters]: Unexpected Exception catched:
 Error
 setting expression 'name' with value '[Ljava.lang.String;@188e507'

 There are several parameters that are being passed in to the action. It
 is
 only failing in this one. I have changed the name of the parameter. But
 the
 problem persists with that name.

 struts.xml action config includes this interceptor:
 interceptor-ref name=paramsPrepareParamsStack/

 If I remove the validation xml the problem goes away. But then I have
 lost
 validation. If I remove 'name' from the validation in the xml the
problem
 is
 still there. That is, even if there is no mention of the 'name'
parameter
 in
 the validation xml, I still get the error.

 I have other Actions that are configured the exact same way and work
just
 fine.

 I have tried rebuilding from scratch. No fix there.

 It looks like somehow there is are two 'name' parameters being sent in.
 So
 struts is handling it with an array. To ensure this is struts I have
sent
 requests to the server by pasting the url in the browser with only one
 name
 paramater. I still get the error.

 I feel like I have done everything but the one thing that will work.
 g!

 Any ideas?





--
View this message in context:
http://www.nabble.com/Validation-dies-because-of-request-param-array--tf4018521.html#a11413932
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: [S2] Do AJAX features work?

2007-07-03 Thread Kenton

Of course, I am using the embedded version of Dojo that is served by the
Struts servlet. I didn't modify that.

I was using Dojo downloads in a separate experiment, where I was trying to
get Dojo to work with some static web pages, so that I could understand the
Dojo library and debug the issue.

I tried adding the div tag, but that didn't help. I'm getting the mentioned
errors when I simply load the page. I'm not even to the point of debugging
the the actual AJAX button/link themselves.


Jeromy Evans - Blue Sky Minds wrote:
 
 
 s:submit type=button theme=ajax targets=div1 label=Submit
 Button/ 
 The submit won't work because div1 doesn't exist.  The s:a should 
 work though.
 
 I don't recognise the error messages you're getting.  If you're 
 installed an copy of Dojo, remove it and use the version shipped within 
 struts.  You can't use the struts tags with dojo 0.9.
 The basic examples on the wiki all still work in IE and FF, I tried them 
 all again just recently.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Do-AJAX-features-work--tf4013653.html#a11416558
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: [S2] Do AJAX features work?

2007-07-03 Thread Kenton

This is perfect.

I've investigated the Yui library and it looks perfect. It has all the
functionality I need, the documentation is great, and the examples work
perfectly. I haven't had time to integrate with Struts and use the mentioned
plugin, but that's definitely on my list.

That's also great news about Struts 2.1.

Thank you Musachy. I'm very happy. Issue resolved.


Musachy Barroso wrote:
 
 On 2.0 you would be stuck with Dojo(which seems to be the source of your
 problems), for 2.1 Dojo will be on it's own plugin so you won't have to
 carry it around. As for using other libraries, you just need to stay away
 from the ajax theme, and include  the javascript files in your app. Some
 work is going on the YUI plugin, but there are only 2 tags, and it is
 quite
 new :)
 
 http://cwiki.apache.org/S2PLUGINS/yui-plugin.html
 
 musachy
 
 On 7/2/07, Kenton [EMAIL PROTECTED] wrote:


 Struts: 2.0.8
 Browser: Firefox 2.0.0.4
 App Server: Glassfish v2 beta 2
 OS: Windows XP SP2

 I'm trying to add some simple AJAX functionality to my Struts 2
 application.

 I've copy/pasted a few snippets from the Struts 2 documentation. I've
 tried
 several variations on this:

 head
 titleTest/title

 s:head theme=ajax debug=true/
 /head

 body
 h2This is a test page/h2

 p
 s:form id=form action=AJAXTest
 s:submit type=button
 theme=ajax targets=div1 label=Submit
 Button/

 s:a theme=ajaxSubmit
 form/s:a
 /s:form
 /p
 /body

 When I try this, I see the following in my browser:

 DEBUG:  dojo.widget.Parse: error:TypeError: impl is not a constructor
 DEBUG:  dojo.widget.Parse: error:TypeError: impl is not a constructor

 I also see this in the Firefox JavaScript error console:

 Error: uncaught exception: [Exception... Object cannot be created in
 this
 context  code: 9 nsresult: 0x80530009
 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)
 location: http://localhost:8080/vgstats/struts/dojo/src/browser_debug.js
 Line: 168]

 Anyone have any ideas?

 Also, I've tried to get some static web apps working with Dojo in hopes
 that
 I could better understand the Dojo library and possibly debug this. I've
 tried both the 0.4.3 and 0.9M2 releases and have had a variety of
 problems
 with both. Also, the online demos are broken and the documentation is
 exceptionally poor (grammar errors, many omissions, unprofessional
 writing).

 Can I use any of Struts 2 AJAX features with a JavaScript library other
 than
 Dojo? I have used Prototype/Scriptaculous in the past and it was
 extremely
 easy. I'd also be happy with YUI or any other alternative.

 --
 View this message in context:
 http://www.nabble.com/-S2--Do-AJAX-features-work--tf4013653.html#a11398152
 Sent from the Struts - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Hey you! Would you help me to carry the stone? Pink Floyd
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Do-AJAX-features-work--tf4013653.html#a11416630
Sent from the Struts - User mailing list archive at Nabble.com.


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



Excellent Struts 2 Tutorial

2007-07-03 Thread stanlick

Guys --

After reading about everything I could get my hands on and looping through
the code-build-deploy-try cycle until dizzy, I decided to drop $29.00 on
the comprehensive S2 tutorial available at
ArcTechhttp://www.arctechsoftware.com/tutorial/

The tutorial was clearly designed with the developer in mind.  For instance,
when you reach a place where you need to make changes to a seemingly
unrelated bit of configuration, rather than leave you hanging, the author
ties the pieces together right then and there.  When snapping so many
technologies together (Struts, Spring, Hibernate, Database, Server,
Transactions, etc.) it's easy to leave the reader hanging in an ambiguous
state.  Not only does the author use a complete application, but he also
provides actual support!  That's right -- support!  After studying his
technique, I set off to develop a proof of concept Struts 2 application for
my employer.  Naturally, I had a few misunderstandings right out of the
gate.  I figured, having paid real money for this tutorial, perhaps I get
get the tutorial company to throw me a clue as to why my code wasn't working
quite right.  After sending them several configuration files (on a Sunday
afternoon nonetheless) I received an email with the lines of code that were
wrong.  I had the application running before the evening news!

I know many of you are struggling just like I was with all the puzzle pieces
that are Struts 2.  If your time is worth minimum wage, you owe it to
yourself to drop the $29.00 bucks for this tutorial and hit the ground
running!


--
Scott
[EMAIL PROTECTED]


RE: Excellent Struts 2 Tutorial

2007-07-03 Thread Wesley Wannemacher
It's funny that you mention this, I just finished a set of articles on
Struts2. I would appreciate feedback if you don't mind reading it...
Hopefully I can help out some newbs.

http://www.wantii.com/wordpress/?cat=3

-Wes 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 03, 2007 1:14 PM
To: Struts Users Mailing List
Subject: Excellent Struts 2 Tutorial

Guys --

After reading about everything I could get my hands on and looping
through the code-build-deploy-try cycle until dizzy, I decided to drop
$29.00 on the comprehensive S2 tutorial available at
ArcTechhttp://www.arctechsoftware.com/tutorial/

The tutorial was clearly designed with the developer in mind.  For
instance, when you reach a place where you need to make changes to a
seemingly unrelated bit of configuration, rather than leave you hanging,
the author ties the pieces together right then and there.  When snapping
so many technologies together (Struts, Spring, Hibernate, Database,
Server, Transactions, etc.) it's easy to leave the reader hanging in an
ambiguous state.  Not only does the author use a complete application,
but he also provides actual support!  That's right -- support!  After
studying his technique, I set off to develop a proof of concept Struts 2
application for my employer.  Naturally, I had a few misunderstandings
right out of the gate.  I figured, having paid real money for this
tutorial, perhaps I get get the tutorial company to throw me a clue as
to why my code wasn't working quite right.  After sending them several
configuration files (on a Sunday afternoon nonetheless) I received an
email with the lines of code that were wrong.  I had the application
running before the evening news!

I know many of you are struggling just like I was with all the puzzle
pieces that are Struts 2.  If your time is worth minimum wage, you owe
it to yourself to drop the $29.00 bucks for this tutorial and hit the
ground running!


--
Scott
[EMAIL PROTECTED]

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



Re: Excellent Struts 2 Tutorial

2007-07-03 Thread Musachy Barroso

Adding a link here will help people find it ;)

http://struts.apache.org/2.x/docs/tutorials.html

musachy

On 7/3/07, Wesley Wannemacher [EMAIL PROTECTED] wrote:


It's funny that you mention this, I just finished a set of articles on
Struts2. I would appreciate feedback if you don't mind reading it...
Hopefully I can help out some newbs.

http://www.wantii.com/wordpress/?cat=3

-Wes

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 03, 2007 1:14 PM
To: Struts Users Mailing List
Subject: Excellent Struts 2 Tutorial

Guys --

After reading about everything I could get my hands on and looping
through the code-build-deploy-try cycle until dizzy, I decided to drop
$29.00 on the comprehensive S2 tutorial available at
ArcTechhttp://www.arctechsoftware.com/tutorial/

The tutorial was clearly designed with the developer in mind.  For
instance, when you reach a place where you need to make changes to a
seemingly unrelated bit of configuration, rather than leave you hanging,
the author ties the pieces together right then and there.  When snapping
so many technologies together (Struts, Spring, Hibernate, Database,
Server, Transactions, etc.) it's easy to leave the reader hanging in an
ambiguous state.  Not only does the author use a complete application,
but he also provides actual support!  That's right -- support!  After
studying his technique, I set off to develop a proof of concept Struts 2
application for my employer.  Naturally, I had a few misunderstandings
right out of the gate.  I figured, having paid real money for this
tutorial, perhaps I get get the tutorial company to throw me a clue as
to why my code wasn't working quite right.  After sending them several
configuration files (on a Sunday afternoon nonetheless) I received an
email with the lines of code that were wrong.  I had the application
running before the evening news!

I know many of you are struggling just like I was with all the puzzle
pieces that are Struts 2.  If your time is worth minimum wage, you owe
it to yourself to drop the $29.00 bucks for this tutorial and hit the
ground running!


--
Scott
[EMAIL PROTECTED]

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





--
Hey you! Would you help me to carry the stone? Pink Floyd


RE: Excellent Struts 2 Tutorial

2007-07-03 Thread Wesley Wannemacher
Sweet! I appreciate it!

-Wes 

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 03, 2007 3:22 PM
To: Struts Users Mailing List
Subject: Re: Excellent Struts 2 Tutorial

Adding a link here will help people find it ;)

http://struts.apache.org/2.x/docs/tutorials.html

musachy

On 7/3/07, Wesley Wannemacher [EMAIL PROTECTED] wrote:

 It's funny that you mention this, I just finished a set of articles on

 Struts2. I would appreciate feedback if you don't mind reading it...
 Hopefully I can help out some newbs.

 http://www.wantii.com/wordpress/?cat=3

 -Wes

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 03, 2007 1:14 PM
 To: Struts Users Mailing List
 Subject: Excellent Struts 2 Tutorial

 Guys --

 After reading about everything I could get my hands on and looping 
 through the code-build-deploy-try cycle until dizzy, I decided to 
 drop $29.00 on the comprehensive S2 tutorial available at 
 ArcTechhttp://www.arctechsoftware.com/tutorial/

 The tutorial was clearly designed with the developer in mind.  For 
 instance, when you reach a place where you need to make changes to a 
 seemingly unrelated bit of configuration, rather than leave you 
 hanging, the author ties the pieces together right then and there.  
 When snapping so many technologies together (Struts, Spring, 
 Hibernate, Database, Server, Transactions, etc.) it's easy to leave 
 the reader hanging in an ambiguous state.  Not only does the author 
 use a complete application, but he also provides actual support!  
 That's right -- support!  After studying his technique, I set off to 
 develop a proof of concept Struts 2 application for my employer.  
 Naturally, I had a few misunderstandings right out of the gate.  I 
 figured, having paid real money for this tutorial, perhaps I get get 
 the tutorial company to throw me a clue as to why my code wasn't 
 working quite right.  After sending them several configuration files 
 (on a Sunday afternoon nonetheless) I received an email with the lines

 of code that were wrong.  I had the application running before the
evening news!

 I know many of you are struggling just like I was with all the puzzle 
 pieces that are Struts 2.  If your time is worth minimum wage, you owe

 it to yourself to drop the $29.00 bucks for this tutorial and hit the 
 ground running!


 --
 Scott
 [EMAIL PROTECTED]

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




--
Hey you! Would you help me to carry the stone? Pink Floyd

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



Checkboxes problem

2007-07-03 Thread Andreja

I have a form that contains over a 100 checkboxes. They have unique
names, and I need to populate them from (Array)List. As a result, I
also need a ArrayList of Strings that contains only elements that user
has checked.

I did so by using LinkedHashMap and tag s:checkboxlist, but I can not
make checkboxes each one in a NEW row. Insted, they are listed one
after another, and that makes the form very ugly and hard to use. I
don't think I need to make a custom template just for this single
purpose.

I tried to use s:checkbox in the s:iterator loop with the same
LinkedHashMap, but I didn't manage to get (array)list of Strings as a
result. Insted I got [true, true, true...] list of booleans, and that
is something I can make usefull data from.

Finnaly, I tried something like this (srvServers is an ArrayListString):

 s:iterator value=srvServers status=id
 s:checkbox name=srvServers[${id}]/ s:property /
   br
 /s:iterator

but without result. :(
Is there a way to do this (populate many checkboxes, and get
ArrayListString as a result?

Thanks!

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



Re: Validator does not validate!

2007-07-03 Thread Ramon Xuriguera i Albareda

I don't know exactly what the problem was. After spending lots of
hours in front of the computer it worked!

I think the problem had something to do with what you say or, probably
with the exception I define in the action mapping.

Anyway, thanks.

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



Re: Validation dies because of request param array?

2007-07-03 Thread Scott Kingdon

I am thinking that this did not solve the problem, but rather squelched the
only message that gave me a clue as to what might be happening.

So back to the original problem. Here is the struts config:

action name=Profile class= com.ourcompany.struts.action.profile.Profile

  result name=input/WEB-INF/pages/profile/editProfile.jsp/result
  result name=error/WEB-INF/pages/error.jsp/result
/action

Here is the class:

public class ProfileAddress extends Profile {

   private static final long serialVersionUID = 1L;

   private String street1;
   private String street2;
   private String city;
   private String state;
   private String zip;
   private String phone;
   private String securityQuestion;
   private String securityQuestionAnswer;
   private Integer addressIndex;

   public String doSave() throws Exception {

   log.info(save address!);

   return SUCCESS;
   }

   public String getCity() {
   return city;
   }

   public void setCity(String city) {
   this.city = city;
   }

   public String getPhone() {
   return phone;
   }

   public void setPhone(String phone) {
   this.phone = phone;
   }

   public String getSecurityQuestion() {
   return securityQuestion;
   }

   public void setSecurityQuestion(String securityQuestion) {
   this.securityQuestion = securityQuestion;
   }

   public String getSecurityQuestionAnswer() {
   return securityQuestionAnswer;
   }

   public void setSecurityQuestionAnswer(String securityQuestionAnswer) {
   this.securityQuestionAnswer = securityQuestionAnswer;
   }

   public String getState() {
   return state;
   }

   public void setState(String state) {
   this.state = state;
   }

   public String getStreet1() {
   return street1;
   }

   public void setStreet1(String street1) {
   this.street1 = street1;
   }

   public String getStreet2() {
   return street2;
   }

   public void setStreet2(String street2) {
   this.street2 = street2;
   }

   public String getZip() {
   return zip;
   }

   public void setZip(String zip) {
   this.zip = zip;
   }

   public Integer getAddressIndex() {
   return addressIndex;
   }

   public void setAddressIndex(Integer addressIndex) {
   this.addressIndex = addressIndex;
   }
}


As much as I like Struts 2, I am having a hard time debugging why some
interceptors fail. There is no error message. Nothing. It just returns the
input page.

==

On 7/3/07, Scott Kingdon [EMAIL PROTECTED] wrote:


By making that change the error has gone away. However it is now silently
dying for some other reason. I need to track that down. If I have more
problems I will post the code.



On 7/3/07, cilquirm  [EMAIL PROTECTED] wrote:



 I should correct myself. My problem may not be related, since it was due
 to
 the CookieInterceptor's handling of setValue.

 Can you post your pojo and your query string?



 cilquirm wrote:
 
  Do you have struts.devMode = true?
 
  I had the same problem and I was forced to change struts.devMode =
 false
 
  I believe this is a change from 2.0.6  ( and in some regards, a worse
 one
  at that ).
 
  I'm still investigating it, but please try turning devMode off and
 seeing
  if it helps.
 
 
 
  Scott Kingdon wrote:
 
  I am using Struts 2. I get this error whenever I turn on validation.
 The
  struts automatically returns the input page.
 
  07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR
 [ParametersInterceptor]
  ParametersInterceptor - [setParameters]: Unexpected Exception
 catched:
  Error
  setting expression 'name' with value '[Ljava.lang.String;@188e507'
 
  There are several parameters that are being passed in to the action.
 It
  is
  only failing in this one. I have changed the name of the parameter.
 But
  the
  problem persists with that name.
 
  struts.xml action config includes this interceptor:
  interceptor-ref name=paramsPrepareParamsStack/
 
  If I remove the validation xml the problem goes away. But then I have
  lost
  validation. If I remove 'name' from the validation in the xml the
 problem
  is
  still there. That is, even if there is no mention of the 'name'
 parameter
  in
  the validation xml, I still get the error.
 
  I have other Actions that are configured the exact same way and work
 just
  fine.
 
  I have tried rebuilding from scratch. No fix there.
 
  It looks like somehow there is are two 'name' parameters being sent
 in.
  So
  struts is handling it with an array. To ensure this is struts I have
 sent
  requests to the server by pasting the url in the browser with only
 one
  name
  paramater. I still get the error.
 
  I feel like I have done everything but the one thing that will work.
  g!
 
  Any ideas?
 
 
 
 

 --
 View this message in context:
 
http://www.nabble.com/Validation-dies-because-of-request-param-array--tf4018521.html#a11413932
 Sent from the Struts - User mailing list archive at 

RE: Validation dies because of request param array?

2007-07-03 Thread Crocker, Patrick
Shouldn't your action class be set to
com.ourcompany.struts.action.profile.ProfileAddress?

Aside from that, can you share the editProfile.jsp file?

- Patrick.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Scott Kingdon
Sent: Tuesday, July 03, 2007 3:15 PM
To: Struts Users Mailing List
Subject: Re: Validation dies because of request param array?

I am thinking that this did not solve the problem, but rather squelched
the only message that gave me a clue as to what might be happening.

So back to the original problem. Here is the struts config:

action name=Profile class=
com.ourcompany.struts.action.profile.Profile

   result
name=input/WEB-INF/pages/profile/editProfile.jsp/result
   result name=error/WEB-INF/pages/error.jsp/result
/action

Here is the class:

public class ProfileAddress extends Profile {

private static final long serialVersionUID = 1L;

private String street1;
private String street2;
private String city;
private String state;
private String zip;
private String phone;
private String securityQuestion;
private String securityQuestionAnswer;
private Integer addressIndex;

public String doSave() throws Exception {

log.info(save address!);

return SUCCESS;
}

public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

public String getPhone() {
return phone;
}

public void setPhone(String phone) {
this.phone = phone;
}

public String getSecurityQuestion() {
return securityQuestion;
}

public void setSecurityQuestion(String securityQuestion) {
this.securityQuestion = securityQuestion;
}

public String getSecurityQuestionAnswer() {
return securityQuestionAnswer;
}

public void setSecurityQuestionAnswer(String securityQuestionAnswer)
{
this.securityQuestionAnswer = securityQuestionAnswer;
}

public String getState() {
return state;
}

public void setState(String state) {
this.state = state;
}

public String getStreet1() {
return street1;
}

public void setStreet1(String street1) {
this.street1 = street1;
}

public String getStreet2() {
return street2;
}

public void setStreet2(String street2) {
this.street2 = street2;
}

public String getZip() {
return zip;
}

public void setZip(String zip) {
this.zip = zip;
}

public Integer getAddressIndex() {
return addressIndex;
}

public void setAddressIndex(Integer addressIndex) {
this.addressIndex = addressIndex;
}
}


As much as I like Struts 2, I am having a hard time debugging why some
interceptors fail. There is no error message. Nothing. It just returns
the input page.

==

On 7/3/07, Scott Kingdon [EMAIL PROTECTED] wrote:

 By making that change the error has gone away. However it is now 
 silently dying for some other reason. I need to track that down. If I 
 have more problems I will post the code.

 

 On 7/3/07, cilquirm  [EMAIL PROTECTED] wrote:
 
 
 
  I should correct myself. My problem may not be related, since it was

  due to the CookieInterceptor's handling of setValue.
 
  Can you post your pojo and your query string?
 
 
 
  cilquirm wrote:
  
   Do you have struts.devMode = true?
  
   I had the same problem and I was forced to change struts.devMode =
  false
  
   I believe this is a change from 2.0.6  ( and in some regards, a 
   worse
  one
   at that ).
  
   I'm still investigating it, but please try turning devMode off and
  seeing
   if it helps.
  
  
  
   Scott Kingdon wrote:
  
   I am using Struts 2. I get this error whenever I turn on
validation.
  The
   struts automatically returns the input page.
  
   07:42:11,349 INFO  [STDOUT] 07:42:11,349 ERROR
  [ParametersInterceptor]
   ParametersInterceptor - [setParameters]: Unexpected Exception
  catched:
   Error
   setting expression 'name' with value
'[Ljava.lang.String;@188e507'
  
   There are several parameters that are being passed in to the
action.
  It
   is
   only failing in this one. I have changed the name of the
parameter.
  But
   the
   problem persists with that name.
  
   struts.xml action config includes this interceptor:
   interceptor-ref name=paramsPrepareParamsStack/
  
   If I remove the validation xml the problem goes away. But then I 
   have lost validation. If I remove 'name' from the validation in 
   the xml the
  problem
   is
   still there. That is, even if there is no mention of the 'name'
  parameter
   in
   the validation xml, I still get the error.
  
   I have other Actions that are configured the exact same way and 
   work
  just
   fine.
  
   I have tried rebuilding from scratch. No fix there.
  
   It looks like 

Re: Validation dies because of request param array?

2007-07-03 Thread Scott Kingdon

Ah. Yes. And it was. I have gone on and found a work around using dynamic
methods, so it got changed. Dynamic methods is actually working. But the old
version using ProfileAddress did not.

Here is the form part of editProfile.jsp:

s:iterator value=account.locations status=status 
   div class=address
   div id=texts:property
value=#status.index/
   pspan class=uni-bolds:property
value=name//span a href=javascript:showAddressForm('s:property
value=#status.index/')edit/a/p
   ps:property value=street1//p
   ps:property value=street2//p
   ps:property value=city/,
s:property value=state/ s:property value=zip //p
   ps:property value=phone//p
   /div
   div id=forms:property
value=#status.index/ class=uni-hidden
   s:form action=SaveProfileAddress
id=addressForm${status.index} cssClass=cssform theme=simple
   plabel
for=nameName:/labels:textfield key=name//p
   plabel for=street1Street Line
1:/labels:textfield key=street1//p
   plabel for=street2Stree Line
2:/labels:textfield key=street2//p
   plabel
for=street1City:/labels:textfield key=city//p
   plabel
for=stateState:/labels:textfield key=state size=2//p
   plabel
for=zipZip:/labels:textfield key=zip//p
   plabel
for=phonePhone:/labels:textfield key=phone//p
   p
   input type=hidden
name=addressIndex value=s:property value=#status.index/ /
   input type=button
value=Save onclick=UserProfile.saveAddress(s:property
value=#status.index/)/
   input type=button
value=Cancel onclick=hideAddressForm('s:property
value=#status.index/')/
   /p
   /s:form
   /div
   /div
   /s:iterator



On 7/3/07, Crocker, Patrick [EMAIL PROTECTED] wrote:


Shouldn't your action class be set to
com.ourcompany.struts.action.profile.ProfileAddress?

Aside from that, can you share the editProfile.jsp file?

- Patrick.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Scott Kingdon
Sent: Tuesday, July 03, 2007 3:15 PM
To: Struts Users Mailing List
Subject: Re: Validation dies because of request param array?

I am thinking that this did not solve the problem, but rather squelched
the only message that gave me a clue as to what might be happening.

So back to the original problem. Here is the struts config:

action name=Profile class=
com.ourcompany.struts.action.profile.Profile

   result
name=input/WEB-INF/pages/profile/editProfile.jsp/result
   result name=error/WEB-INF/pages/error.jsp/result
/action

Here is the class:

public class ProfileAddress extends Profile {

private static final long serialVersionUID = 1L;

private String street1;
private String street2;
private String city;
private String state;
private String zip;
private String phone;
private String securityQuestion;
private String securityQuestionAnswer;
private Integer addressIndex;

public String doSave() throws Exception {

log.info(save address!);

return SUCCESS;
}

public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

public String getPhone() {
return phone;
}

public void setPhone(String phone) {
this.phone = phone;
}

public String getSecurityQuestion() {
return securityQuestion;
}

public void setSecurityQuestion(String securityQuestion) {
this.securityQuestion = securityQuestion;
}

public String getSecurityQuestionAnswer() {
return securityQuestionAnswer;
}

public void setSecurityQuestionAnswer(String securityQuestionAnswer)
{
this.securityQuestionAnswer = securityQuestionAnswer;
}

public String getState() {
return state;
}

public void setState(String state) {
this.state = state;
}

public String getStreet1() {
return street1;
}

public void setStreet1(String street1) {
this.street1 = street1;
}

public String getStreet2() {
return street2;
}

public void setStreet2(String street2) {
this.street2 = street2;
}

public String getZip() {

Re: Spring Injected Preparer

2007-07-03 Thread Sean Conlon

I have not read all the related posts, so this may have already been said,
but the Controller concept is not specific to Struts-Tiles.  It is simply
the C within the MVC pattern, which many technologies (i.e. Struts,
Spring) use.


On 7/2/07, Antonio Petrelli [EMAIL PROTECTED] wrote:


2007/6/28, stanlick [EMAIL PROTECTED]:


 Does this work with Struts 2?



Mmm... I don't think so... Controller is a concept of Struts-Tiles.

Antonio



Re: [S2] FCKeditor

2007-07-03 Thread Mark P Ashworth

Good Day,

It will be a plug-in to the Struts 2 core. An example of the tag would be 

To include the FCKEditor javascript library, you will do the following in
the head section of your page.

lt;m:headgt;

And then in the form you would do the following

lt;m:fckeditor key=project.description /gt;

The FCKEditorTag extends the TextareaTag, so what ever parameters you can
send to a textarea you can do with the FCKEditorTag.

Currently the only problem is loading the fckstyles.xml and fcktemplate.xml
from the plug-in jar but I am sure I'll get that working shortly.

Regards,
Mark P Ashworth
http://www.connext.co.za



astepanenko wrote:
 
 Hi Mark,
 
 I would be interested in richtexteditor tag based on FCKeditor in
 Struts2. Currently I ported the richtexteditor tag from WebWork to
 some older Struts2 build. So if you can provide a convenient way,
 which would allow upgrading the core lib while using the same plugin,
 or if the plugin would be updated together with the core lib, that
 would be great!
 
 Regards,
 -- 
 Andrew Stepanenko,
 Software engineer,
 Ukrainian-Dutch Faculty of Economics and Management
 Ternopil State Economic University
 Shevchenko Street 9, Ternopil, 46000 UKRAINE
 Web: http://unf.tane.edu.ua
 
 
 On 7/3/07, Mark P Ashworth [EMAIL PROTECTED] wrote:

 Good Day,

 I am busy updating my Struts 2 plug-in that contains a tag for the Open
 Flash Chart component and I was wondering if anybody would be interested
 in
 a tag for the popular FCKeditor component?

 I have the basic editor working and based upon response will make it
 available in the Connext-Graph plug-in.

 Regards,
 Mark P Ashworth
 http://ww.connext.co.za
 --
 View this message in context:
 http://www.nabble.com/-S2--FCKeditor-tf4017623.html#a11410028
 Sent from the Struts - User mailing list archive at Nabble.com.


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

-- 
View this message in context: 
http://www.nabble.com/-S2--FCKeditor-tf4017623.html#a11424322
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: Checkboxes problem

2007-07-03 Thread sharad bhushan
Hi,

Just a suggestion Why dont you have the common name for all check box holding 
the different values.How ever you may loose the struts2-checkbox 
feature(checkbox state) by doing this.YOu can populate the values of the 
checkbox in to a bean and use the across.

Regards
Sharad




Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php