Re: Dynamic parameters in struts.xml

2007-05-02 Thread Marcin Zduniak

Thank you. I actually solved the problem. When I added another one parameter:

param name=parsetrue/param

myParameter5 started working.

Thanks.

Marcin

On 5/2/07, Laurie Harper [EMAIL PROTECTED] wrote:

Marcin Zduniak wrote:
 Hello everyone,

  I am using Struts2 and I am curious how to pass dynamic parameter
 values to an action. I have following XML snippet:

 action name=otherDeposite
 class=com.zduniak.web.actions.OtherDepositeAction
 result name=back type=redirect-action
 param name=actionNameaccountsList/param
 /result
 result name=next type=redirect-action
 param name=actionNameaccountsList/param
 param name=myParametermyValue/param
 param name=myParameter2{#myValue}/param
 param name=myParameter3{myValue}/param
 param name=myParameter4%{myValue}/param
 param name=myParameter5${myValue}/param
 param name=myParameter6%{#myValue}/param
 /result
 result name=input/jsp/otherDeposite.jsp/result
 /action

 myValue is a getter method in OtherDepositeAction action class.
 Unfortunately none of these expressions are properly exchanged into
 value from myValue property.

 Is there any solution to passing dynamic parameters while redirecting
 to another action ?

I believe the parameters should become part of the query string for the
redirect, which should work. The correct form is what you have for
myParameter5, i.e. the '${myValue}' form.

Are you sure your getter is correctly specified and returning a
non-null, non-empty value? Is the action definitely returning a result
of 'next'? What happens if you don't use a redirect?

L.


--
Marcin Zduniak[EMAIL PROTECTED]
+ 48 600 27 88 66 http://www.zduniak.com

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



javax.servlet.jsp.JspException: No getter method available for property

2007-05-02 Thread prasad kumar
I am trying to populate an html drop down with the Struts select and options 
tags.  The
cancelList bean referenced in the collection is an ArrayList of struts 
LabelValue beans. 
Here is the tag snippet:
 bean:define id=cancelList property=cancel name=detailsForm 
/
html:select property = cancelReason 
option value = --Select--/option
html:options collection=cancelList property=myValue 
labelProperty=myLabel /
 /html:select
  The stack trace(below) indicates that the Struts options tag is trying to 
call 
getMyValue()
method on the list object itself.  Omitting the property and labelProperty 
attributs of the
tag results in the Object toString() being invoked with the correct values of 
the labal and
value properties of the LabelValue Bean.
  Any assistance is much appreciated.

   
-
 Check out what you're missing if you're not on Yahoo! Messenger 

javax.servlet.jsp.JspException: No getter method available for property

2007-05-02 Thread prasad kumar
I am trying to populate an html drop down with the Struts select and options 
tags.  The
cancelList bean referenced in the collection is an ArrayList of struts 
LabelValue beans. 
Here is the tag snippet:
 bean:define id=cancelList property=cancel name=detailsForm 
/
html:select property = cancelReason 
option value = --Select--/option
html:options collection=cancelList property=myValue 
labelProperty=myLabel /
 /html:select
  The stack trace(below) indicates that the Struts options tag is trying to 
call 
getMyValue()
method on the list object itself.  Omitting the property and labelProperty 
attributs of the
tag results in the Object toString() being invoked with the correct values of 
the labal and
value properties of the LabelValue Bean.
  Any assistance is much appreciated.

   
-
 Check out what you're missing if you're not on Yahoo! Messenger 

Invalid for tag html according to TLD

2007-05-02 Thread wong wayne
Dear All

I'm new to Struts and building a prototype with
struts, ,hibernate and spring follow the instruction
at
http://www.roseindia.net/struts/hibernate-spring/index.shtml

When I execute the example, exception generated
(Attribute locale invalid for tag html according to
TLD). After I remove the locale tag (html:html
locale=true - html:html) at jsp, this example works
fine. I have no idea for this error, can somebody give
me some hints? Thanks. 

Attached please find jsp and struts configuration file
for your reference.

regards

wayne



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
  -//Apache Software Foundation//DTD Struts Configuration 1.2//EN
  http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd;

!--
 This is a blank Struts configuration file with an example
 welcome action/page and other commented sample elements.

 Tiles and the Struts Validator are configured using the factory defaults
 and are ready-to-use.

 NOTE: If you have a generator tool to create the corresponding Java classes
 for you, you could include the details in the form-bean declarations.
 Otherwise, you would only define the form-bean element itself, with the
 corresponding name and type attributes, as shown here.
--


struts-config

!--  Data Source Configuration --
!--
data-sources
data-source type=org.apache.commons.dbcp.BasicDataSource
set-property
  property=driverClassName
  value=org.postgresql.Driver /
set-property
  property=url
  value=jdbc:postgresql://localhost/mydatabase /
set-property
  property=username
  value=me /
set-property
  property=password
  value=test /
set-property
  property=maxActive
  value=10 /
set-property
  property=maxWait
  value=5000 /
set-property
  property=defaultAutoCommit
  value=false /
set-property
  property=defaultReadOnly
  value=false /
set-property
  property=validationQuery
  value=SELECT COUNT(*) FROM market /
/data-source
/data-sources
--

!--  Form Bean Definitions --

form-beans
  !-- sample form bean descriptor for an ActionForm
form-bean
name=inputForm
type=app.InputForm/
end sample --

!-- sample form bean descriptor for a DynaActionForm
form-bean
name=logonForm
type=org.apache.struts.action.DynaActionForm
form-property
name=username
type=java.lang.String/
form-property
name=password
type=java.lang.String/
   /form-bean
end sample --




 form-bean name=UserLoginForm 
  type=roseindia.web.struts.form.UserLoginForm
/form-bean

 form-bean name=UserRegisterForm 
  type=roseindia.web.struts.form.UserRegisterForm
/form-bean


form-bean name=UserForgetPasswordForm 
  type=roseindia.web.struts.form.UserForgetPasswordForm
/form-bean


/form-beans


!-- = Global Exception Definitions --

global-exceptions
!-- sample exception handler
exception
key=expired.password
type=app.ExpiredPasswordException
path=/changePassword.jsp/
end sample --
/global-exceptions


!-- === Global Forward Definitions --

global-forwards
!-- Default forward to Welcome action --
!-- Demonstrates using index.jsp to forward --
forward
name=welcome
path=/userregister.do/
/global-forwards


!-- === Action Mapping Definitions --

action-mappings
!-- Default Welcome action --
!-- Forwards to Welcome.jsp --
action
path=/Welcome
forward=/pages/Welcome.jsp/

!-- sample input and input submit actions

action
path=/Input
type=org.apache.struts.actions.ForwardAction
parameter=/pages/Input.jsp/

action
path=/InputSubmit
type=app.InputAction
name=inputForm
scope=request
validate=true
input=/pages/Input.jsp/

action
path=/edit*
type=app.Edit{1}Action
name=inputForm
scope=request
validate=true
input=/pages/Edit{1}.jsp/

end samples --


  !--
   action
path=/showlist
type=roseindia.web.struts.action.
forward=/pages/user/showuserlist.jsp/

--



  action
		  path=/logout
		  type=roseindia.web.struts.action.Logout
		  forward 

Re: javax.servlet.jsp.JspException: No getter method available for property

2007-05-02 Thread Nuwan Chandrasoma

Hi,

try this below code., i just add the type attribute.

bean:define id=cancelList property=cancel name=detailsForm 
type=java.util.ArrayList/

   html:select property = cancelReason 
   option value = --Select--/option
   html:options collection=cancelList property=myValue 
labelProperty=myLabel /

/html:select

Thanks,

Nuwan


- Original Message - 
From: prasad kumar [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Wednesday, May 02, 2007 7:50 AM
Subject: javax.servlet.jsp.JspException: No getter method available for 
property



I am trying to populate an html drop down with the Struts select and 
options

tags.  The
cancelList bean referenced in the collection is an ArrayList of struts
LabelValue beans.
Here is the tag snippet:
bean:define id=cancelList property=cancel 
name=detailsForm /

   html:select property = cancelReason 
   option value = --Select--/option
   html:options collection=cancelList property=myValue 
labelProperty=myLabel /

/html:select
 The stack trace(below) indicates that the Struts options tag is trying to 
call

getMyValue()
method on the list object itself.  Omitting the property and labelProperty
attributs of the
tag results in the Object toString() being invoked with the correct values 
of

the labal and
value properties of the LabelValue Bean.
 Any assistance is much appreciated.


-
Check out what you're missing if you're not on Yahoo! Messenger 



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



Re: Invalid for tag html according to TLD

2007-05-02 Thread Nuwan Chandrasoma

Hi,

Its something to do with your TLD files., the attribute 'locale' is removed 
from the TLD file you are using., are you using the same struts version that 
is sepcified for this tutorial?. this may be due to different TLD files you 
have in the librareis you are using.


Thanks,

Nuwan

- Original Message - 
From: wong wayne [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Wednesday, May 02, 2007 8:04 AM
Subject: Invalid for tag html according to TLD



Dear All

I'm new to Struts and building a prototype with
struts, ,hibernate and spring follow the instruction
at
http://www.roseindia.net/struts/hibernate-spring/index.shtml

When I execute the example, exception generated
(Attribute locale invalid for tag html according to
TLD). After I remove the locale tag (html:html
locale=true - html:html) at jsp, this example works
fine. I have no idea for this error, can somebody give
me some hints? Thanks.

Attached please find jsp and struts configuration file
for your reference.

regards

wayne



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com







?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 1.2//EN
 http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd;

!--
This is a blank Struts configuration file with an example
welcome action/page and other commented sample elements.

Tiles and the Struts Validator are configured using the factory 
defaults

and are ready-to-use.

NOTE: If you have a generator tool to create the corresponding Java 
classes
for you, you could include the details in the form-bean 
declarations.
Otherwise, you would only define the form-bean element itself, with 
the

corresponding name and type attributes, as shown here.
--


struts-config

!--  Data Source 
Configuration --

!--
data-sources
data-source type=org.apache.commons.dbcp.BasicDataSource
   set-property
 property=driverClassName
 value=org.postgresql.Driver /
   set-property
 property=url
 value=jdbc:postgresql://localhost/mydatabase /
   set-property
 property=username
 value=me /
   set-property
 property=password
 value=test /
   set-property
 property=maxActive
 value=10 /
   set-property
 property=maxWait
 value=5000 /
   set-property
 property=defaultAutoCommit
 value=false /
   set-property
 property=defaultReadOnly
 value=false /
   set-property
 property=validationQuery
 value=SELECT COUNT(*) FROM market /
/data-source
/data-sources
--

!--  Form Bean 
Definitions --


   form-beans
 !-- sample form bean descriptor for an ActionForm
   form-bean
   name=inputForm
   type=app.InputForm/
   end sample --

   !-- sample form bean descriptor for a DynaActionForm
   form-bean
   name=logonForm
   type=org.apache.struts.action.DynaActionForm
   form-property
   name=username
   type=java.lang.String/
   form-property
   name=password
   type=java.lang.String/
  /form-bean
   end sample --




form-bean name=UserLoginForm
 type=roseindia.web.struts.form.UserLoginForm
   /form-bean

form-bean name=UserRegisterForm
 type=roseindia.web.struts.form.UserRegisterForm
   /form-bean


form-bean name=UserForgetPasswordForm
 type=roseindia.web.struts.form.UserForgetPasswordForm
   /form-bean


   /form-beans


!-- = Global Exception 
Definitions --


   global-exceptions
   !-- sample exception handler
   exception
   key=expired.password
   type=app.ExpiredPasswordException
   path=/changePassword.jsp/
   end sample --
   /global-exceptions


!-- === Global Forward 
Definitions --


   global-forwards
   !-- Default forward to Welcome action --
   !-- Demonstrates using index.jsp to forward --
   forward
   name=welcome
   path=/userregister.do/
   /global-forwards


!-- === Action Mapping 
Definitions --


   action-mappings
   !-- Default Welcome action --
   !-- Forwards to Welcome.jsp --
   action
   path=/Welcome
   forward=/pages/Welcome.jsp/

   !-- sample input and input submit actions

   action
   path=/Input
   type=org.apache.struts.actions.ForwardAction
   parameter=/pages/Input.jsp/

   action
   path=/InputSubmit
   type=app.InputAction
   name=inputForm
   scope=request
   validate=true
   input=/pages/Input.jsp/

   

Re: Invalid for tag html according to TLD

2007-05-02 Thread Nuwan Chandrasoma

Hi,

Well it is  DEPRECATED in struts 1.2.9

http://struts.apache.org/1.2.9/userGuide/struts-html.html#html

Thanks,

Nuwan


- Original Message - 
From: Nuwan Chandrasoma [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Wednesday, May 02, 2007 11:18 AM
Subject: Re: Invalid for tag html according to TLD



Hi,

Its something to do with your TLD files., the attribute 'locale' is 
removed from the TLD file you are using., are you using the same struts 
version that is sepcified for this tutorial?. this may be due to different 
TLD files you have in the librareis you are using.


Thanks,

Nuwan

- Original Message - 
From: wong wayne [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Wednesday, May 02, 2007 8:04 AM
Subject: Invalid for tag html according to TLD



Dear All

I'm new to Struts and building a prototype with
struts, ,hibernate and spring follow the instruction
at
http://www.roseindia.net/struts/hibernate-spring/index.shtml

When I execute the example, exception generated
(Attribute locale invalid for tag html according to
TLD). After I remove the locale tag (html:html
locale=true - html:html) at jsp, this example works
fine. I have no idea for this error, can somebody give
me some hints? Thanks.

Attached please find jsp and struts configuration file
for your reference.

regards

wayne



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com







?xml version=1.0 encoding=ISO-8859-1 ?

!DOCTYPE struts-config PUBLIC
 -//Apache Software Foundation//DTD Struts Configuration 
1.2//EN

 http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd;

!--
This is a blank Struts configuration file with an example
welcome action/page and other commented sample elements.

Tiles and the Struts Validator are configured using the factory 
defaults

and are ready-to-use.

NOTE: If you have a generator tool to create the corresponding Java 
classes
for you, you could include the details in the form-bean 
declarations.
Otherwise, you would only define the form-bean element itself, with 
the

corresponding name and type attributes, as shown here.
--


struts-config

!--  Data Source 
Configuration --

!--
data-sources
data-source type=org.apache.commons.dbcp.BasicDataSource
   set-property
 property=driverClassName
 value=org.postgresql.Driver /
   set-property
 property=url
 value=jdbc:postgresql://localhost/mydatabase /
   set-property
 property=username
 value=me /
   set-property
 property=password
 value=test /
   set-property
 property=maxActive
 value=10 /
   set-property
 property=maxWait
 value=5000 /
   set-property
 property=defaultAutoCommit
 value=false /
   set-property
 property=defaultReadOnly
 value=false /
   set-property
 property=validationQuery
 value=SELECT COUNT(*) FROM market /
/data-source
/data-sources
--

!--  Form Bean 
Definitions --


   form-beans
 !-- sample form bean descriptor for an ActionForm
   form-bean
   name=inputForm
   type=app.InputForm/
   end sample --

   !-- sample form bean descriptor for a DynaActionForm
   form-bean
   name=logonForm
   type=org.apache.struts.action.DynaActionForm
   form-property
   name=username
   type=java.lang.String/
   form-property
   name=password
   type=java.lang.String/
  /form-bean
   end sample --




form-bean name=UserLoginForm
 type=roseindia.web.struts.form.UserLoginForm
   /form-bean

form-bean name=UserRegisterForm
 type=roseindia.web.struts.form.UserRegisterForm
   /form-bean


form-bean name=UserForgetPasswordForm
 type=roseindia.web.struts.form.UserForgetPasswordForm
   /form-bean


   /form-beans


!-- = Global Exception 
Definitions --


   global-exceptions
   !-- sample exception handler
   exception
   key=expired.password
   type=app.ExpiredPasswordException
   path=/changePassword.jsp/
   end sample --
   /global-exceptions


!-- === Global Forward 
Definitions --


   global-forwards
   !-- Default forward to Welcome action --
   !-- Demonstrates using index.jsp to forward --
   forward
   name=welcome
   path=/userregister.do/
   /global-forwards


!-- === Action Mapping 
Definitions --


   action-mappings
   !-- Default Welcome action --
   !-- Forwards to Welcome.jsp --
   action
   path=/Welcome
   forward=/pages/Welcome.jsp/

   !-- sample input 

Re: Fw: logic:iterate how to test the 1st and last iteration ?

2007-05-02 Thread piloupy GOTTAPIL

Sorry guys, I don't know why the mailer tells me that my mail is spam...

I've answered 3 times to give the solution using the JSTL Core, but
the mailer blocked them. I think it's because of the code that I put.

---
This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

   user@struts.apache.org

Technical details of permanent failure:
PERM_FAILURE: SMTP Error (state 12): 552 spam score (5.5) exceeded threshold

(etc...)
---

piloupy

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



Re: Invalid for tag html according to TLD

2007-05-02 Thread wong wayne
thanks Nuwan. Finally get it work and next step would
be moved this prototype into latest version 1.3.8 :)
--- Nuwan Chandrasoma [EMAIL PROTECTED] wrote:

 Hi,
 
 Well it is  DEPRECATED in struts 1.2.9
 

http://struts.apache.org/1.2.9/userGuide/struts-html.html#html
 
 Thanks,
 
 Nuwan
 
 
 - Original Message - 
 From: Nuwan Chandrasoma [EMAIL PROTECTED]
 To: Struts Users Mailing List
 user@struts.apache.org
 Sent: Wednesday, May 02, 2007 11:18 AM
 Subject: Re: Invalid for tag html according to TLD
 
 
  Hi,
 
  Its something to do with your TLD files., the
 attribute 'locale' is 
  removed from the TLD file you are using., are you
 using the same struts 
  version that is sepcified for this tutorial?. this
 may be due to different 
  TLD files you have in the librareis you are using.
 
  Thanks,
 
  Nuwan
 
  - Original Message - 
  From: wong wayne [EMAIL PROTECTED]
  To: user@struts.apache.org
  Sent: Wednesday, May 02, 2007 8:04 AM
  Subject: Invalid for tag html according to TLD
 
 
  Dear All
 
  I'm new to Struts and building a prototype with
  struts, ,hibernate and spring follow the
 instruction
  at
 

http://www.roseindia.net/struts/hibernate-spring/index.shtml
 
  When I execute the example, exception generated
  (Attribute locale invalid for tag html according
 to
  TLD). After I remove the locale tag (html:html
  locale=true - html:html) at jsp, this example
 works
  fine. I have no idea for this error, can somebody
 give
  me some hints? Thanks.
 
  Attached please find jsp and struts configuration
 file
  for your reference.
 
  regards
 
  wayne
 
 
 
 
 __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
 
 
 


 
 
  ?xml version=1.0 encoding=ISO-8859-1 ?
 
  !DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD
 Struts Configuration 
  1.2//EN
  

http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd;
 
  !--
  This is a blank Struts configuration file
 with an example
  welcome action/page and other commented
 sample elements.
 
  Tiles and the Struts Validator are configured
 using the factory 
  defaults
  and are ready-to-use.
 
  NOTE: If you have a generator tool to create
 the corresponding Java 
  classes
  for you, you could include the details in the
 form-bean 
  declarations.
  Otherwise, you would only define the
 form-bean element itself, with 
  the
  corresponding name and type attributes,
 as shown here.
  --
 
 
  struts-config
 
  !-- 
 Data Source 
  Configuration --
  !--
  data-sources
  data-source
 type=org.apache.commons.dbcp.BasicDataSource
 set-property
   property=driverClassName
   value=org.postgresql.Driver /
 set-property
   property=url
  
 value=jdbc:postgresql://localhost/mydatabase /
 set-property
   property=username
   value=me /
 set-property
   property=password
   value=test /
 set-property
   property=maxActive
   value=10 /
 set-property
   property=maxWait
   value=5000 /
 set-property
   property=defaultAutoCommit
   value=false /
 set-property
   property=defaultReadOnly
   value=false /
 set-property
   property=validationQuery
   value=SELECT COUNT(*) FROM market /
  /data-source
  /data-sources
  --
 
  !--
 
 Form Bean 
  Definitions --
 
 form-beans
   !-- sample form bean descriptor for an
 ActionForm
 form-bean
 name=inputForm
 type=app.InputForm/
 end sample --
 
 !-- sample form bean descriptor for a
 DynaActionForm
 form-bean
 name=logonForm

 type=org.apache.struts.action.DynaActionForm
 form-property
 name=username
 type=java.lang.String/
 form-property
 name=password
 type=java.lang.String/
/form-bean
 end sample --
 
 
 
 
  form-bean name=UserLoginForm
  
 type=roseindia.web.struts.form.UserLoginForm
 /form-bean
 
  form-bean name=UserRegisterForm
  
 type=roseindia.web.struts.form.UserRegisterForm
 /form-bean
 
 
  form-bean name=UserForgetPasswordForm
  

type=roseindia.web.struts.form.UserForgetPasswordForm
 
=== message truncated ===


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [S2] populating user roles

2007-05-02 Thread Flemming Seerup

Am I missing something?   I have a working version of an AuthInterceptor, but
still no examples on how to control isUserInRole().

On manning.com I found a lightbody_src.zip from WW in action, but it doesn't
handle roles.
Could anybody tell me the location of Mark Mernards blog?

/Flemming


Quoting Laurie Harper [EMAIL PROTECTED]:
Those are good pointers. The key is that it all depends on how you 
are handling authentication and authorization, since there are so 
many possible approaches.


For example, if you use container managed security, setting up the 
roles is a matter of configuring your container appropriately. If 
you're using a non-'standards based' authentication mechanism 
(filters, S2 interceptors, or other custom functionality), you'll 
need to manage roles yourself. Zoran's pointers should get you on 
your way in that case.


L.

Zoran Avtarovski wrote:

To achieve this we wrote a custom AuthInterceptor which we added to the
default stack, which adds some core authorisation functionality - add user
object (with roles) to the session, add a custom user menu (based on roles)
to the session and checks authorisation for the action.

It's pretty straight forward with Interceptors. Mark Mernard has an example
on his blog which is a good starting point and WW in Action also has a good
example, just download the source code from the manning site and look for
the sample AuthInterceptor code.

Z.

I would like to populate the user roles from a database during 
login, but have

not found any examples how to do so in Struts2.

I have found an example how to use RolesInterceptor to secure access to
specific
actions, but no hints on how to populate the roles.

/Flemming



This message was sent using IMP, the Internet Messaging Program.

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







This message was sent using IMP, the Internet Messaging Program.


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



Re: [S2] populating user roles

2007-05-02 Thread Nuwan Chandrasoma

i think your saying abt this gr8 tutorila right?

Creating a Login Interceptor in Struts 2
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor

Thanks again Mark..

Thanks,

Nuwan

- Original Message - 
From: Flemming Seerup [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Wednesday, May 02, 2007 8:59 AM
Subject: Re: [S2] populating user roles


Am I missing something?   I have a working version of an AuthInterceptor, 
but

still no examples on how to control isUserInRole().

On manning.com I found a lightbody_src.zip from WW in action, but it 
doesn't

handle roles.
Could anybody tell me the location of Mark Mernards blog?

/Flemming


Quoting Laurie Harper [EMAIL PROTECTED]:
Those are good pointers. The key is that it all depends on how you are 
handling authentication and authorization, since there are so many 
possible approaches.


For example, if you use container managed security, setting up the roles 
is a matter of configuring your container appropriately. If you're using 
a non-'standards based' authentication mechanism (filters, S2 
interceptors, or other custom functionality), you'll need to manage roles 
yourself. Zoran's pointers should get you on your way in that case.


L.

Zoran Avtarovski wrote:

To achieve this we wrote a custom AuthInterceptor which we added to the
default stack, which adds some core authorisation functionality - add 
user
object (with roles) to the session, add a custom user menu (based on 
roles)

to the session and checks authorisation for the action.

It's pretty straight forward with Interceptors. Mark Mernard has an 
example
on his blog which is a good starting point and WW in Action also has a 
good
example, just download the source code from the manning site and look 
for

the sample AuthInterceptor code.

Z.

I would like to populate the user roles from a database during login, 
but have

not found any examples how to do so in Struts2.

I have found an example how to use RolesInterceptor to secure access to
specific
actions, but no hints on how to populate the roles.

/Flemming



This message was sent using IMP, the Internet Messaging Program.

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







This message was sent using IMP, the Internet Messaging Program.


-
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: [S2] populating user roles

2007-05-02 Thread Alexis Pigeon

Hi Flemming,

On 02/05/07, Flemming Seerup [EMAIL PROTECTED] wrote:

Am I missing something?   I have a working version of an AuthInterceptor, but
still no examples on how to control isUserInRole().

On manning.com I found a lightbody_src.zip from WW in action, but it doesn't
handle roles.
Could anybody tell me the location of Mark Mernards blog?


His blog :
 http://www.vitarara.org/cms/ 

And the post you are likely to look for :
 http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor 

HTH,
alexis

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



Re: When will Struts 2.1 be released?

2007-05-02 Thread Ted Husted

On 5/1/07, Pedro Herrera [EMAIL PROTECTED] wrote:

when is 2.0.8 release coming up ?


Anyone interested in forthcoming releases should follow the dev list.
All development discussions take place on the dev list, and anyone who
follows the dev list knows as much as the rest of us :)

A good way to check-in without bothering with another list is through
the nabble forum

* http://www.nabble.com/Struts---Dev-f205.html

Looking for 2.0.8, one would find

* 
http://www.nabble.com/Re%3A--S2--Struts-2.0.8-release-manager-%28was-PROPOSAL%3A-s1-modules-module%29-tf3651012.html

HTH, Ted.
http://husted.com/ted/blog/

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



Re: Books Reference Material

2007-05-02 Thread Ted Husted

AFAIK, the most up-to-date S1 book is still Struts: The Complete Reference.

* http://struts.apache.org/index.html#Newbies

HTH, Ted.
http://husted.com/ted/blog/

On 5/1/07, Richard Kroll [EMAIL PROTECTED] wrote:

Hello All,
I'm moving into a position that requires me to work with S1. I have been
toying with S1, but now that I will be required to work with it in a
more day-to-day capacity, I am trying to get some opinions on good books
/ reference material.

To date I have been using online resources to slowly learn S1, but now
that I need to ramp up at a more accelerated pace I wanted to see if
anyone had some recommendations on any good books on S1 or other
references that will help me get up to speed quickly?

I am familiar with the challenges that an MVC framework like Struts is
designed to solve.  In light of this, I am not looking for a dummies
type learning tool, but more something that is geared toward developers
who understand the concepts, but perhaps not the nuts and bolts of
struts.

Any input?

Thanks,

Rich Kroll


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



[S2] ArchTech Tutorial

2007-05-02 Thread Ted Husted

Has anyone tried the ArchTech S2 tutorial yet?

* https://www.arctechsoftware.com/tutorial/tutorial.do?subcatId=4

-Ted.

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



Re: Books Reference Material

2007-05-02 Thread Ted Husted

I haven't read of his books yet myself, but I notice that Budi
Kurniawan has a new Struts 1 book out now

* http://www.amazon.com/exec/obidos/tg/detail/-/0975212818/apachesoftwar-20/

and a Struts 2 book due out in the fall

* http://www.amazon.com/exec/obidos/tg/detail/-/0980331609/apachesoftwar-20/

-Ted.

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



Re: [s2] use remoteUser with struts tags

2007-05-02 Thread Marcin Orlinski

Hello

I disable el because '#' is used by the JSP EL under JSP 2.1 and I use this
character in OGNL expressions. This information is from
http://struts.apache.org/2.x/docs/ognl.html.
OK, disable is wrong word, I should wrote that I set isELignored to true :-)


My first idea was that I can use:

s:property value=%{#request.getRemoteUser()} /
or s:property value=%{#request.isUserInRole('role_name')} /

but this doesn't work.

I tried too:
s:property value=[EMAIL PROTECTED]@getRequest().getRemoteUser()}
/
s:property value=%{getRemoteUser()} /

I don't have any errors, but result is null.
I'm sure that remoteUser is set, because I have %= request.getRemoteUser()
% in my jsp and I see good result ;-)

For s:property value=%{request.getRemoteUser()} / I have error:

12:25:23:085 WARN com.opensymphony.xwork2.util.OgnlValueStack
[http-8080-Processor24];  Caught an exception while evaluating expression
'request.getRemoteUser()' against value stack
java.lang.NullPointerException: target is null for method getRemoteUser


Best regards
Marcin Orlinski



Laurie Harper wrote:
 
 OGNL in Struts provides access to these scopes via named attributes on 
 the stack (e.g. %{#session.attribute}). It seams quite reasonable to me 
 to want to limit pages to using a single expression language. I don't 
 know if this use case is viable, but it's reasonable to want it :-)
 
 To the OP: what did you try, and what happened? Post exactly what 
 configuration you set, what you tried in the JSP and what errors or 
 unexpected behaviours you saw as a result.
 
 L.
 
 Felipe Rodrigues wrote:
 Why did you disabled EL and how did you do that?
 You can use EL with OGNL. OGNL works only with things in its stack, and
 I'm
 not sure about how get things from outside its stack, e.g. Session,
 Request,
 Context or even Page. To get these values, the best way is use EL.
 I can't see any reason to don't use EL.
 
 Regards,
 
 Felipe
 
 
 Marcin Orlinski wrote:
 Hello

 I have problem only in JSP. I have disabled EL and I tried use OGNL. Can
 you give me example how to get this information ?

 Best regards.
 Marcin OrliƄski


 Felipe Rodrigues wrote:
 Well,

 If you're in a JSP, you can get it direct from the request, even using
 EL
 or using expressions.
 If you're in a action you may want take a look at the documentation.
 Specific in the part of FAQ - How To.
 You'll find that you can get the request object by implementing the
 interface ServletRequestAware or using the code
 ActionContext.getContext().getRequest().

 Using the interface is a better approach. Make your choice. :-)

 Regards,

 Felipe


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

-- 
View this message in context: 
http://www.nabble.com/-s2--use-remoteUser-with-struts-tags-tf3656482.html#a10283544
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] populating user roles

2007-05-02 Thread Zoran Avtarovski
 Am I missing something?   I have a working version of an AuthInterceptor, but
 still no examples on how to control isUserInRole().

To control the isUserInRole() you will have to look at your Servlet
container and customise the AuthInterceptor to interact with your
container's implementation of JAAS.

The obvious question is why don't you use JAAS to populate the roles on
login? The reason we don't is that we have a complex authorisation hierarchy
that was just too complex for JAAS alone. It sounds like you don't need that
level of complexity. I'd go for just straight JAAS. Have a look at the free
JAAS in Action book (http://www.jaasbook.com/) I found it really useful.

Z.



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



Re: [s2] use remoteUser with struts tags

2007-05-02 Thread Dave Newton
--- Marcin Orlinski [EMAIL PROTECTED] wrote:
 s:property value=%{#request.getRemoteUser()} /

Does %{#request.remoteUser} work?

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



ERROR 500 when trying to execute struts2-blank-2.0.6.war

2007-05-02 Thread bigtdps2004
Hi Folks,

I get the following Error 500 message when starting Tomcat on
my Windows XP computer:

Settings  could not parse struts.locale setting, substituting
 
 default ... locale


I think possible solutions include:

1. changing port# back to 8080; even thought Tomcat 
   installation instructions call for port 80. 

2. Even thought the Struts install  configuration 
   instructions say that the startup Tomcat will know what to 
   do with the struts2-blank-2.0.6.war, there might be a 
   reason to have to unjar this war file and perhaps, save 
   things in specific directories.

I would appreciate any expert advise you care to give.

Thanks,

Tony

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



Re: [s2] use remoteUser with struts tags

2007-05-02 Thread Marcin Orlinski


Does %{#request.remoteUser} work?

No, it doesn't work (result null).
It works when I set attribute remoteUser in request. This is
request.getAttribute(remoteUser), no request.getRemoteUser(). 

Best regards
Marcin Orlinski


-- 
View this message in context: 
http://www.nabble.com/-s2--use-remoteUser-with-struts-tags-tf3656482.html#a10284988
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: ERROR 500 when trying to execute struts2-blank-2.0.6.war

2007-05-02 Thread Musachy Barroso

Is that one the only error on the log?

musachy

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


Hi Folks,

I get the following Error 500 message when starting Tomcat on
my Windows XP computer:

Settings  could not parse struts.locale setting, substituting

default ... locale


I think possible solutions include:

1. changing port# back to 8080; even thought Tomcat
   installation instructions call for port 80.

2. Even thought the Struts install  configuration
   instructions say that the startup Tomcat will know what to
   do with the struts2-blank-2.0.6.war, there might be a
   reason to have to unjar this war file and perhaps, save
   things in specific directories.

I would appreciate any expert advise you care to give.

Thanks,

Tony

-
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: [s2] use remoteUser with struts tags

2007-05-02 Thread Marcin Orlinski

Works:
[EMAIL PROTECTED]@getRequest().getRemoteUser()}

Best regards
Marcin Orlinski



Dave Newton-4 wrote:
 
 Does %{#request.remoteUser} work?
 
 No, it doesn't work (result null).
 It works when I set attribute remoteUser in request. This is
 request.getAttribute(remoteUser), no request.getRemoteUser(). 
 
 Best regards
 Marcin Orlinski
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-s2--use-remoteUser-with-struts-tags-tf3656482.html#a10285937
Sent from the Struts - User mailing list archive at Nabble.com.


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



How to capture an event when changing the selectedTab in a TabbedPannel?

2007-05-02 Thread Felipe Rodrigues

Hi guys,

I've got a question.
How to trigger somerhing when change from one tab to another one?


Thanks,

Felipe
-- 
View this message in context: 
http://www.nabble.com/How-to-capture-an-event-when-changing-the-selectedTab-in-a-TabbedPannel--tf3680726.html#a10286356
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: Autocompleter and focus

2007-05-02 Thread Scott Nesbitt

var TEAM_LOOKUP = 2;

function onbodyload()
{
   var f = document.getElementById('mainForm');
   var t = f.elements[TEAM_LOOKUP];

   t.value = parent.originalValue;
   t.focus();   // this does not work!  why?
}

Scott

--- jdmr [EMAIL PROTECTED] wrote:

 
 Would you mind posting the onload script? I'm having
 trouble with it...
 
 Thanks...
 
 David M.
 
 Scott Nesbitt wrote:
  
  
  I am having trouble setting the focus on an
  autocompleter field.
  
  When I print out all the fields in my overlay, I
 see
  three for the sports team autocompleter:
  
  sportsTeam
  sportsTeamKey
  (one with no name)  (why does it have no name?)
  
  Here is how it is declared:
  
  s:autocompleter name=sportsTeam
   id=sportsTeam
   keyName=sportsTeamKey
   theme=ajax 
   formId=mainForm
   href=%{#autosportsteam}
   cssStyle=width: 430px; 
   dropdownHeight=180;
   loadMinimumCount=2
   loadOnTextChange=true
   autoComplete=false
   showDownArrow=false
   delay=100
   searchType=substring
   forceValidOption=true/
  
  In my onbodyload() function I set the value of the
  field with no name and it works.  However, when I
 try
  to set the focus on the one with no name it
 ignores it
  and none of the overlay fields has focus.
  
  I tried adding dataFieldName but despite the
  documentation it says the attribute is not
 recognized.
  
  Any suggestions?
  
  Thanks,
  
  Scott
  
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around 
  http://mail.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%3A-Autocompleter-and-focus-tf3601635.html#a10221734
 Sent from the Struts - User mailing list archive at
 Nabble.com.
 
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: S2: Autocompleter and focus

2007-05-02 Thread Musachy Barroso

There are 3 input for each autocompleter, the one with the value, and the
one with the key are hidden, so setting the focus on them won't work, you
need to use the visible one.

regards
musachy

On 5/2/07, Scott Nesbitt [EMAIL PROTECTED] wrote:



var TEAM_LOOKUP = 2;

function onbodyload()
{
   var f = document.getElementById('mainForm');
   var t = f.elements[TEAM_LOOKUP];

   t.value = parent.originalValue;
   t.focus();   // this does not work!  why?
}

Scott

--- jdmr [EMAIL PROTECTED] wrote:


 Would you mind posting the onload script? I'm having
 trouble with it...

 Thanks...

 David M.

 Scott Nesbitt wrote:
 
 
  I am having trouble setting the focus on an
  autocompleter field.
 
  When I print out all the fields in my overlay, I
 see
  three for the sports team autocompleter:
 
  sportsTeam
  sportsTeamKey
  (one with no name)  (why does it have no name?)
 
  Here is how it is declared:
 
  s:autocompleter name=sportsTeam
   id=sportsTeam
   keyName=sportsTeamKey
   theme=ajax
   formId=mainForm
   href=%{#autosportsteam}
   cssStyle=width: 430px;
   dropdownHeight=180;
   loadMinimumCount=2
   loadOnTextChange=true
   autoComplete=false
   showDownArrow=false
   delay=100
   searchType=substring
   forceValidOption=true/
 
  In my onbodyload() function I set the value of the
  field with no name and it works.  However, when I
 try
  to set the focus on the one with no name it
 ignores it
  and none of the overlay fields has focus.
 
  I tried adding dataFieldName but despite the
  documentation it says the attribute is not
 recognized.
 
  Any suggestions?
 
  Thanks,
 
  Scott
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.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%3A-Autocompleter-and-focus-tf3601635.html#a10221734
 Sent from the Struts - User mailing list archive at
 Nabble.com.



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




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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


Re: How to capture an event when changing the selectedTab in a TabbedPannel?

2007-05-02 Thread Musachy Barroso

There is an open issue for this, but I haven't got to it yet

musachy

On 5/2/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:



Hi guys,

I've got a question.
How to trigger somerhing when change from one tab to another one?


Thanks,

Felipe
--
View this message in context:
http://www.nabble.com/How-to-capture-an-event-when-changing-the-selectedTab-in-a-TabbedPannel--tf3680726.html#a10286356
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


Re: ERROR 500 when trying to execute struts2-blank-2.0.6.war

2007-05-02 Thread bigtdps2004
Yes,

It is the only warning message when starting up Tomcat.  All
others are prefaced by INFO.

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



reset the value of a datetimepicker using java script

2007-05-02 Thread kris16

Hi, I am trying to reset the value of a datetimepicker in a jsp page using
struts2 (2.0.6).

I can not reset the value.

See code below.
The onchange and the call to the Java script function (planStatuschanged )
seems to work, but the datetimepicker's value is not set to . If I use an
ordinary input tag (input ...) instead of a datetimepicker it works.

I have tried the dojo.widget.byId(statusDateId).setDate() method instead
of :
formObj.statusDateId.value=;

But that do not work either.
What am I doing wrong ? 




s:select onchange=planStatuschanged(document.formular) ...
...
...
id=planStatus/

s:datetimepicker id=statusDateId name=statusDate 
label=Planeringsdatum/


function planStatuschanged (formObj) {
 if (formObj.planStatus.options[formObj.planStatus.selectedIndex].value ==
4) {
 formObj.statusDateId.value=;
  }
 
}
-- 
View this message in context: 
http://www.nabble.com/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10286861
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 capture an event when changing the selectedTab in a TabbedPannel?

2007-05-02 Thread Felipe Rodrigues

Yeah, I remembered. I reported it.
But the hope is just like mother-in-law. The last to be dead. 

Thanks Anyway.

Felipe


Musachy Barroso wrote:
 
 There is an open issue for this, but I haven't got to it yet
 
 musachy
 
 On 5/2/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi guys,

 I've got a question.
 How to trigger somerhing when change from one tab to another one?


 Thanks,

 Felipe
 --
 View this message in context:
 http://www.nabble.com/How-to-capture-an-event-when-changing-the-selectedTab-in-a-TabbedPannel--tf3680726.html#a10286356
 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/How-to-capture-an-event-when-changing-the-selectedTab-in-a-TabbedPannel--tf3680726.html#a10286862
Sent from the Struts - User mailing list archive at Nabble.com.


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



DefaultActionValidatorManager does not recognize model driven

2007-05-02 Thread Gunnar.Bostrom
Hi,

I try to junit test my field-validators by using
DefaultActionValidatorManager.

It does work but with one problem. My action class implements
ModelDriven so to be able to test my validations in *-validations.xml I
have to add model. before every OGNL-expression and afterwards
remember to remove them.

Is this an error, or should I do it in another way?

Regards
Gunnar

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



Re: Release date 2.0.7 ? 2.0.8?

2007-05-02 Thread James Mitchell

At this time, no.  Stay tuned though!


--
James Mitchell



On May 1, 2007, at 8:44 AM, David Harland wrote:


Hi

Have you any probable release dates for the next version of struts 2.

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.

__



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



Re: S2: submit tag and handler

2007-05-02 Thread Musachy Barroso

The whole idea behind the handler function is that you are going to make
the request yourself, instead of letting struts do it for you. The handler
is just a plain javascript function like:

function superHandler(widget, domNode) {
 //use some other framework to do the ajax request, Dojo, Prototype, YUI,
DWR, JQuery,zillion_framework_name
}

is that what you are trying to do? do the request yourself?

musachy

On 5/2/07, Scott Nesbitt [EMAIL PROTECTED] wrote:


Does anyone know how to invoke a request from a submit
handler function?


I am using a submit tag like this:

div id=t1Div 1/div
s:url id=ajaxTest value=SaveLineup.action /
img id=indicator
 src=images/indicator.gif
 alt=Loading...
 style=display:none/
s:submit type=submit
  theme=ajax
  value=Save
  title=Save all changes.
  cssClass=butstylewide
  targets=t1
  handler=handler
  notifyTopics=/after
  href=%{ajaxTest}
  align=left
  indicator=indicator/

My Javascript looks like this:

function handler(widget, node)
{
   alert(DEBUG in handler);
}

dojo.event.topic.subscribe(/after, function(data,
type, e)
{
   alert(Lineup saved);
});

The documentation says this:

'handler' is the name of the function that will take
care of making the AJAX request. Dojo's widget and dom
node are passed as parameters).

But I do not see any example of how to actually do
that.  I guess it is some Dojo magic but looking
through the Dojo documentation has not proved
illuminating.  (BTW, I know if I do not have handler
specified it calls the action but I need to do some
JavaScript work beforehand.)

Thanks,

Scott

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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


Re: reset the value of a datetimepicker using java script

2007-05-02 Thread Musachy Barroso

You need to call the setDate(date) method on the *widget* for the
datepicker, assuming you have a datepicker with the id dp0:

dojo.widget.byId(dp0) .setDate(new Date());

musachy

On 5/2/07, kris16 [EMAIL PROTECTED] wrote:



Hi, I am trying to reset the value of a datetimepicker in a jsp page using
struts2 (2.0.6).

I can not reset the value.

See code below.
The onchange and the call to the Java script function (planStatuschanged )
seems to work, but the datetimepicker's value is not set to . If I use
an
ordinary input tag (input ...) instead of a datetimepicker it works.

I have tried the dojo.widget.byId(statusDateId).setDate() method
instead
of :
formObj.statusDateId.value=;

But that do not work either.
What am I doing wrong ?




s:select onchange=planStatuschanged(document.formular) ...
...
...
id=planStatus/

s:datetimepicker id=statusDateId name=statusDate
label=Planeringsdatum/


function planStatuschanged (formObj) {
if (formObj.planStatus.options[formObj.planStatus.selectedIndex].value ==
4) {
formObj.statusDateId.value=;
  }

}
--
View this message in context:
http://www.nabble.com/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10286861
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


ui tags behaviour

2007-05-02 Thread meissa . sakho
Depuis le 21 décembre 2006, Natexis Investor Servicing s'appelle Natixis 
Investor Servicing. Les adresses mails des collaborateurs ayant changé, veillez 
Ă  la mise Ă  jour de votre carnet d'adresses.


Hi all,
I'm using the textfield ui form inside an a form tag like below:

s:form action=create 
 s:textfield key=article.dateEnreg size=20/
/s:form

I would like to apply my own class to the label. When i use the cssClass 
attribute, it goes
to the input.
Can someone tells me how to manage to give to the generated label a 
desired class.

thank in advance.
Meissa

L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut 
etre tenu responsable de son contenu. Toute utilisation ou diffusion non 
autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci 
de le detruire et d'avertir l'expediteur.
Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si 
necessaire

The integrity of this message cannot be guaranteed on the Internet. Natixis can 
not therefore be considered responsible for the contents. Any unauthorized use 
or dissemination is prohibited. If you are not the intended recipient of this 
message, then please delete it and notify the sender.
Let us mind the environment : let's print our mails only when necessary.



Re: S2: submit tag and handler

2007-05-02 Thread Scott Nesbitt

Yes, I would like to do the request in the JavaScript
because I need to do some other work there before the
request happens.

If I knew how Struts did the request I would just do
the same thing at the bottom of my function.

Scott

--- Musachy Barroso [EMAIL PROTECTED] wrote:

 The whole idea behind the handler function is that
 you are going to make
 the request yourself, instead of letting struts do
 it for you. The handler
 is just a plain javascript function like:
 
 function superHandler(widget, domNode) {
   //use some other framework to do the ajax request,
 Dojo, Prototype, YUI,
 DWR, JQuery,zillion_framework_name
 }
 
 is that what you are trying to do? do the request
 yourself?
 
 musachy
 
 On 5/2/07, Scott Nesbitt [EMAIL PROTECTED]
 wrote:
 
  Does anyone know how to invoke a request from a
 submit
  handler function?
 
 
  I am using a submit tag like this:
 
  div id=t1Div 1/div
  s:url id=ajaxTest value=SaveLineup.action /
  img id=indicator
   src=images/indicator.gif
   alt=Loading...
   style=display:none/
  s:submit type=submit
theme=ajax
value=Save
title=Save all changes.
cssClass=butstylewide
targets=t1
handler=handler
notifyTopics=/after
href=%{ajaxTest}
align=left
indicator=indicator/
 
  My Javascript looks like this:
 
  function handler(widget, node)
  {
 alert(DEBUG in handler);
  }
 
  dojo.event.topic.subscribe(/after,
 function(data,
  type, e)
  {
 alert(Lineup saved);
  });
 
  The documentation says this:
 
  'handler' is the name of the function that will
 take
  care of making the AJAX request. Dojo's widget and
 dom
  node are passed as parameters).
 
  But I do not see any example of how to actually do
  that.  I guess it is some Dojo magic but looking
  through the Dojo documentation has not proved
  illuminating.  (BTW, I know if I do not have
 handler
  specified it calls the action but I need to do
 some
  JavaScript work beforehand.)
 
  Thanks,
 
  Scott
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.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
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: reset the value of a datetimepicker using java script

2007-05-02 Thread kris16

Hi Musachy,
yes that works thanks. But i do not want to set the value to new Date(). 
I want to set i to , or erase the text field from the date so to say. 
Is that possible ?
/Krister



Musachy Barroso wrote:
 
 You need to call the setDate(date) method on the *widget* for the
 datepicker, assuming you have a datepicker with the id dp0:
 
 dojo.widget.byId(dp0) .setDate(new Date());
 
 musachy
 
 On 5/2/07, kris16 [EMAIL PROTECTED] wrote:


 Hi, I am trying to reset the value of a datetimepicker in a jsp page
 using
 struts2 (2.0.6).

 I can not reset the value.

 See code below.
 The onchange and the call to the Java script function (planStatuschanged
 )
 seems to work, but the datetimepicker's value is not set to . If I use
 an
 ordinary input tag (input ...) instead of a datetimepicker it works.

 I have tried the dojo.widget.byId(statusDateId).setDate() method
 instead
 of :
 formObj.statusDateId.value=;

 But that do not work either.
 What am I doing wrong ?




 s:select onchange=planStatuschanged(document.formular) ...
 ...
 ...
 id=planStatus/

 s:datetimepicker id=statusDateId name=statusDate
 label=Planeringsdatum/


 function planStatuschanged (formObj) {
 if (formObj.planStatus.options[formObj.planStatus.selectedIndex].value ==
 4) {
 formObj.statusDateId.value=;
   }

 }
 --
 View this message in context:
 http://www.nabble.com/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10286861
 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/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10289469
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: [S1] Application container during development for fastest code/test cycle?

2007-05-02 Thread James Mitchell
Hi, for a 2 minute demo of how nice the maven jetty integration is,  
try this:


(You must have Maven and SVN client installed)

$ svn co http://svn.apache.org/repos/asf/struts/struts2/tags/ 
STRUTS_2_0_6/apps/mailreader/

$ cd mailreader
$ mvn jetty:run

Open your browser to localhost:8080/struts2-mailreader/

Have fun!


--
James Mitchell



On May 1, 2007, at 6:16 PM, Antony Stubbs wrote:



We're developing a Struts application which will be deployed onto  
Websphere

eventually.

However, I find Websphere very heavy weight do use during  
development -
publishing seems to take for ever, and seems as thought for many  
changes it

must be restarted.

What's a common container to use during development that will  
facilitate the
fastest (computer burden-wise) code, deploy, test, code, deploy,  
test cycles

etc?

I've tried Tomcat, and that seems to work better, but it still has  
to be
restarted (well, eclipse (RAD actually) seems to insist on  
restarting it).
Jetty? And are there any guides out there to guide in setting up  
the fastest

environment?

Is there anyway to get changes instantaneously viewable aka  
Grails / Rails

etc?

I will need to setup JNI for the datasource (DB2 and Oracle) in the
container, and even better have the container support  
j_security_check.

--
View this message in context: http://www.nabble.com/-S1-- 
Application-container-during-development-for-fastest-code-test- 
cycle--tf3677559.html#a10276929

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: S2: submit tag and handler

2007-05-02 Thread Musachy Barroso

If you are using submit, or anchor tag you can call reloadContents() on
the widget passed as a parameter, if you are using the div tag, you can call
refresh() on it. These functions are not really part of the api and might
change in the future (although it would be nice if they were right?).

musachy

On 5/2/07, Scott Nesbitt [EMAIL PROTECTED] wrote:



Yes, I would like to do the request in the JavaScript
because I need to do some other work there before the
request happens.

If I knew how Struts did the request I would just do
the same thing at the bottom of my function.

Scott

--- Musachy Barroso [EMAIL PROTECTED] wrote:

 The whole idea behind the handler function is that
 you are going to make
 the request yourself, instead of letting struts do
 it for you. The handler
 is just a plain javascript function like:

 function superHandler(widget, domNode) {
   //use some other framework to do the ajax request,
 Dojo, Prototype, YUI,
 DWR, JQuery,zillion_framework_name
 }

 is that what you are trying to do? do the request
 yourself?

 musachy

 On 5/2/07, Scott Nesbitt [EMAIL PROTECTED]
 wrote:
 
  Does anyone know how to invoke a request from a
 submit
  handler function?
 
 
  I am using a submit tag like this:
 
  div id=t1Div 1/div
  s:url id=ajaxTest value=SaveLineup.action /
  img id=indicator
   src=images/indicator.gif
   alt=Loading...
   style=display:none/
  s:submit type=submit
theme=ajax
value=Save
title=Save all changes.
cssClass=butstylewide
targets=t1
handler=handler
notifyTopics=/after
href=%{ajaxTest}
align=left
indicator=indicator/
 
  My Javascript looks like this:
 
  function handler(widget, node)
  {
 alert(DEBUG in handler);
  }
 
  dojo.event.topic.subscribe(/after,
 function(data,
  type, e)
  {
 alert(Lineup saved);
  });
 
  The documentation says this:
 
  'handler' is the name of the function that will
 take
  care of making the AJAX request. Dojo's widget and
 dom
  node are passed as parameters).
 
  But I do not see any example of how to actually do
  that.  I guess it is some Dojo magic but looking
  through the Dojo documentation has not proved
  illuminating.  (BTW, I know if I do not have
 handler
  specified it calls the action but I need to do
 some
  JavaScript work beforehand.)
 
  Thanks,
 
  Scott
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.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



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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


Re: reset the value of a datetimepicker using java script

2007-05-02 Thread Musachy Barroso

dojo.widget.byId(dp0).inputNode.value = ;

Use at your own risk, you are using Dojo internals there :)

musachy

On 5/2/07, kris16 [EMAIL PROTECTED] wrote:



Hi Musachy,
yes that works thanks. But i do not want to set the value to new Date().
I want to set i to , or erase the text field from the date so to say.
Is that possible ?
/Krister



Musachy Barroso wrote:

 You need to call the setDate(date) method on the *widget* for the
 datepicker, assuming you have a datepicker with the id dp0:

 dojo.widget.byId(dp0) .setDate(new Date());

 musachy

 On 5/2/07, kris16 [EMAIL PROTECTED] wrote:


 Hi, I am trying to reset the value of a datetimepicker in a jsp page
 using
 struts2 (2.0.6).

 I can not reset the value.

 See code below.
 The onchange and the call to the Java script function
(planStatuschanged
 )
 seems to work, but the datetimepicker's value is not set to . If I
use
 an
 ordinary input tag (input ...) instead of a datetimepicker it works.

 I have tried the dojo.widget.byId(statusDateId).setDate() method
 instead
 of :
 formObj.statusDateId.value=;

 But that do not work either.
 What am I doing wrong ?




 s:select onchange=planStatuschanged(document.formular) ...
 ...
 ...
 id=planStatus/

 s:datetimepicker id=statusDateId name=statusDate
 label=Planeringsdatum/


 function planStatuschanged (formObj) {
 if (formObj.planStatus.options[formObj.planStatus.selectedIndex].value
==
 4) {
 formObj.statusDateId.value=;
   }

 }
 --
 View this message in context:

http://www.nabble.com/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10286861
 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/reset-the-value-of-a-datetimepicker-using-java-script-tf3680879.html#a10289469
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


Re: ui tags behaviour

2007-05-02 Thread Martin Gainty
As in setting theme =cssxhtml-theme to incorporate your css classes..more 
information available at

http://struts.apache.org/2.x/docs/cssxhtml-theme.html

Anyone else?
M

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Wednesday, May 02, 2007 11:32 AM
Subject: ui tags behaviour


Depuis le 21 décembre 2006, Natexis Investor Servicing s'appelle Natixis 
Investor Servicing. Les adresses mails des collaborateurs ayant changé, 
veillez Ă  la mise Ă  jour de votre carnet d'adresses.



Hi all,
I'm using the textfield ui form inside an a form tag like below:

s:form action=create
s:textfield key=article.dateEnreg size=20/
/s:form

I would like to apply my own class to the label. When i use the cssClass
attribute, it goes
to the input.
Can someone tells me how to manage to give to the generated label a
desired class.

thank in advance.
Meissa

L'integrite de ce message n'etant pas assuree sur internet, Natixis ne 
peut etre tenu responsable de son contenu. Toute utilisation ou diffusion 
non autorisee est interdite. Si vous n'etes pas destinataire de ce 
message, merci de le detruire et d'avertir l'expediteur.
Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails 
que si necessaire


The integrity of this message cannot be guaranteed on the Internet. 
Natixis can not therefore be considered responsible for the contents. Any 
unauthorized use or dissemination is prohibited. If you are not the 
intended recipient of this message, then please delete it and notify the 
sender.

Let us mind the environment : let's print our mails only when necessary.





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



Re: Release date 2.0.7 ? 2.0.8?

2007-05-02 Thread Ted Husted

On 5/1/07, David Harland [EMAIL PROTECTED] wrote:

Hi

Have you any probable release dates for the next version of struts 2.

Thanks


Anyone interested in forthcoming releases should follow the dev list.
All development discussions take place on the dev list, and anyone who
follows the dev list knows as much as the rest of us :)

A good way to check-in without bothering with another list is through
the nabble forum

* http://www.nabble.com/Struts---Dev-f205.html

Looking for 2.0.8, one would find

* 
http://www.nabble.com/Re%3A--S2--Struts-2.0.8-release-manager-%28was-PROPOSAL%3A-s1-modules-module%29-tf3651012.html

HTH, Ted.
http://husted.com/ted/

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



Re: S2: submit tag and handler

2007-05-02 Thread Scott Nesbitt

Hmm, this:

function handler(widget, node)
{
   widget.reloadContents();
}

Gives Stack overflow at line: 4872

Scott

--- Musachy Barroso [EMAIL PROTECTED] wrote:

 If you are using submit, or anchor tag you can call
 reloadContents() on
 the widget passed as a parameter, if you are using
 the div tag, you can call
 refresh() on it. These functions are not really
 part of the api and might
 change in the future (although it would be nice if
 they were right?).
 
 musachy
 
 On 5/2/07, Scott Nesbitt [EMAIL PROTECTED]
 wrote:
 
 
  Yes, I would like to do the request in the
 JavaScript
  because I need to do some other work there before
 the
  request happens.
 
  If I knew how Struts did the request I would just
 do
  the same thing at the bottom of my function.
 
  Scott
 
  --- Musachy Barroso [EMAIL PROTECTED] wrote:
 
   The whole idea behind the handler function is
 that
   you are going to make
   the request yourself, instead of letting struts
 do
   it for you. The handler
   is just a plain javascript function like:
  
   function superHandler(widget, domNode) {
 //use some other framework to do the ajax
 request,
   Dojo, Prototype, YUI,
   DWR, JQuery,zillion_framework_name
   }
  
   is that what you are trying to do? do the
 request
   yourself?
  
   musachy
  
   On 5/2/07, Scott Nesbitt
 [EMAIL PROTECTED]
   wrote:
   
Does anyone know how to invoke a request from
 a
   submit
handler function?
   
   
I am using a submit tag like this:
   
div id=t1Div 1/div
s:url id=ajaxTest value=SaveLineup.action
 /
img id=indicator
 src=images/indicator.gif
 alt=Loading...
 style=display:none/
s:submit type=submit
  theme=ajax
  value=Save
  title=Save all changes.
  cssClass=butstylewide
  targets=t1
  handler=handler
  notifyTopics=/after
  href=%{ajaxTest}
  align=left
  indicator=indicator/
   
My Javascript looks like this:
   
function handler(widget, node)
{
   alert(DEBUG in handler);
}
   
dojo.event.topic.subscribe(/after,
   function(data,
type, e)
{
   alert(Lineup saved);
});
   
The documentation says this:
   
'handler' is the name of the function that
 will
   take
care of making the AJAX request. Dojo's widget
 and
   dom
node are passed as parameters).
   
But I do not see any example of how to
 actually do
that.  I guess it is some Dojo magic but
 looking
through the Dojo documentation has not proved
illuminating.  (BTW, I know if I do not have
   handler
specified it calls the action but I need to do
   some
JavaScript work beforehand.)
   
Thanks,
   
Scott
   
   
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
   protection around
http://mail.yahoo.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
  
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.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
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: S2: submit tag and handler

2007-05-02 Thread Musachy Barroso

My bad, the notifyTopics are published inside that function so it won't
work. Warning: Hack ahead :)

var beforeTopicsArray = widget.beforeNotifyTopicsArray;
widget.beforeNotifyTopicsArray = null;
widget.reloadContents();
widget.beforeNotifyTopicsArray = beforeTopicsArray;

I will add a refreshContent method that will be common for all of the
widgets (and part of the api), with one parameter(boolean), to skip the
publishing of the topics.

musachy

On 5/2/07, Scott Nesbitt [EMAIL PROTECTED] wrote:



Hmm, this:

function handler(widget, node)
{
   widget.reloadContents();
}

Gives Stack overflow at line: 4872

Scott

--- Musachy Barroso [EMAIL PROTECTED] wrote:

 If you are using submit, or anchor tag you can call
 reloadContents() on
 the widget passed as a parameter, if you are using
 the div tag, you can call
 refresh() on it. These functions are not really
 part of the api and might
 change in the future (although it would be nice if
 they were right?).

 musachy

 On 5/2/07, Scott Nesbitt [EMAIL PROTECTED]
 wrote:
 
 
  Yes, I would like to do the request in the
 JavaScript
  because I need to do some other work there before
 the
  request happens.
 
  If I knew how Struts did the request I would just
 do
  the same thing at the bottom of my function.
 
  Scott
 
  --- Musachy Barroso [EMAIL PROTECTED] wrote:
 
   The whole idea behind the handler function is
 that
   you are going to make
   the request yourself, instead of letting struts
 do
   it for you. The handler
   is just a plain javascript function like:
  
   function superHandler(widget, domNode) {
 //use some other framework to do the ajax
 request,
   Dojo, Prototype, YUI,
   DWR, JQuery,zillion_framework_name
   }
  
   is that what you are trying to do? do the
 request
   yourself?
  
   musachy
  
   On 5/2/07, Scott Nesbitt
 [EMAIL PROTECTED]
   wrote:
   
Does anyone know how to invoke a request from
 a
   submit
handler function?
   
   
I am using a submit tag like this:
   
div id=t1Div 1/div
s:url id=ajaxTest value=SaveLineup.action
 /
img id=indicator
 src=images/indicator.gif
 alt=Loading...
 style=display:none/
s:submit type=submit
  theme=ajax
  value=Save
  title=Save all changes.
  cssClass=butstylewide
  targets=t1
  handler=handler
  notifyTopics=/after
  href=%{ajaxTest}
  align=left
  indicator=indicator/
   
My Javascript looks like this:
   
function handler(widget, node)
{
   alert(DEBUG in handler);
}
   
dojo.event.topic.subscribe(/after,
   function(data,
type, e)
{
   alert(Lineup saved);
});
   
The documentation says this:
   
'handler' is the name of the function that
 will
   take
care of making the AJAX request. Dojo's widget
 and
   dom
node are passed as parameters).
   
But I do not see any example of how to
 actually do
that.  I guess it is some Dojo magic but
 looking
through the Dojo documentation has not proved
illuminating.  (BTW, I know if I do not have
   handler
specified it calls the action but I need to do
   some
JavaScript work beforehand.)
   
Thanks,
   
Scott
   
   
 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
   protection around
http://mail.yahoo.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
  
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.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



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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


why does s:checkbox render 2 input elements?

2007-05-02 Thread Allen Gilliland
why is it that when i create a checkbox using the s:checkbox tag that i 
end up with 2 html inputs?


s:checkbox name=bean.active /

yields ...

input type=checkbox name=bean.active value=true checked=checked 
id=weblogConfig_bean_active/

input type=hidden name=__checkbox_bean.active value=true/

i don't understand what the hidden field is for and why it's needed.

-- Allen

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



How to avoid hard coding input result

2007-05-02 Thread stanlick

How do I get the Action input to return to *the* page that failed the
validation?  It could be addPage, UpdatePage, or deletePage.

result name=input
   type=tiles
   *_tileThatFailedValidation_*
/result

--
Scott
[EMAIL PROTECTED]


Re: How to avoid hard coding input result

2007-05-02 Thread Musachy Barroso

Struts never knows what is *the page* that failed. The action gets an http
request, but it doesn't know what was the page, with the submit in it, that
caused the request. You can pass a hidden field with the name of the
page(let's say inputPage), and then have a result like this:

result name=input
  type=tiles
  ${#parameters.inputPage}
/result

musachy

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


How do I get the Action input to return to *the* page that failed the
validation?  It could be addPage, UpdatePage, or deletePage.

result name=input
type=tiles
*_tileThatFailedValidation_*
/result

--
Scott
[EMAIL PROTECTED]





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


Re: why does s:checkbox render 2 input elements?

2007-05-02 Thread Dave Newton
--- Allen Gilliland [EMAIL PROTECTED] wrote:
 why is it that when i create a checkbox using the
 s:checkbox tag that i end up with 2 html inputs?

This way you don't have to do anything special for
non-checked checkboxes (like in S1 you had to use the
ActionForm reset method). Non-checked checkboxes are
not sent back to the server.

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Tiles 2 woes

2007-05-02 Thread stanlick

Thanks Dave --

Perhaps if I explain this in a different context we can arrive at the
optimum solution.  To begin, I am writing a generic CRUD where all my
results are complex tiles pages.  I have a single Action that handles each
of the CRUD user gestures as follows:

   action name=course_* method={1} class=course
   result name=input  type=tiles{1}Course.page/result
   result name=list type=tiles{1}Course.page/result
   result name=addtype=tiles{1}Course.page/result
   result name=show  type=tiles{1}Course.page/result
   result name=edit
type=tiles{1}Course.page/result
   result name=destroy   type=tiles{1}Course.page/result

   /action

After trying several techniques to prepare the tiles using S2 and falling
short, I then shifted my concentration to the Tiles ViewPreparer to perform
the tiles setup.  From that vantage point, is was even worse!  Actions work
with beans/OGNL in a custom tag friendly way; tiles does not.  The
ViewPreparer works fine for stashing collections of beans in the request
scope and then manually working them into the JSP.  What I nearly have
working is the attached workflow.

Examples to better understand graphic

hyperlink=course_add
method=add() in CourseAction
result=add from add() in CourseAction
tile=addCourse.page
tile form action=course_save() in CourseAction
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Tiles 2 woes

2007-05-02 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 Actions work with beans/OGNL in a custom tag
friendly
 way; tiles does not.  The ViewPreparer works fine
for
 stashing collections of beans in the request
 scope and then manually working them into the JSP. 

I don't think the list supports attachments; at least
I didn't get anything.

What I'm saying, though, is that you can put anything
you want onto the OGNL stack from within a Tiles view
preparer (for my test I extended whatever that base
class w/ the execute(...) method) and access them
through the S2 tags. 

I tested both placing named objects on the stack via
set(ognlExpression, object) and push(object).

What specifically isn't working for you?

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: How to avoid hard coding input result

2007-05-02 Thread stanlick

Thanks brother!  Is this old school technique still used in S2?  I would
have guessed S2 would hold on to previous request information in the
ActionContext so developers would no longer have to do this riff raff.

On 5/2/07, Musachy Barroso [EMAIL PROTECTED] wrote:


Struts never knows what is *the page* that failed. The action gets an http
request, but it doesn't know what was the page, with the submit in it,
that
caused the request. You can pass a hidden field with the name of the
page(let's say inputPage), and then have a result like this:

result name=input
   type=tiles
   ${#parameters.inputPage}
/result

musachy

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

 How do I get the Action input to return to *the* page that failed the
 validation?  It could be addPage, UpdatePage, or deletePage.

 result name=input
 type=tiles
 *_tileThatFailedValidation_*
 /result

 --
 Scott
 [EMAIL PROTECTED]




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





--
Scott
[EMAIL PROTECTED]


Re: How to avoid hard coding input result

2007-05-02 Thread stanlick

Is there a soft way to get the name of the tile definition into this
hidden field without hard coding it someplace?  I really dislike coding
names and places beyond the XML file itself.  I already have a BaseAction
that extends ActionSupport that is starting to make me ill!  I really would
have guessed that S2 would have offered a way to *discover* where control
should return in the event of validation failure.  Right now, my BaseAction
property is not even helping since the Action is being replaced on each
request!!!

On 5/2/07, Musachy Barroso [EMAIL PROTECTED] wrote:


Struts never knows what is *the page* that failed. The action gets an http
request, but it doesn't know what was the page, with the submit in it,
that
caused the request. You can pass a hidden field with the name of the
page(let's say inputPage), and then have a result like this:

result name=input
   type=tiles
   ${#parameters.inputPage}
/result

musachy

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

 How do I get the Action input to return to *the* page that failed the
 validation?  It could be addPage, UpdatePage, or deletePage.

 result name=input
 type=tiles
 *_tileThatFailedValidation_*
 /result

 --
 Scott
 [EMAIL PROTECTED]




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





--
Scott
[EMAIL PROTECTED]


Re: Tiles 2 woes

2007-05-02 Thread stanlick

In short... workflow. I am trying to leverage XML validation, wildcards,
tiles, and a Spring injected Action.  Also, I'm trying to wire the results
in the action mapping in such a way that I am not recreating the wheel each
time I need another CRUD.  It just seems like some of the parts within this
equation are working against other parts.  I could easily code this using
verbose configuration if I were not concerned with duplicating effort for
the next CRUD.

On 5/2/07, Dave Newton [EMAIL PROTECTED] wrote:


--- [EMAIL PROTECTED] wrote:
 Actions work with beans/OGNL in a custom tag
friendly
 way; tiles does not.  The ViewPreparer works fine
for
 stashing collections of beans in the request
 scope and then manually working them into the JSP.

I don't think the list supports attachments; at least
I didn't get anything.

What I'm saying, though, is that you can put anything
you want onto the OGNL stack from within a Tiles view
preparer (for my test I extended whatever that base
class w/ the execute(...) method) and access them
through the S2 tags.

I tested both placing named objects on the stack via
set(ognlExpression, object) and push(object).

What specifically isn't working for you?

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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





--
Scott
[EMAIL PROTECTED]


Re: Tiles 2 woes

2007-05-02 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 In short... workflow. 

Oh. I just know about the Tiles/OGNL stuff :)

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: S2: submit tag and handler

2007-05-02 Thread Scott Nesbitt

Well, I tried this:

function handler(widget, node)
{
   var beforeTopicsArray =
widget.beforeNotifyTopicsArray;
   widget.beforeNotifyTopicsArray = null;
   widget.reloadContents();
   widget.beforeNotifyTopicsArray = beforeTopicsArray;
}

and now I do not get a stack overflow, but the action
is still not getting called.

Scott

--- Musachy Barroso [EMAIL PROTECTED] wrote:

 My bad, the notifyTopics are published inside that
 function so it won't
 work. Warning: Hack ahead :)
 
 var beforeTopicsArray =
 widget.beforeNotifyTopicsArray;
 widget.beforeNotifyTopicsArray = null;
 widget.reloadContents();
 widget.beforeNotifyTopicsArray = beforeTopicsArray;
 
 I will add a refreshContent method that will be
 common for all of the
 widgets (and part of the api), with one
 parameter(boolean), to skip the
 publishing of the topics.
 
 musachy
 
 On 5/2/07, Scott Nesbitt [EMAIL PROTECTED]
 wrote:
 
 
  Hmm, this:
 
  function handler(widget, node)
  {
 widget.reloadContents();
  }
 
  Gives Stack overflow at line: 4872
 
  Scott
 
  --- Musachy Barroso [EMAIL PROTECTED] wrote:
 
   If you are using submit, or anchor tag you can
 call
   reloadContents() on
   the widget passed as a parameter, if you are
 using
   the div tag, you can call
   refresh() on it. These functions are not
 really
   part of the api and might
   change in the future (although it would be nice
 if
   they were right?).
  
   musachy
  
   On 5/2/07, Scott Nesbitt
 [EMAIL PROTECTED]
   wrote:
   
   
Yes, I would like to do the request in the
   JavaScript
because I need to do some other work there
 before
   the
request happens.
   
If I knew how Struts did the request I would
 just
   do
the same thing at the bottom of my function.
   
Scott
   
--- Musachy Barroso [EMAIL PROTECTED] wrote:
   
 The whole idea behind the handler function
 is
   that
 you are going to make
 the request yourself, instead of letting
 struts
   do
 it for you. The handler
 is just a plain javascript function like:

 function superHandler(widget, domNode) {
   //use some other framework to do the ajax
   request,
 Dojo, Prototype, YUI,
 DWR, JQuery,zillion_framework_name
 }

 is that what you are trying to do? do the
   request
 yourself?

 musachy

 On 5/2/07, Scott Nesbitt
   [EMAIL PROTECTED]
 wrote:
 
  Does anyone know how to invoke a request
 from
   a
 submit
  handler function?
 
 
  I am using a submit tag like this:
 
  div id=t1Div 1/div
  s:url id=ajaxTest
 value=SaveLineup.action
   /
  img id=indicator
   src=images/indicator.gif
   alt=Loading...
   style=display:none/
  s:submit type=submit
theme=ajax
value=Save
title=Save all changes.
cssClass=butstylewide
targets=t1
handler=handler
notifyTopics=/after
href=%{ajaxTest}
align=left
indicator=indicator/
 
  My Javascript looks like this:
 
  function handler(widget, node)
  {
 alert(DEBUG in handler);
  }
 
  dojo.event.topic.subscribe(/after,
 function(data,
  type, e)
  {
 alert(Lineup saved);
  });
 
  The documentation says this:
 
  'handler' is the name of the function that
   will
 take
  care of making the AJAX request. Dojo's
 widget
   and
 dom
  node are passed as parameters).
 
  But I do not see any example of how to
   actually do
  that.  I guess it is some Dojo magic but
   looking
  through the Dojo documentation has not
 proved
  illuminating.  (BTW, I know if I do not
 have
 handler
  specified it calls the action but I need
 to do
 some
  JavaScript work beforehand.)
 
  Thanks,
 
  Scott
 
 
  
 __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best
 spam
 protection around
  http://mail.yahoo.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

   
   
   
 __
 
=== message truncated ===


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [s2] is there an equivalent for the old html:multibox tag?

2007-05-02 Thread Allen Gilliland
In case someone else is trying to do the same thing, here is the 
solution I came up with.  Using a multiple s:checkbox instances with a 
name that points to a String[] did not give the results I wanted so I 
had to bag that idea.  Instead I did this ...


Action:

private String[] deleteIds = new String[0];
public String[] getDeleteIds();
public void setDeleteIds(String[] ids);

Jsp:

s:iterator id=entry value=someCollectionOfObjects
  s:checkboxlist name=deleteIds list={#entry} listKey=id /

  // do any other work using #entry
/s:iterator


with this I can call getDeleteIds() in my action after a submit and it 
will return a String[] of all ids that were checked for deletion.  also, 
when the form is being populated in the jsp it will automatically check 
the box for each entry that had its id in the deleteIds array, so if 
there is a submission error then the checkboxes are properly repopulated.


the only downside so far is that s:checkboxlist automatically creates a 
label for each checkbox, which may not be desired.  i am just using css 
to display:none those labels as a work around, which isn't the best 
case scenario, but it works.


-- Allen


Allen Gilliland wrote:
Okay, I guess that s:checkbox can do what I want but I am having trouble 
getting the multiple values from the results of my checkboxes.  So if I 
have this ...


s:iterator id=entry value=myCollection
  s:checkbox name=deleteIds fieldValue=%{entry.id} /
  s:checkbox name=disableIds fieldValue=%{entry.id} /
/s:iterator

and in my action ...

private String[] deleteIds = new String[0];
public String[] getDeleteIds();
public void setDeleteIds(String[] deleteIds);
// same thing for disableIds

I think that should work but I'm not getting the values that I expect. 
When I check only a single box it seems to submit values for both the 
delete and disabled boxes, and if I check multiple boxes I only get a 
single value.


I am also curious why there are 2 inputs for my checkboxes ...

input type=checkbox name=deleteIds 
value=0112f2dd1248f33f011248f6bcb40004 
id=globalCommentManagement_deleteIs/
input type=hidden name=__checkbox_deleteIds 
value=0112f2dd1248f33f011248f6bcb40004/


is String[] the right type to use for collecting the values of the 
checkboxes?  why am i not getting the multiple values and why are the 2 
checkboxes affecting each other?


-- Allen


Allen Gilliland wrote:
actually, I did have trouble getting it to work but it doesn't really 
matter because that's not really what I am looking for.  That tag will 
create a whole list of checkboxes, but what I really need is to create 
a single checkbox which is part of a list.  It's a weird situation so 
it wouldn't really surprise me if s2 didn't have support for it, but I 
wanted to ask.


in any case, the situation is that i am iterating over a collection 
and displaying each entry in a list on the page.  in that list i am 
providing a couple of checkboxes which affect the status of that 
entry, 1 which would delete the entry, the other which would set a 
different status.  so my basic code is ...


s:iterator list=myCollection
  tr class=entry
td // delete checkbox /td
td // status checkbox /td
td // print entry details /td
  /tr
/s:iterator

so i'm not really trying to print a whole list of checkboxes, i'm 
trying to print a single checkbox which is based on a list.  it looks 
like that's what the old html:multibox tag was for, but i dunno, i 
didn't write the original code that i am updating :/


-- Allen


Dave Newton wrote:

--- Allen Gilliland [EMAIL PROTECTED] wrote:

Is there a direct equivalent struts2 tag to the
struts1 html:multibox tag?  I am looking at some old


code being migrated and i'm not sure how best to accomplish the same 
thing in struts2 ...


Does s:checkboxlist.../ not work for you?

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

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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]



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



Dynamic resource bundle?

2007-05-02 Thread Alan Treece
Still using the 1.2.9 version of Struts and was posed an interesting  
question. Considering the fact that dropping a modified JSP file in  
the web container will force a re-compile of the JSP thereby  
rendering a changed display. What are the possibilities if you drop a  
new ApplicationResources.properties file into the container? I know  
that normally you are required to stop and start the web app to see  
these changes, but is there a way to force the change in the resource  
bundle?



Thanks, ajTreece

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



[s2] Form/action data binding not working

2007-05-02 Thread Luciano Costa
Hi!

I'm trying to use a submit button outside the form I want to submit, but
it's not working.

@s.submit 
type=submit 
theme=ajax 
label=Salvar 
targets=divNewsForm 
formId=formNews
href=${urlNewsForm_Save} /


In this case I want to submit the formNews form.


Att,

Luciano Costa
monttez.com

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de
Allen Gilliland
Enviada em: quarta-feira, 2 de maio de 2007 12:01
Para: Struts Users Mailing List
Assunto: Re: [s2] is there an equivalent for the old html:multibox tag?

In case someone else is trying to do the same thing, here is the 
solution I came up with.  Using a multiple s:checkbox instances with a 
name that points to a String[] did not give the results I wanted so I 
had to bag that idea.  Instead I did this ...

Action:

private String[] deleteIds = new String[0];
public String[] getDeleteIds();
public void setDeleteIds(String[] ids);

Jsp:

s:iterator id=entry value=someCollectionOfObjects
   s:checkboxlist name=deleteIds list={#entry} listKey=id /

   // do any other work using #entry
/s:iterator


with this I can call getDeleteIds() in my action after a submit and it 
will return a String[] of all ids that were checked for deletion.  also, 
when the form is being populated in the jsp it will automatically check 
the box for each entry that had its id in the deleteIds array, so if 
there is a submission error then the checkboxes are properly repopulated.

the only downside so far is that s:checkboxlist automatically creates a 
label for each checkbox, which may not be desired.  i am just using css 
to display:none those labels as a work around, which isn't the best 
case scenario, but it works.

-- Allen


Allen Gilliland wrote:
 Okay, I guess that s:checkbox can do what I want but I am having trouble 
 getting the multiple values from the results of my checkboxes.  So if I 
 have this ...
 
 s:iterator id=entry value=myCollection
   s:checkbox name=deleteIds fieldValue=%{entry.id} /
   s:checkbox name=disableIds fieldValue=%{entry.id} /
 /s:iterator
 
 and in my action ...
 
 private String[] deleteIds = new String[0];
 public String[] getDeleteIds();
 public void setDeleteIds(String[] deleteIds);
 // same thing for disableIds
 
 I think that should work but I'm not getting the values that I expect. 
 When I check only a single box it seems to submit values for both the 
 delete and disabled boxes, and if I check multiple boxes I only get a 
 single value.
 
 I am also curious why there are 2 inputs for my checkboxes ...
 
 input type=checkbox name=deleteIds 
 value=0112f2dd1248f33f011248f6bcb40004 
 id=globalCommentManagement_deleteIs/
 input type=hidden name=__checkbox_deleteIds 
 value=0112f2dd1248f33f011248f6bcb40004/
 
 is String[] the right type to use for collecting the values of the 
 checkboxes?  why am i not getting the multiple values and why are the 2 
 checkboxes affecting each other?
 
 -- Allen
 
 
 Allen Gilliland wrote:
 actually, I did have trouble getting it to work but it doesn't really 
 matter because that's not really what I am looking for.  That tag will 
 create a whole list of checkboxes, but what I really need is to create 
 a single checkbox which is part of a list.  It's a weird situation so 
 it wouldn't really surprise me if s2 didn't have support for it, but I 
 wanted to ask.

 in any case, the situation is that i am iterating over a collection 
 and displaying each entry in a list on the page.  in that list i am 
 providing a couple of checkboxes which affect the status of that 
 entry, 1 which would delete the entry, the other which would set a 
 different status.  so my basic code is ...

 s:iterator list=myCollection
   tr class=entry
 td // delete checkbox /td
 td // status checkbox /td
 td // print entry details /td
   /tr
 /s:iterator

 so i'm not really trying to print a whole list of checkboxes, i'm 
 trying to print a single checkbox which is based on a list.  it looks 
 like that's what the old html:multibox tag was for, but i dunno, i 
 didn't write the original code that i am updating :/

 -- Allen


 Dave Newton wrote:
 --- Allen Gilliland [EMAIL PROTECTED] wrote:
 Is there a direct equivalent struts2 tag to the
 struts1 html:multibox tag?  I am looking at some old

 code being migrated and i'm not sure how best to accomplish the same 
 thing in struts2 ...

 Does s:checkboxlist.../ not work for you?

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

 d.


 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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

Re: accessing ognl from jsp 2.0 el?

2007-05-02 Thread John M Flinchbaugh
Synopsis:
FilterDispatcher may not cleanup completely and causes the
StrutsRequestWrapper to be omitted in some executions (race condition).
Adding ActionContextCleanUp filter seems to alleviate the issue.  As
advertized, I'd expect FilterDispatcher to be able to function on its
own.

Long story:
In a previous message (which I linked/included below), I expressed my
trouble with accessing values from the ValueStack from JSP 2.0 EL.  Upon
reloading, the EL values would come back null sometimes, and other times
populated.

After a bit of debugging, I found that the StrutsRequestWrapper was not
always being wrapped around the request object we get from tomcat.  When
this was missing, I'd obviously not have access to the value stack.

It seemed to be a bit of a race condition where the FilterDispatcher
would decide we already had a Dispatcher (du) object (see
FilterDispatcher, line 311).  Firefox requesting both the action and the
stylesheet (2 requests) seemed to trigger the race where one request
would initialize the null Dispatcher (possibly incompletely clean it up),
and the other request would get the old Dispatcher instance so it
would just proceed with the unwrapped request object.

I was using the FilterDispatcher by itself, and I think it may have
failed to cleanup everything for itself and sometimes that incomplete
Dispatcher would leak into the other request.

When I added the ActionContextCleanUp filter to the web.xml, the
StrutsRequestWrapper seems to be used reliably.

-- 
John M Flinchbaugh
[EMAIL PROTECTED]

http://www.nabble.com/accessing-ognl-from-jsp-2.0-el--tf3671805.html
-- cut --

In webwork, I had become accustomed to having a getXyz() method on an
action, and being able to just access it in jsp as ${xyz}.  The ability
was just built in, per:
http://wiki.opensymphony.com/display/WW/Using+WebWork+and+XWork+with+JSP+2.
0+and+JSTL+1.1

Struts 2 has this same page without the note about it being automatic:
http://struts.apache.org/2.x/docs/using-struts-and-xwork-with-jsp-20-and-js
tl-11.html

Is the Struts doc up-to-date?  Is it really required that I expose them
manually?  Here's where it gets wierd:

I've had to look this all up, because I've seen in Struts 2.0.6 evaluate
${xyz} just fine without any extra work, just as I had seen in webwork,
but it doesn't work reliably.  At times, I'll reload, and see all the
ognl values (referenced as el) disappear from the screen!  What is
happening?!  Reload a couple more times, and they come back!  It's quite
perplexing.  

Putting a s:set name = xyz value = xyz/ makes it stick reliably.  
Using ognl-aware tags also work reliably.  I found this hint here:
http://struts.apache.org/2.x/docs/exposing-framework-objects-to-jstl-with-a
-jstl-and-displaytag-example.html

Thanks for any help you may be able to provide. 


signature.asc
Description: Digital signature


Re: How to avoid hard coding input result

2007-05-02 Thread stanlick

Are you sure about this technique?  I have the hidden field in my page and I
can see that it is set to the correct string, however, when this page is
POSTed, I get the following error.  It appears that the hidden field is not
quite making it into the struts.xml result.


15:04:38,762  WARN org.apache.tiles.impl.BasicTilesContainer.render:368 -
Unable to find the definition ''
May 2, 2007 3:04:38 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
org.apache.tiles.definition.NoSuchDefinitionException:

On 5/2/07, Musachy Barroso [EMAIL PROTECTED] wrote:


Struts never knows what is *the page* that failed. The action gets an http
request, but it doesn't know what was the page, with the submit in it,
that
caused the request. You can pass a hidden field with the name of the
page(let's say inputPage), and then have a result like this:

result name=input
   type=tiles
   ${#parameters.inputPage}
/result

musachy

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

 How do I get the Action input to return to *the* page that failed the
 validation?  It could be addPage, UpdatePage, or deletePage.

 result name=input
 type=tiles
 *_tileThatFailedValidation_*
 /result

 --
 Scott
 [EMAIL PROTECTED]




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





--
Scott
[EMAIL PROTECTED]


Re: How to avoid hard coding input result

2007-05-02 Thread Musachy Barroso

I'm not sure what that error is, but you can use OGNL expression on results,
using ${expression}, and the request parameters are available in
#parameters, so yes, it should work :)

musachy

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


Are you sure about this technique?  I have the hidden field in my page and
I
can see that it is set to the correct string, however, when this page is
POSTed, I get the following error.  It appears that the hidden field is
not
quite making it into the struts.xml result.


15:04:38,762  WARN org.apache.tiles.impl.BasicTilesContainer.render:368 -
Unable to find the definition ''
May 2, 2007 3:04:38 PM org.apache.catalina.core.StandardWrapperValveinvoke
SEVERE: Servlet.service() for servlet default threw exception
org.apache.tiles.definition.NoSuchDefinitionException:

On 5/2/07, Musachy Barroso [EMAIL PROTECTED] wrote:

 Struts never knows what is *the page* that failed. The action gets an
http
 request, but it doesn't know what was the page, with the submit in it,
 that
 caused the request. You can pass a hidden field with the name of the
 page(let's say inputPage), and then have a result like this:

 result name=input
type=tiles
${#parameters.inputPage}
 /result

 musachy

 On 5/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  How do I get the Action input to return to *the* page that failed the
  validation?  It could be addPage, UpdatePage, or deletePage.
 
  result name=input
  type=tiles
  *_tileThatFailedValidation_*
  /result
 
  --
  Scott
  [EMAIL PROTECTED]
 



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




--
Scott
[EMAIL PROTECTED]





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


Re: Dynamic resource bundle?

2007-05-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alan,

Alan Treece wrote:
 is there a way to force the change in the resource bundle?

I assume that you mean that you want the server to /automatically/
reload the resource bundle?

Some servers provide a mechanism for watching specific files for changes
and reloading the webapp if they do.

For instance, recent versions of Apache Tomcat (check your docs for
older versions) support a WatchedResource element in the webapp
deployment descriptor (context.xml) for this kind of thing. See
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html for details
on Apache Tomcat 5.5.

- -chris

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

iD8DBQFGOP1z9CaO5/Lv0PARAhImAJ4w53Dj5nMiwZS1YTA+zvbu8FCAlACeN3Rn
M6Ta4UN90957ckoJlFUvgTI=
=4kRT
-END PGP SIGNATURE-

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



Re: [S1] Application container during development for fastest code/test cycle?

2007-05-02 Thread Antony Stubbs

Yes, I was playing with Maven last night... Unfort this is a short term
project, and the powers that be wouldn't let me rearrange our structure to
fit Maven. Plus we have some funny security configuration and JNDI stuff on
Websphere that I'm not sure Jetty would support 
But I'm definitely going to push for Maven on our next project - looks
great!


James Mitchell-7 wrote:
 
 Hi, for a 2 minute demo of how nice the maven jetty integration is,  
 try this:
 
 (You must have Maven and SVN client installed)
 
 $ svn co http://svn.apache.org/repos/asf/struts/struts2/tags/ 
 STRUTS_2_0_6/apps/mailreader/
 $ cd mailreader
 $ mvn jetty:run
 
 Open your browser to localhost:8080/struts2-mailreader/
 
 Have fun!
 
 
 --
 James Mitchell
 
 
 
 On May 1, 2007, at 6:16 PM, Antony Stubbs wrote:
 

 We're developing a Struts application which will be deployed onto  
 Websphere
 eventually.

 However, I find Websphere very heavy weight do use during  
 development -
 publishing seems to take for ever, and seems as thought for many  
 changes it
 must be restarted.

 What's a common container to use during development that will  
 facilitate the
 fastest (computer burden-wise) code, deploy, test, code, deploy,  
 test cycles
 etc?

 I've tried Tomcat, and that seems to work better, but it still has  
 to be
 restarted (well, eclipse (RAD actually) seems to insist on  
 restarting it).
 Jetty? And are there any guides out there to guide in setting up  
 the fastest
 environment?

 Is there anyway to get changes instantaneously viewable aka  
 Grails / Rails
 etc?

 I will need to setup JNI for the datasource (DB2 and Oracle) in the
 container, and even better have the container support  
 j_security_check.
 -- 
 View this message in context: http://www.nabble.com/-S1-- 
 Application-container-during-development-for-fastest-code-test- 
 cycle--tf3677559.html#a10276929
 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/-S1--Application-container-during-development-for-fastest-code-test-cycle--tf3677559.html#a10295860
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: [S1] Application container during development for fastest code/test cycle?

2007-05-02 Thread James Mitchell
Actually, you can use Maven with any structure you like.  As far as  
dealing with funky jndi, combining the powers of Maven and Spring  
would take care of those concerns.


What issue are you having?


--
James Mitchell



On May 2, 2007, at 6:16 PM, Antony Stubbs wrote:



Yes, I was playing with Maven last night... Unfort this is a short  
term
project, and the powers that be wouldn't let me rearrange our  
structure to
fit Maven. Plus we have some funny security configuration and JNDI  
stuff on

Websphere that I'm not sure Jetty would support
But I'm definitely going to push for Maven on our next project - looks
great!


James Mitchell-7 wrote:


Hi, for a 2 minute demo of how nice the maven jetty integration is,
try this:

(You must have Maven and SVN client installed)

$ svn co http://svn.apache.org/repos/asf/struts/struts2/tags/
STRUTS_2_0_6/apps/mailreader/
$ cd mailreader
$ mvn jetty:run

Open your browser to localhost:8080/struts2-mailreader/

Have fun!


--
James Mitchell



On May 1, 2007, at 6:16 PM, Antony Stubbs wrote:



We're developing a Struts application which will be deployed onto
Websphere
eventually.

However, I find Websphere very heavy weight do use during
development -
publishing seems to take for ever, and seems as thought for many
changes it
must be restarted.

What's a common container to use during development that will
facilitate the
fastest (computer burden-wise) code, deploy, test, code, deploy,
test cycles
etc?

I've tried Tomcat, and that seems to work better, but it still has
to be
restarted (well, eclipse (RAD actually) seems to insist on
restarting it).
Jetty? And are there any guides out there to guide in setting up
the fastest
environment?

Is there anyway to get changes instantaneously viewable aka
Grails / Rails
etc?

I will need to setup JNI for the datasource (DB2 and Oracle) in the
container, and even better have the container support
j_security_check.
--
View this message in context: http://www.nabble.com/-S1--
Application-container-during-development-for-fastest-code-test-
cycle--tf3677559.html#a10276929
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/-S1-- 
Application-container-during-development-for-fastest-code-test- 
cycle--tf3677559.html#a10295860

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: [S1] Application container during development for fastest code/test cycle?

2007-05-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Antony,

Antony Stubbs wrote:
 We're developing a Struts application which will be deployed onto
 Websphere eventually.

Honestly, it's best to develop on the save application server that you
intend to use for production. Standard APIs are all well and good, but
sometimes they are not implemented exactly the same way or they have
quirks, etc. Also, configuration /will/ be very different and it's best
to get lots of testing worked-into your configuration as well as your
code. Just my 0.02.

 However, I find Websphere very heavy weight do use during development
 - publishing seems to take for ever, and seems as thought for many
 changes it must be restarted.

This will be true for most containers... some operations simply require
a (manual) restart to pick some things up. You can rig Tomcat to watch
certain resources (such as struts-config.xml) and automatically reload
the webapp when they change. I'm sure this option is available in other
containers as well.

 What's a common container to use during development that will
 facilitate the fastest (computer burden-wise) code, deploy, test,
 code, deploy, test cycles etc?

That's a matter of taste, but I happen to use Tomcat. We also use Tomcat
for deployment, so it's only natural for us to use it in development, too.

 I've tried Tomcat, and that seems to work better, but it still has to
 be restarted (well, eclipse (RAD actually) seems to insist on
 restarting it). Jetty? And are there any guides out there to guide in
 setting up the fastest environment?

I don't use an IDE myself... just ant from the command-line to build,
deploy, and restart the container (if necessary). I find that my
development style favors larger changes being deployed all at once
instead of, say, whenever a single source file changes (as might be the
case when using an IDE that compiles directly into the deployment
directory). I find this more convenient because the webapp reloads less
often -- that is, only when I explicitly need it to reload.

 Is there anyway to get changes instantaneously viewable aka Grails /
 Rails etc?

I don't anything about .*[Rr]ails but with a Java app server the entire
webapp generally has to be reloaded to pick up a class file change. JSPs
can usually be reloaded independently from the webapp itself.

 I will need to setup JNI for the datasource (DB2 and Oracle) in the 
 container, and even better have the container support
 j_security_check.

I doubt you'd find a Java app server that doesn't support JNDI (I assume
you meant JNDI and not JNI) for data sources. j_security_check is a part
of the servlet spec, so every compliant servlet container will support
it (in one way or another). My experience is that most app servers
support j_security_check to the minimum extent possible, so you'll
probably be fine no matter what.

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

iD8DBQFGORMy9CaO5/Lv0PARAhTtAJ47kYCHRBN2r93RktD76AmtKvxrcACeOc4q
76pZQS/jGtjJmXHY7tlpwrQ=
=NUsn
-END PGP SIGNATURE-

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



Re: Invalid for tag html according to TLD

2007-05-02 Thread wong wayne
thanks Nuwan. Finally get it work and next step would
be moved this prototype into latest version 1.3.8 :)
--- Nuwan Chandrasoma [EMAIL PROTECTED] wrote:

 Hi,
 
 Well it is  DEPRECATED in struts 1.2.9
 

http://struts.apache.org/1.2.9/userGuide/struts-html.html#html
 
 Thanks,
 
 Nuwan
 
 
 - Original Message - 
 From: Nuwan Chandrasoma [EMAIL PROTECTED]
 To: Struts Users Mailing List
 user@struts.apache.org
 Sent: Wednesday, May 02, 2007 11:18 AM
 Subject: Re: Invalid for tag html according to TLD
 
 
  Hi,
 
  Its something to do with your TLD files., the
 attribute 'locale' is 
  removed from the TLD file you are using., are you
 using the same struts 
  version that is sepcified for this tutorial?. this
 may be due to different 
  TLD files you have in the librareis you are using.
 
  Thanks,
 
  Nuwan
 
  - Original Message - 
  From: wong wayne [EMAIL PROTECTED]
  To: user@struts.apache.org
  Sent: Wednesday, May 02, 2007 8:04 AM
  Subject: Invalid for tag html according to TLD
 
 
  Dear All
 
  I'm new to Struts and building a prototype with
  struts, ,hibernate and spring follow the
 instruction
  at
 

http://www.roseindia.net/struts/hibernate-spring/index.shtml
 
  When I execute the example, exception generated
  (Attribute locale invalid for tag html according
 to
  TLD). After I remove the locale tag (html:html
  locale=true - html:html) at jsp, this example
 works
  fine. I have no idea for this error, can somebody
 give
  me some hints? Thanks.
 
  Attached please find jsp and struts configuration
 file
  for your reference.
 
  regards
 
  wayne
 
 
 
 
 __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
 
 
 


 
 
  ?xml version=1.0 encoding=ISO-8859-1 ?
 
  !DOCTYPE struts-config PUBLIC
   -//Apache Software Foundation//DTD
 Struts Configuration 
  1.2//EN
  

http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd;
 
  !--
  This is a blank Struts configuration file
 with an example
  welcome action/page and other commented
 sample elements.
 
  Tiles and the Struts Validator are configured
 using the factory 
  defaults
  and are ready-to-use.
 
  NOTE: If you have a generator tool to create
 the corresponding Java 
  classes
  for you, you could include the details in the
 form-bean 
  declarations.
  Otherwise, you would only define the
 form-bean element itself, with 
  the
  corresponding name and type attributes,
 as shown here.
  --
 
 
  struts-config
 
  !-- 
 Data Source 
  Configuration --
  !--
  data-sources
  data-source
 type=org.apache.commons.dbcp.BasicDataSource
 set-property
   property=driverClassName
   value=org.postgresql.Driver /
 set-property
   property=url
  
 value=jdbc:postgresql://localhost/mydatabase /
 set-property
   property=username
   value=me /
 set-property
   property=password
   value=test /
 set-property
   property=maxActive
   value=10 /
 set-property
   property=maxWait
   value=5000 /
 set-property
   property=defaultAutoCommit
   value=false /
 set-property
   property=defaultReadOnly
   value=false /
 set-property
   property=validationQuery
   value=SELECT COUNT(*) FROM market /
  /data-source
  /data-sources
  --
 
  !--
 
 Form Bean 
  Definitions --
 
 form-beans
   !-- sample form bean descriptor for an
 ActionForm
 form-bean
 name=inputForm
 type=app.InputForm/
 end sample --
 
 !-- sample form bean descriptor for a
 DynaActionForm
 form-bean
 name=logonForm

 type=org.apache.struts.action.DynaActionForm
 form-property
 name=username
 type=java.lang.String/
 form-property
 name=password
 type=java.lang.String/
/form-bean
 end sample --
 
 
 
 
  form-bean name=UserLoginForm
  
 type=roseindia.web.struts.form.UserLoginForm
 /form-bean
 
  form-bean name=UserRegisterForm
  
 type=roseindia.web.struts.form.UserRegisterForm
 /form-bean
 
 
  form-bean name=UserForgetPasswordForm
  

type=roseindia.web.struts.form.UserForgetPasswordForm
 
=== message truncated ===


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Struts 2.0.6 with Tomcat 6.0

2007-05-02 Thread Rohit Dewan

I am considering the use of Tomcat 6.0 which implements Servlet 2.5 and JSP
2.1. Should I expect any issues using it with Struts 2.0.6?

Regards,
Rohit


[S2] Action Forward?

2007-05-02 Thread Daniel Ruan

I come from the Struts 1 world, and am trying to find out how to do this
properly in Struts 2.

This is a common issues. Let's say we have a Web site that has both
protected (needs login) and public resources.  If users click a link to a
protected resource, the site will direct users to log in; then upon success,
send users to where they came from (another redirect).

I found an example of passing dynamic redirect parameters,  like this:

   result name=redirect type=redirect-action
   param name=actionNamedisplaySalesOrder/param
   param name=namespace/order/sales/param
   param name=parsetrue/param
   param name=id${order.id}/param
   /result

But in my case, everything is dynamic for the logon success redirect! That
includes action name, name space, number of parameters, name of parameters,
parameter values or OGNL expressions.

Any ideas?

Thanks in advance!

/daniel