Re: Problems with forms field

2008-05-19 Thread Laurie Harper

Looks like you're missing a getter for dadosPessoais in your action class...

L.

Felipe Lorenz wrote:

Ok.. i did it... its all right.. but i dont know...

i will print my code:

JSP:
<[EMAIL PROTECTED] contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
http://www.w3.org/TR/html4/loose.dtd";>



JSP Page











MY STRUTS.XML:






/TH_DadosPessoais.jsp




ACTION CLASS
public class DadosPessoaisAction
{
private DadosPessoais dadosPessoais;
public String create()
{
System.out.println("DADOS PESSOAIS");
System.out.println(dadosPessoais.getNome());
System.out.println(dadosPessoais.getOrigem());
System.out.println(dadosPessoais.getCpf());

return ActionSupport.SUCCESS;
}

public void setDadosPessoais(DadosPessoais dadosPessoais) {
this.dadosPessoais = dadosPessoais;
}
}

DadosPessoais Class:
public class DadosPessoais
{
private String nome;
private String origem;
private String cpf;
public void setNome(String nome) {
this.nome = nome;
}
public String getNome() {
return nome;
}
public void setOrigem(String origem) {
this.origem = origem;
}
public String getOrigem() {
return origem;
}
public String getCpf() {
return cpf;
}
public void setCpf(String cpf) {
this.cpf = cpf;
}


}


On Mon, May 19, 2008 at 3:30 PM, Milan Milanovic <[EMAIL PROTECTED]>
wrote:


Check the names of the fields, they must mach with attributes names in
action class, and also check that you have correct get/set methods for them
in your action class.

--
Milan

Jim Kiley <[EMAIL PROTECTED]> wrote: Felipe,

It would be much easier for others to help you if you would include
relevant
parts of your code, as well as let us know what version of Struts you are
using.

jk

On Mon, May 19, 2008 at 2:15 PM, Felipe Lorenz
 wrote:


Hi,

i did work with struts, and im work with it. But, i dont how, the value

of

field are not send to Action class.. for example:

My forms have 3 fields.. text.. normal.. simple..

so, when i submit this the form only the last filed are set.

I put a System.out in my action class, and i see only the last field
seted..
the other stay NULL...

Why?




--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com









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



Re: [Struts 2] Datetimepicker tag Bug ?!

2008-05-19 Thread Ian Meikle
I have had the same problem.
I assume you are not using an US locale in your client browser.
We use Norwegian and German and it does not work.

Regards
Ian

CSC Solutions Norge AS
Registered Office: Sandsliåsen 57, 5254 Sandsli, Norway 
Registered in Norway No: 958 958 455

-
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. 
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to 
any order or other contract unless pursuant to explicit written agreement 
or government initiative expressly permitting the use of e-mail for such 
purpose.
-




Milan Milanovic <[EMAIL PROTECTED]> 
19.05.2008 23:38
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: [Struts 2] Datetimepicker tag Bug ?!






I tried everything with  tag!

It seems that Struts 2 in 2.0.11.1 version have a bug with type conversion 
from  jsp tag (that is actually a String) to 
corresponding java.util.Date field in action class. Could someone confirm 
this ?

--
Thx, Milan

Milan Milanovic <[EMAIL PROTECTED]> wrote: By using this 
name="delivery.date" attribute it reads the date good, but it can't store 
it back! It generates this error below 'ParametersInterceptor' ?
 
  --
  Thx, Milan

Milan Milanovic  wrote:
  And when I add "value" attribute to this tag like this:

format="#-#MM-#dd" name="delivery.date" />

it generates and exception:

18:24:22,531 ERROR org.apache.struts2.components.DateTimePicker:316 - 
Could not parse date
java.text.ParseException: Unparseable date: "pregled.odPeriod"
at java.text.DateFormat.parse(Unknown Source)
at 
org.apache.struts2.components.DateTimePicker.format(DateTimePicker.java:309)
at 
org.apache.struts2.components.DateTimePicker.evaluateParams(DateTimePicker.java:202)
at org.apache.struts2.components.UIBean.end(UIBean.java:481)
at 
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
...


Milan Milanovic wrote:
It seems that there is a bug with tag. I defined it as in documentation:



I have delivery object in my action class with date field (of type 
java.util.Date) and all necessary get/set methods. But when I submit the 
form I get this error:

17:55:47,968 ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - 
ParametersInterceptor - [setParameters]: Unexpected Exception caught 
setting 'delivery.date' on 'class com.myProject.actions.MyTestAction: 
Error setting expression 'delivery.date' with value 
'[Ljava.lang.String;@3b678'

It seems that Struts 2 always send String for any type of tag and that it 
cannot set Date ?

--
Thx in advance, Milan





 

 


RE: html:select javascript onchange passing parameter problem

2008-05-19 Thread Sindhu C R
I cld nt still fix it..
Let me no if u cld proceed.



Regards,
Sindhu C.R

 Please don't print this Email unless you really need to - this will preserve 
trees on planet earth. 
===

-Original Message-
From: Mahawilai [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 20, 2008 9:26 AM
To: user@struts.apache.org
Subject: Re: html:select javascript onchange passing parameter problem


I have the same problem, Please tell me how to fix it if you know how.

thank you very much

Mahawilai


Benz wrote:
> 
> this is my part of jsp:
> 
> 
> 
>   
>   ...
>   
> ...
> 
> ...
> 
> I get the html result:
> ...
>   
> ...
> 
> The '<%=idx%>' text in jsp should be rendered as the value of idx valu
> which is such as '0','1',etc.
> Can anybody tell me why it doesn't works?
> 
> Best Regards,
> 
> Benz
> 

-- 
View this message in context: 
http://www.nabble.com/html%3Aselect-javascript-onchange-passing-parameter-problem-tp13128698p17332762.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 269.23.21/1455 - Release Date: 5/19/2008 
5:04 PM


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



Re: html:select javascript onchange passing parameter problem

2008-05-19 Thread Mahawilai

I have the same problem, Please tell me how to fix it if you know how.

thank you very much

Mahawilai


Benz wrote:
> 
> this is my part of jsp:
> 
> 
> 
>   
>   ...
>   
> ...
> 
> ...
> 
> I get the html result:
> ...
>   
> ...
> 
> The '<%=idx%>' text in jsp should be rendered as the value of idx valu
> which is such as '0','1',etc.
> Can anybody tell me why it doesn't works?
> 
> Best Regards,
> 
> Benz
> 

-- 
View this message in context: 
http://www.nabble.com/html%3Aselect-javascript-onchange-passing-parameter-problem-tp13128698p17332762.html
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: Struts 2 with Axis WS NOPS.

2008-05-19 Thread Felipe Lorenz
UPDATE:

i've did try with Tomcat 5.5 and 6, but still not working.

On Mon, May 19, 2008 at 8:25 PM, Felipe Lorenz <[EMAIL PROTECTED]>
wrote:

> Hi dudes.
>
> I have a problem.
>
> Ive try to acess a Web Service, created with Axis 1.4, with my struts
> aplication. But it throw a java.net.ConnectException: Connection timed out:
> connect.
>
> but, when i execute my class to test the acess of WS without tomcat,
> etc..., its works.
>
> What can be?
>
> My libraries:
>   - axis.jar
>   - jaxrpc.jar
>   - commons-discovery-0.2.jar
>   - activation.jar
>   - saaj.jar
>   - wsdl4j-1.5.1.jar
>
> ..and Struts 2.0.11.1
>
> Tnks!
>


Struts 2 with Axis WS NOPS.

2008-05-19 Thread Felipe Lorenz
Hi dudes.

I have a problem.

Ive try to acess a Web Service, created with Axis 1.4, with my struts
aplication. But it throw a java.net.ConnectException: Connection timed out:
connect.

but, when i execute my class to test the acess of WS without tomcat, etc...,
its works.

What can be?

My libraries:
  - axis.jar
  - jaxrpc.jar
  - commons-discovery-0.2.jar
  - activation.jar
  - saaj.jar
  - wsdl4j-1.5.1.jar

..and Struts 2.0.11.1

Tnks!


Re: Struts 2 with RAD 6

2008-05-19 Thread achandra

Hello Cheng,
   I am trying to make Struts 2 work with RAD 7.0. It is not working I mean
the very first page is fine but after that when it tries to look for the
action, it is giving error and in the url it is ending .action. It is not
able to find the jsp page. I can send the directory structure and struts.xml
and the folder where I am putting struts.xml and jsp pages. I am missing
something or placing things in wrong directories. I am very close and I
guess there is small change that can make it work.
Thank you

Cheng Wei Lee wrote:
> 
> I've no difficulties using Struts 2 on RAD v7. What are you actually
> trying
> to do? To build Struts 2 from scratch?
> 
> On Jan 17, 2008 9:42 PM, <[EMAIL PROTECTED]> wrote:
> 
>> Hi,
>>
>> I am trying to figure out how could I use Strus-2 with RAD-6 which has
>> Jdk
>> 1.4.
>>
>> I even tried to run the mail reader application on RAD -7 which has jdk
>> 1.5 with JRE 5.
>>
>> Could someone please help me running the sample code on RAD-6. I was also
>> not able to figure out how I could use jdk 1.5 on RAD-6.
>>
>> I am aware that there is a build for jdk1.4 but does it have some
>> functional or performance difference from the Struts-2 build for jdk 1.5
>>
>> I am getting an exception
>>
>> [1/16/08 18:14:21:842 IST] 003d SystemErr R
>> java.lang.LinkageError: LinkageError while defining class:
>> org.apache.struts2.dispatcher.FilterDispatcher
>> Could not be defined due to:
>> org/apache/struts2/dispatcher/FilterDispatcher (Unsupported major.minor
>> version 49.0)
>> This is often caused by having a class defined at multiple
>> locations within the classloader hierarchy.  Other potential causes
>> include compiling against an older or newer version of the class
>> that has an incompatible method signature.
>> Dumping the current context classloader hierarchy:
>>==> indicates defining classloader
>>   [0] [EMAIL PROTECTED]
>>   [1] [EMAIL PROTECTED]
>>   [2] [EMAIL PROTECTED]
>> ---Original exception---
>> java.lang.UnsupportedClassVersionError:
>> org/apache/struts2/dispatcher/FilterDispatcher (Unsupported major.minor
>> version 49.0)
>>at java.lang.ClassLoader.defineClass0(Native Method)
>>at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled
>> Code))
>>at
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java
>> (Compiled
>> Code))
>>at
>> com.ibm.ws.classloader.CompoundClassLoader._defineClass(
>> CompoundClassLoader.java:576)
>>at
>> com.ibm.ws.classloader.CompoundClassLoader.findClass(
>> CompoundClassLoader.java(Compiled
>> Code))
>>at
>> com.ibm.ws.classloader.CompoundClassLoader.loadClass(
>> CompoundClassLoader.java(Compiled
>> Code))
>>at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled
>> Code))
>>at java.beans.Beans.instantiate(Beans.java:202)
>>at java.beans.Beans.instantiate(Beans.java:63)
>>at
>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(
>> WebAppFilterManager.java:289)
>>at
>>
>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper
>> (WebAppFilterManager.java:155)
>>at
>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(
>> WebAppFilterManager.java:202)
>>at
>> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(
>> DefaultExtensionProcessor.java:536)
>>at
>> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(
>> DefaultExtensionProcessor.java:500)
>>at
>> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
>>at
>> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
>>at
>> com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
>>at
>> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
>>at
>> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
>>at
>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(
>> HttpInboundLink.java:421)
>>at
>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(
>> HttpInboundLink.java:367)
>>at
>> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(
>> HttpICLReadCallback.java:94)
>>at
>> com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(
>> WorkQueueManager.java:548)
>>at
>> com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(
>> WorkQueueManager.java:601)
>>at
>> com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(
>> WorkQueueManager.java:934)
>>at
>> com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(
>> WorkQueueManager.java:1021)
>>at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
>>
>> --- end Original exception
>>
>>at
>> com.ibm.ws.classloader.CompoundClassLoader._defineClass(
>> CompoundClassLoader.java:621)
>>at
>> com.ibm.ws.classloade

Re: [Struts 2] Datetimepicker tag Bug ?!

2008-05-19 Thread Milan Milanovic
I tried everything with  tag!

It seems that Struts 2 in 2.0.11.1 version have a bug with type conversion from 
 jsp tag (that is actually a String) to corresponding 
java.util.Date field in action class. Could someone confirm this ?

--
Thx, Milan

Milan Milanovic <[EMAIL PROTECTED]> wrote: By using this name="delivery.date" 
attribute it reads the date good, but it can't store it back! It generates this 
error below 'ParametersInterceptor' ?
   
  --
  Thx, Milan

Milan Milanovic  wrote:
  And when I add "value" attribute to this tag like this:

format="#-#MM-#dd" name="delivery.date" />

it generates and exception:

18:24:22,531 ERROR org.apache.struts2.components.DateTimePicker:316 - Could not 
parse date
java.text.ParseException: Unparseable date: "pregled.odPeriod"
at java.text.DateFormat.parse(Unknown Source)
at org.apache.struts2.components.DateTimePicker.format(DateTimePicker.java:309)
at 
org.apache.struts2.components.DateTimePicker.evaluateParams(DateTimePicker.java:202)
at org.apache.struts2.components.UIBean.end(UIBean.java:481)
at 
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
...


Milan Milanovic wrote:
It seems that there is a bug with tag. I defined it as in documentation:



I have delivery object in my action class with date field (of type 
java.util.Date) and all necessary get/set methods. But when I submit the form I 
get this error:

17:55:47,968 ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - 
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 
'delivery.date' on 'class com.myProject.actions.MyTestAction: Error setting 
expression 'delivery.date' with value '[Ljava.lang.String;@3b678'

It seems that Struts 2 always send String for any type of tag and that it 
cannot set Date ?

--
Thx in advance, Milan





   

   

Action Form values are null on submit

2008-05-19 Thread Shanna7463

I have a web application using struts and it works fine with IE 7, however in
IE 6 I am getting null for all of the form values. Do I need to use a older
version of struts or am I doing something in my JSP that is clearing the
table? 

Here is my JSP:

<%@ page contentType="text/html; charset=iso-8859-1" language="java"
import="java.sql.*" errorPage="" %>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<[EMAIL PROTECTED] uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%> 
--%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html" %>
<%@ taglib uri="http://ditchnet.org/jsp-tabs-taglib"; prefix="tab" %>

<%@ page import="com.sys.harps.usermanagement.RoleUtil" %>
<%@ page import="com.sys.harps.accesscontrol.CheckAccess" %>

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>





HARPS User Management
 
  






<%-- Checks that the user has Admin Privileges (incase they are
trying to access the page directly through the URL) --%>
<%-- COMMENT OUT FOR NON-JOSSO VERSION 
<%
if(!CheckAccess.CheckAccessControl(request.getUserPrincipal().getName(), 1))
{
response.sendRedirect(request.getContextPath() +
"/authorizationError.jsp");
} 
%>
  END NON-JOSSO COMMENTING --%>


 
 Add Users to a Role 





  






Roles:
Current Users in Role:
All HARPS Users:












 


 























  
 ...

Thank you for any suggestions!! %-|

-- Shanna --
-- 
View this message in context: 
http://www.nabble.com/Action-Form-values-are-null-on-submit-tp17328130p17328130.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Jsp struts

2008-05-19 Thread Sapan

Hi ,


Hi, 
  I got 
  ???en_US.errors.required??en_US.errors.required???   this error on my
entry form before submit any button andd I used  
 at end of form 
  i want to show my message on message or dialog box I donot know where it 
 goes wrong 

my code is as follows

struts-config.xml


http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>














   
   
   
   
 
  





   
  




My messageresource.properties


# Error messages for Validator framework validations
#-- validation errors
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.

#--diplay names
prompt.title = Title
prompt.kDescription = KDescription


validation-k.xml



http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd";>







 











my KForm.java


import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;

import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.validator.ValidatorForm;


public class KForm extends ValidatorForm {

  private String title;
  private String kDescription;
 
  public void setTitle(String title) 
  {
this.title=title;
  }

  public String getTitle()
  {
return title;
  }

.
.
..
 
  public void reset(ActionMapping mapping, HttpServletRequest request) {
  
this.title=null;
this.kDescription=null;
}

/**
 * Reset all properties to their default values.
 *
 * @param mapping The mapping used to select this instance
 * @param request The servlet request we are processing
   * @return errors
 */
  public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request )
  {
  
  
  
  System.out.println("validate in  in kForm.java");
  ActionErrors errors = new ActionErrors();
  
  System.out.println("k form validate method");

  if( getTitle() == null || getTitle().length() < 1 )
  {
errors.add("title",new 
ActionMessage("errors.required"));
  }

 if( getKDescription() == null || getKDescription().length() < 1 )
 {
errors.add("kDescription",new ActionMessage("errors.required"));
 }
  return errors;
  }

} 


in main jsp 


  





 
  





-- 
View this message in context: 
http://www.nabble.com/Jsp-struts-tp17326992p17326992.html
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: Expressions and migration from 2.0.9

2008-05-19 Thread Musachy Barroso
You can define a taglib-location in web.xml, but I am not sure if that
overwrites the one from the jar file.

musachy

On Mon, May 19, 2008 at 3:14 PM, Oleg Mikheev <[EMAIL PROTECTED]> wrote:
> Dave Newton wrote:
>>
>> Change the TLD?
>>
>> The combination of the two levels of EL is a security risk in some
>> applications. If you're not worried about it or not affected by it then
>> it's an easy, if annoying, workaround.
>
> Thanks
> Is repackaging struts jar the only way of doing that?
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

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



Re: Expressions and migration from 2.0.9

2008-05-19 Thread Oleg Mikheev

Dave Newton wrote:

Change the TLD?

The combination of the two levels of EL is a security risk in some
applications. If you're not worried about it or not affected by it then
it's an easy, if annoying, workaround.


Thanks
Is repackaging struts jar the only way of doing that?


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



Re: Expressions and migration from 2.0.9

2008-05-19 Thread Dave Newton
Change the TLD?

The combination of the two levels of EL is a security risk in some
applications. If you're not worried about it or not affected by it then
it's an easy, if annoying, workaround.

Dave

--- Oleg Mikheev <[EMAIL PROTECTED]> wrote:

> I was trying to upgrade from 2.0.9 to the latest Struts 2 and 
> encountered this issue:
> http://issues.apache.org/struts/browse/WW-2107
> 
> If I have a lot of code like this:
> 
>  id="${transactionType}form_qoInceptionPPDO_${forStatus.index}"
>  
> name="qoInceptionPPDO_${forStatus.index}" theme="simple"
>  
> fieldValue="${requestScope[tmpVar]}" value="${not empty renewaledId ?
> 
> false : requestScope[tmpVar]}"
> onclick="${not
> empty 
> renewaledId ? 'return false' : ''}"
>  
>
onchange="document.getElementById('${transactionType}form_qoInceptionPPDO_${forStatus.index}').value=document.getElementById('${transactionType}form_qoInceptionPPDO_${forStatus.index}').checked"/>
> 
> is there any 'easy' way of making it work with the latest Struts2?
> If there is no easy way I will continue using Struts 2.0.9 since
> trying 
> to port that stuff will become a nightmare.
> 
> 
> -
> 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: Problems with forms field

2008-05-19 Thread Felipe Lorenz
Ok.. i did it... its all right.. but i dont know...

i will print my code:

JSP:
<[EMAIL PROTECTED] contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
http://www.w3.org/TR/html4/loose.dtd";>



JSP Page











MY STRUTS.XML:






/TH_DadosPessoais.jsp




ACTION CLASS
public class DadosPessoaisAction
{
private DadosPessoais dadosPessoais;
public String create()
{
System.out.println("DADOS PESSOAIS");
System.out.println(dadosPessoais.getNome());
System.out.println(dadosPessoais.getOrigem());
System.out.println(dadosPessoais.getCpf());

return ActionSupport.SUCCESS;
}

public void setDadosPessoais(DadosPessoais dadosPessoais) {
this.dadosPessoais = dadosPessoais;
}
}

DadosPessoais Class:
public class DadosPessoais
{
private String nome;
private String origem;
private String cpf;
public void setNome(String nome) {
this.nome = nome;
}
public String getNome() {
return nome;
}
public void setOrigem(String origem) {
this.origem = origem;
}
public String getOrigem() {
return origem;
}
public String getCpf() {
return cpf;
}
public void setCpf(String cpf) {
this.cpf = cpf;
}


}


On Mon, May 19, 2008 at 3:30 PM, Milan Milanovic <[EMAIL PROTECTED]>
wrote:

> Check the names of the fields, they must mach with attributes names in
> action class, and also check that you have correct get/set methods for them
> in your action class.
>
> --
> Milan
>
> Jim Kiley <[EMAIL PROTECTED]> wrote: Felipe,
>
> It would be much easier for others to help you if you would include
> relevant
> parts of your code, as well as let us know what version of Struts you are
> using.
>
> jk
>
> On Mon, May 19, 2008 at 2:15 PM, Felipe Lorenz
>  wrote:
>
> > Hi,
> >
> > i did work with struts, and im work with it. But, i dont how, the value
> of
> > field are not send to Action class.. for example:
> >
> > My forms have 3 fields.. text.. normal.. simple..
> >
> > so, when i submit this the form only the last filed are set.
> >
> > I put a System.out in my action class, and i see only the last field
> > seted..
> > the other stay NULL...
> >
> > Why?
> >
>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
>
>
>


Re: Problems with forms field

2008-05-19 Thread Milan Milanovic
Check the names of the fields, they must mach with attributes names in action 
class, and also check that you have correct get/set methods for them in your 
action class.

--
Milan

Jim Kiley <[EMAIL PROTECTED]> wrote: Felipe,

It would be much easier for others to help you if you would include relevant
parts of your code, as well as let us know what version of Struts you are
using.

jk

On Mon, May 19, 2008 at 2:15 PM, Felipe Lorenz 
wrote:

> Hi,
>
> i did work with struts, and im work with it. But, i dont how, the value of
> field are not send to Action class.. for example:
>
> My forms have 3 fields.. text.. normal.. simple..
>
> so, when i submit this the form only the last filed are set.
>
> I put a System.out in my action class, and i see only the last field
> seted..
> the other stay NULL...
>
> Why?
>



-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


   

Re: How to pass OGNL expressions to JSP includes

2008-05-19 Thread Randy Burgess
To the best of my knowledge S2 uses OGNL extensively so not using it is
probably not an option. Anyone please feel free to correct me if I¹m wrong
about this. I have never used commons-el personally so I couldn¹t tell you,
sometimes the commons stuff like that extends and enhances some framework or
API, you would have to check the docs to be sure.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications




From: Wes Gamble <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List 
Date: Mon, 19 May 2008 16:48:31 +
To: Struts Users Mailing List 
Subject: Re: How to pass OGNL expressions to JSP includes

 I'm reading that OGNL is not only very slow, but also that development on
it has basically halted.

How can I ensure that I'm not using OGNL in my view?

Is the Apache commons-el different than the EL that comes w/the standard
J2EE stack?  If so, how can I use that?  Should I?

Wes
 
>  -- Original message from Randy Burgess <[EMAIL PROTECTED]>:
> -- 
> 
> 
>> > Yes, outside of Struts tags. No that is JSP EL (Expression Language), which
>> > is different from OGNL, however you can get values from the OGNL stack
>> using 
>> > EL like in my example. There are at least a couple of links in the
>> > documentation to OGNL. I would check that first, as to EL there are tons of
>> > links on the Œnet, just Google it.
>> > 
>> > Regards, 
>> > Randy Burgess 
>> > Sr. Web Applications Developer
>> > Nuvox Communications
>> > 
>> > 
>> > 
>> > 
>> > From: Wes Gamble
>> > Reply-To: Struts Users Mailing List
>> > Date: Mon, 19 May 2008 16:38:51 +
>> > To: Struts Users Mailing List
>> > Subject: Re: How to pass OGNL expressions to JSP includes
>> > 
>> >  
>> > Randy, 
>> > 
>> > Thanks!  So, in general, is this an alternative way to reference these
>> > properties?  Where can I find out more about the ${...} syntax?
>> > 
>> > You said "EL" in your reply.  So, is this standard JSP EL or is it OGNL?
>> > Are they different, or is "EL" in Struts actually OGNL?
>> > 
>> > Thanks, 
>> > Wes 
>>> > >  -- Original message from Randy Burgess :
>>> > > --
>>> > > 
>>> > > 
> > >> > You can use EL outside of Struts tags.
> > >> > 
> > >> > Try   .
> > >> > 
> > >> > Properties in an action will be at the top of the stack.
> > >> > 
> > >> > Regards,
> > >> > Randy Burgess
> > >> > Sr. Web Applications Developer
> > >> > Nuvox Communications
> > >> > 
> > >> > 
> > >> > 
> > >> > 
> > >> > From: Wes Gamble
> > >> > Reply-To: Struts Users Mailing List
> > >> > Date: Mon, 19 May 2008 16:25:26 +
> > >> > To: 
> > >> > Subject: How to pass OGNL expressions to JSP includes
> > >> > 
> > >> > All, 
> > >> > 
> > >> > It's been a while since I've done any Struts (JSP for that matter)
> > >> > development, and I'm trying to get started with Struts 2.
> > >> > 
> > >> > Here's a very simple template that pulls in an include that
> provides the 
> > >> > ...content for the page.
> > >> > 
> > >> > 
> > >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > >> > 
> > >> > <%@ taglib prefix="s" uri="/struts-tags" %>
> > >> > 
> > >> > 
> > >> >   " />
> > >> >   " />
> > >> > 
> > >> > 
> > >> > 
> > >> > 
> > >> > 
> > >> > 
> > >> > I have an action that sets the values of pageTitle and companyName
> and I've 
> > >> > verified that they have values.
> > >> > 
> > >> > My problem is I don't know how to co rrectly pass the pageTitle and
> > >> > companyName values set in my action (and retrievable only through
OGNL, 
> > >> > AFAIK) to the include via the standard  tag.  What is above
> > >> > doesn't work because of the double quotes.  So, here are my
> questions... 
> > >> > 
> > >> > 1) Is there a way to quote the contents of the  tag so that I
> > >> > can pass it successfully to the include?
> > >> > 2) Do I have to put the value of  (for
> > >> > example) into a local JSP variable just to pass it to the include?
> > >> > 
> > >> > What am I doing wrong?
> > >> > 
> > >> > Thanks,
> > >> > Wes 
> > >> > 
> > >> > 
> > >> > 
> > >> > 
> > >> > This email and any attachments ("Message") may contain legally
> privileged 
 > >> and/or 
> > >> > confidential information.  If you are not the addressee, or if this
> Message 
 > >> has 
> > >> > been addressed to you in error, you are not authorized to read,
> copy, or 
> > >> > distribute it, and we ask that you please delete it (including all
> copies) 
 > >> and 
> > >> > notify the sender by return email.  Delivery of this Message to any
> person 
 > >> other 
> > >> > than the intended recipient(s) shall not be deemed a waiver of
 > >> confidentiality
> > >> > and/or a pr

Re: Upgrade from 2.06 to 2.011.1 Error

2008-05-19 Thread Oleg Mikheev

Hoying, Ken wrote:

Editorial:  I cannot help but wonder if these consecutive painful
upgrades are going to have an adverse affect on Struts2 adoption, future
user base and perception.  I have been a big proponent of Struts2 up
till now, but must admit that I am finding myself questioning if there
are not better frameworks with friendlier release strategies available.
If it was a vendor rather than open source that did this to me, I would
be one very unhappy customer.


Same here.
Not being able to use expressions inside struts tags is not acceptable.


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



Re: Problems with forms field

2008-05-19 Thread Jim Kiley
Felipe,

It would be much easier for others to help you if you would include relevant
parts of your code, as well as let us know what version of Struts you are
using.

jk

On Mon, May 19, 2008 at 2:15 PM, Felipe Lorenz <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> i did work with struts, and im work with it. But, i dont how, the value of
> field are not send to Action class.. for example:
>
> My forms have 3 fields.. text.. normal.. simple..
>
> so, when i submit this the form only the last filed are set.
>
> I put a System.out in my action class, and i see only the last field
> seted..
> the other stay NULL...
>
> Why?
>



-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


Expressions and migration from 2.0.9

2008-05-19 Thread Oleg Mikheev
I was trying to upgrade from 2.0.9 to the latest Struts 2 and 
encountered this issue:

http://issues.apache.org/struts/browse/WW-2107

If I have a lot of code like this:

fieldValue="${requestScope[tmpVar]}" value="${not empty renewaledId ? 
false : requestScope[tmpVar]}"
   onclick="${not empty 
renewaledId ? 'return false' : ''}"


onchange="document.getElementById('${transactionType}form_qoInceptionPPDO_${forStatus.index}').value=document.getElementById('${transactionType}form_qoInceptionPPDO_${forStatus.index}').checked"/>

is there any 'easy' way of making it work with the latest Struts2?
If there is no easy way I will continue using Struts 2.0.9 since trying 
to port that stuff will become a nightmare.



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



Re: [Struts2] Table pagination (paging)?

2008-05-19 Thread Oleg Mikheev

sol myr wrote:

  What's the Strut2 recommendation for Table Pagination (AKA Paging)?
  We're showing a large table (say, 500 records) and need to break it down to 
25 pages (20 records per page).


http://www.javaworld.com/javaworld/jw-08-2007/jw-08-ajaxtables.html


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



Problems with forms field

2008-05-19 Thread Felipe Lorenz
Hi,

i did work with struts, and im work with it. But, i dont how, the value of
field are not send to Action class.. for example:

My forms have 3 fields.. text.. normal.. simple..

so, when i submit this the form only the last filed are set.

I put a System.out in my action class, and i see only the last field seted..
the other stay NULL...

Why?


Re: [Struts 2] Datetimepicker tag Bug ?!

2008-05-19 Thread Milan Milanovic
By using this name="delivery.date" attribute it reads the date good, but it 
can't store it back! It generates this error below 'ParametersInterceptor' ?
   
  --
  Thx, Milan

Milan Milanovic <[EMAIL PROTECTED]> wrote:
  And when I add "value" attribute to this tag like this:

format="#-#MM-#dd" name="delivery.date" />

it generates and exception:

18:24:22,531 ERROR org.apache.struts2.components.DateTimePicker:316 - Could not 
parse date
java.text.ParseException: Unparseable date: "pregled.odPeriod"
at java.text.DateFormat.parse(Unknown Source)
at org.apache.struts2.components.DateTimePicker.format(DateTimePicker.java:309)
at 
org.apache.struts2.components.DateTimePicker.evaluateParams(DateTimePicker.java:202)
at org.apache.struts2.components.UIBean.end(UIBean.java:481)
at 
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
...


Milan Milanovic wrote:
It seems that there is a bug with tag. I defined it as in documentation:



I have delivery object in my action class with date field (of type 
java.util.Date) and all necessary get/set methods. But when I submit the form I 
get this error:

17:55:47,968 ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - 
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 
'delivery.date' on 'class com.myProject.actions.MyTestAction: Error setting 
expression 'delivery.date' with value '[Ljava.lang.String;@3b678'

It seems that Struts 2 always send String for any type of tag and that it 
cannot set Date ?

--
Thx in advance, Milan





   

Re: How to pass OGNL expressions to JSP includes

2008-05-19 Thread Wes Gamble







 
I'm reading that OGNL is not only very slow, but also that development on it has basically halted.How can I ensure that I'm not using OGNL in my view?Is the Apache commons-el different than the EL that comes w/the standard J2EE stack?  If so, how can I use that?  Should I?Wes
 

 -- Original message from Randy Burgess <[EMAIL PROTECTED]>: --


> Yes, outside of Struts tags. No that is JSP EL (_expression_ Language), which
> is different from OGNL, however you can get values from the OGNL stack using
> EL like in my example. There are at least a couple of links in the
> documentation to OGNL. I would check that first, as to EL there are tons of
> links on the Œnet, just Google it.
> 
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
> 
> 
> 
> 
> From: Wes Gamble <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List 
> Date: Mon, 19 May 2008 16:38:51 +
> To: Struts Users Mailing List 
> Subject: Re: How to pass OGNL expressions to JSP includes
> 
>  
> Randy,
> 
> Thanks!  So, in general, is this an alternative way to reference these
> properties?  Where can I find out more about the ${...} syntax?
> 
> You said "EL" in your reply.  So, is this standard JSP EL or is it OGNL?
> Are they different, or is "EL" in Struts actually OGNL?
> 
> Thanks,
> Wes
> >  -- Original message from Randy Burgess <[EMAIL PROTECTED]>:
> > -- 
> > 
> > 
> >> > You can use EL outside of Struts tags.
> >> > 
> >> > Try   . 
> >> > 
> >> > Properties in an action will be at the top of the stack.
> >> > 
> >> > Regards, 
> >> > Randy Burgess 
> >> > Sr. Web Applications Developer
> >> > Nuvox Communications
> >> > 
> >> > 
> >> > 
> >> > 
> >> > From: Wes Gamble
> >> > Reply-To: Struts Users Mailing List
> >> > Date: Mon, 19 May 2008 16:25:26 +
> >> > To: 
> >> > Subject: How to pass OGNL expressions to JSP includes
> >> > 
> >> > All, 
> >> > 
> >> > It's been a while since I've done any Struts (JSP for that matter)
> >> > development, and I'm trying to get started with Struts 2.
> >> > 
> >> > Here's a very simple template that pulls in an include that provides the
> >> > ...content for the page.
> >> > 
> >> > 
> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> >> > 
> >> > <%@ taglib prefix="s" uri="/struts-tags" %>
> >> > 
> >> > 
> >> >   " /> 
> >> >   " /> 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > I have an action that sets the values of pageTitle and companyName and I've
> >> > verified that they have values.
> >> > 
> >> > My problem is I don't know how to co rrectly pass the pageTitle and
> >> > companyName values set in my action (and retrievable only through OGNL,
> >> > AFAIK) to the include via the standard  tag.  What is above
> >> > doesn't work because of the double quotes.  So, here are my questions...
> >> > 
> >> > 1) Is there a way to quote the contents of the  tag so that I
> >> > can pass it successfully to the include?
> >> > 2) Do I have to put the value of  (for
> >> > example) into a local JSP variable just to pass it to the include?
> >> > 
> >> > What am I doing wrong?
> >> > 
> >> > Thanks, 
> >> > Wes 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > This email and any attachments ("Message") may contain legally privileged
> >> and/or 
> >> > confidential information.  If you are not the addressee, or if this Message
> >> has 
> >> > been addressed to you in error, you are not authorized to read, copy, or
> >> > distribute it, and we ask that you please delete it (including all copies)
> >> and 
> >> > notify the sender by return email.  Delivery of this Message to any person
> >> other 
> >> > than the intended recipient(s) shall not be deemed a waiver of
> >> confidentiality 
> >> > and/or a privilege.
> >  
> 
> 
> 
> This email and any attachments ("Message") may contain legally privileged and/or 
> confidential information.  If you are not the addressee, or if this Message has 
> been addressed to you in error, you are not authorized to read, copy, or 
> distribute it, and we ask that you please delete it (including all copies) and 
> notify the sender by return email.  Delivery of this Message to any person other 
> than the intended recipient(s) shall not be deemed a waiver of confidentiality 
> and/or a privilege.


  








Re: How to pass OGNL expressions to JSP includes

2008-05-19 Thread Dave Newton
The value stack should be available in a 'ed tag, and
you should be able to reference your action's properties in any of the
supported ways.

Also note that S2 uses a request wrapper so that you may access value
stack variables via JSP EL (e.g. ${anActionProperty}). Note that the
normal scopes are searched *first*, before looking on the value stack.

Dave

--- Wes Gamble <[EMAIL PROTECTED]> wrote:
> It's been a while since I've done any Struts (JSP for that matter)
> development, and I'm trying to get started with Struts 2.
> 
> Here's a very simple template that pulls in an include that provides
> the ... content for the page.
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml";>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> 
> 
>   " />
>   " />
> 
> 
> 
> 
> 
> 
> I have an action that sets the values of pageTitle and companyName
> and I've verified that they have values.
> 
> My problem is I don't know how to correctly pass the pageTitle and
> companyName values set in my action (and retrievable only through
> OGNL, AFAIK) to the include via the standard  tag.  What
> is above doesn't work because of the double quotes.  So, here are my
> questions...
> 
> 1) Is there a way to quote the contents of the  tag so
> that I can pass it successfully to the include?
> 2) Do I have to put the value of  (for
> example) into a local JSP variable just to pass it to the include?


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



Re: How to pass OGNL expressions to JSP includes

2008-05-19 Thread Randy Burgess
Yes, outside of Struts tags. No that is JSP EL (Expression Language), which
is different from OGNL, however you can get values from the OGNL stack using
EL like in my example. There are at least a couple of links in the
documentation to OGNL. I would check that first, as to EL there are tons of
links on the Œnet, just Google it.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications




From: Wes Gamble <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List 
Date: Mon, 19 May 2008 16:38:51 +
To: Struts Users Mailing List 
Subject: Re: How to pass OGNL expressions to JSP includes

 
Randy,

Thanks!  So, in general, is this an alternative way to reference these
properties?  Where can I find out more about the ${...} syntax?

You said "EL" in your reply.  So, is this standard JSP EL or is it OGNL?
Are they different, or is "EL" in Struts actually OGNL?

Thanks,
Wes
>  -- Original message from Randy Burgess <[EMAIL PROTECTED]>:
> -- 
> 
> 
>> > You can use EL outside of Struts tags.
>> > 
>> > Try   . 
>> > 
>> > Properties in an action will be at the top of the stack.
>> > 
>> > Regards, 
>> > Randy Burgess 
>> > Sr. Web Applications Developer
>> > Nuvox Communications
>> > 
>> > 
>> > 
>> > 
>> > From: Wes Gamble
>> > Reply-To: Struts Users Mailing List
>> > Date: Mon, 19 May 2008 16:25:26 +
>> > To: 
>> > Subject: How to pass OGNL expressions to JSP includes
>> > 
>> > All, 
>> > 
>> > It's been a while since I've done any Struts (JSP for that matter)
>> > development, and I'm trying to get started with Struts 2.
>> > 
>> > Here's a very simple template that pulls in an include that provides the
>> > ...content for the page.
>> > 
>> > 
>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>> > 
>> > <%@ taglib prefix="s" uri="/struts-tags" %>
>> > 
>> > 
>> >   " /> 
>> >   " /> 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > I have an action that sets the values of pageTitle and companyName and I've
>> > verified that they have values.
>> > 
>> > My problem is I don't know how to co rrectly pass the pageTitle and
>> > companyName values set in my action (and retrievable only through OGNL,
>> > AFAIK) to the include via the standard  tag.  What is above
>> > doesn't work because of the double quotes.  So, here are my questions...
>> > 
>> > 1) Is there a way to quote the contents of the  tag so that I
>> > can pass it successfully to the include?
>> > 2) Do I have to put the value of  (for
>> > example) into a local JSP variable just to pass it to the include?
>> > 
>> > What am I doing wrong?
>> > 
>> > Thanks, 
>> > Wes 
>> > 
>> > 
>> > 
>> > 
>> > This email and any attachments ("Message") may contain legally privileged
>> and/or 
>> > confidential information.  If you are not the addressee, or if this Message
>> has 
>> > been addressed to you in error, you are not authorized to read, copy, or
>> > distribute it, and we ask that you please delete it (including all copies)
>> and 
>> > notify the sender by return email.  Delivery of this Message to any person
>> other 
>> > than the intended recipient(s) shall not be deemed a waiver of
>> confidentiality 
>> > and/or a privilege.
>  



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.


Re: How to pass OGNL expressions to JSP includes

2008-05-19 Thread Wes Gamble







 

Randy,Thanks!  So, in general, is this an alternative way to reference these properties?  Where can I find out more about the ${...} syntax?You said "EL" in your reply.  So, is this standard JSP EL or is it OGNL?  Are they different, or is "EL" in Struts actually OGNL?Thanks,Wes

 -- Original message from Randy Burgess <[EMAIL PROTECTED]>: --


> You can use EL outside of Struts tags.
> 
> Try   .
> 
> Properties in an action will be at the top of the stack.
> 
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
> 
> 
> 
> 
> From: Wes Gamble <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List 
> Date: Mon, 19 May 2008 16:25:26 +
> To: 
> Subject: How to pass OGNL expressions to JSP includes
> 
> All,
> 
> It's been a while since I've done any Struts (JSP for that matter)
> development, and I'm trying to get started with Struts 2.
> 
> Here's a very simple template that pulls in an include that provides the
> ...content for the page.
> 
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> 
> <%@ taglib prefix="s" uri="/struts-tags" %>
> 
> 
>   " />
>   " />
> 
> 
> 
> > > 
> I have an action that sets the values of pageTitle and companyName and I've
> verified that they have values.
> 
> My problem is I don't know how to co rrectly pass the pageTitle and
> companyName values set in my action (and retrievable only through OGNL,
> AFAIK) to the include via the standard  tag.  What is above
> doesn't work because of the double quotes.  So, here are my questions...
> 
> 1) Is there a way to quote the contents of the  tag so that I
> can pass it successfully to the include?
> 2) Do I have to put the value of  (for
> example) into a local JSP variable just to pass it to the include?
> 
> What am I doing wrong?
> 
> Thanks,
> Wes
> 
> 
> 
> 
> This email and any attachments ("Message") may contain legally privileged and/or 
> confidential information.  If you are not the addressee, or if this Message has 
> been addressed to you in error, you are not authorized to read, copy, or 
> distribute it, and we ask that you please delete it (including all copies) and 
> notify the sender by return email.  Delivery of this Message to any person other 
> than the intended recipient(s) shall not be deemed a waiver of confidentiality 
> and/or a privilege.


  








Re: How to pass OGNL expressions to JSP includes

2008-05-19 Thread Randy Burgess
You can use EL outside of Struts tags.

Try   .

Properties in an action will be at the top of the stack.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications




From: Wes Gamble <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List 
Date: Mon, 19 May 2008 16:25:26 +
To: 
Subject: How to pass OGNL expressions to JSP includes

All,

It's been a while since I've done any Struts (JSP for that matter)
development, and I'm trying to get started with Struts 2.

Here's a very simple template that pulls in an include that provides the
... content for the page.

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>
<%@ taglib prefix="s" uri="/struts-tags" %>


  " />
  " />






I have an action that sets the values of pageTitle and companyName and I've
verified that they have values.

My problem is I don't know how to co rrectly pass the pageTitle and
companyName values set in my action (and retrievable only through OGNL,
AFAIK) to the include via the standard  tag.  What is above
doesn't work because of the double quotes.  So, here are my questions...

1) Is there a way to quote the contents of the  tag so that I
can pass it successfully to the include?
2) Do I have to put the value of  (for
example) into a local JSP variable just to pass it to the include?

What am I doing wrong?

Thanks,
Wes




This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.


Action Framework Standard

2008-05-19 Thread Frans Thamura
hi all

is it possible that S2 posted to JCP so we can have action framework
standard?

F


Re: Jsp struts

2008-05-19 Thread Laurie Harper

Sapan wrote:

Hi,
 I got
 ???en_US.errors.required??en_US.errors.required???
 this error on my entry form before submit any button andd I used 
at end of form
 i want to show my message on message or dialog box I donot know where it
goes wrong


Difficult to say, since you didn't include any of your code or 
configuration, or even specify which version of Struts you're using. 
There are a number of factors that could be involved here, which are 
different between Struts 1 and Struts 2 and also depend on how you're 
getting the required messages onto the page.


You need to tell us, at least, what version of Struts you are using, 
what you're JSP code looks like for the field with the error message, 
how you have validation configured, what your action mappings look like 
and what property bundles you have deployed where.


Try to reduce your problem to the absolute minimum amount of code and 
configuration necessary to reproduce it, and then post that for review 
if you still don't see what's wrong.


L.


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



How to pass OGNL expressions to JSP includes

2008-05-19 Thread Wes Gamble





All,It's been a while since I've done any Struts (JSP for that matter) development, and I'm trying to get started with Struts 2.Here's a very simple template that pulls in an include that provides the ... content for the page.<%@ taglib prefix="s" uri="/struts-tags" %>  " />  " />I have an action that sets the values of pageTitle and companyName and I've verified that they have values.My problem is I don't know how
  to co
rrectly pass the pageTitle and companyName values set in my action (and retrievable only through OGNL, AFAIK) to the include via the standard  tag.  What is above doesn't work because of the double quotes.  So, here are my questions...1) Is there a way to quote the contents of the  tag so that I can pass it successfully to the include?2) Do I have to put the value of  (for example) into a local JSP variable just to pass it to the include?What am I doing wrong?Thanks,Wes






Re: [Struts 2] Datetimepicker tag Bug ?!

2008-05-19 Thread Milan Milanovic
And when I add "value" attribute to this tag like this:
   
  
   
  it generates and exception:
   
  18:24:22,531 ERROR org.apache.struts2.components.DateTimePicker:316 - Could 
not parse date
  java.text.ParseException: Unparseable date: "pregled.odPeriod"
  at java.text.DateFormat.parse(Unknown Source)
  at 
org.apache.struts2.components.DateTimePicker.format(DateTimePicker.java:309)
  at 
org.apache.struts2.components.DateTimePicker.evaluateParams(DateTimePicker.java:202)
  at org.apache.struts2.components.UIBean.end(UIBean.java:481)
  at 
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43)
  ...


Milan Milanovic <[EMAIL PROTECTED]> wrote:
  It seems that there is a bug with tag. I defined it as in documentation:



I have delivery object in my action class with date field (of type 
java.util.Date) and all necessary get/set methods. But when I submit the form I 
get this error:

17:55:47,968 ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - 
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 
'delivery.date' on 'class com.myProject.actions.MyTestAction: Error setting 
expression 'delivery.date' with value '[Ljava.lang.String;@3b678'

It seems that Struts 2 always send String for any type of tag and that it 
cannot set Date ?

--
Thx in advance, Milan



   

Re: [Struts 2] Simple combobox behaviour

2008-05-19 Thread Laurie Harper
The name attribute can reference an object-typed property, but Struts 
needs to know how to convert a string (which is all that HTTP can 
transmit) into that type. That's where type conversion comes in:


http://struts.apache.org/2.0.11.1/docs/type-conversion.html

L.

Milan Milanovic wrote:

No one can help ?!
   
  It seems for me that
  --

  Thx in advance, Milan

Milan Milanovic <[EMAIL PROTECTED]> wrote:
  I hope that someone can answer this simple question.


If I have object Person buyer; in my Fruit class (with
get/set methods), and I have fruit object in my action class,
where I also have List
allBuyers in my action class. How can I
define combo box so that when buyer is selected, that Person object
should be set to my fruit.buyer object ?
When I set my combo box like this:

list="allBuyers" name="fruit.buyer" emptyOption="false"
listKey = "id" listValue = "name"
headerKey="None" multiple="false"/>

but in this case it don't set my fruit.buyer to one choosed in combo box, and I 
get an error:

18:42:32,812 ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - 
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 
'fruit.buyer' on 'class com.myproject.actions.FruitBuyerAction: Error setting 
expression 'fruit.buyer' with value '[Ljava.lang.String;@8825a5'


--
Please help. 


Milan Milanovic wrote: I fixed my first problem, it was naming issue. But I 
still have this question:

If I have object Person buyer; in my Fruit class (with
get/set methods), and I have Fruit fruit object in my action class,
where I also have List
allBuyers in my action class. How can I
define combo box so that when buyer is selected, that Person object
should be set to my fruit.buyer object ?

Now I have the same
problem with my datetimepicker field. I have "date" attrib (of type
java.util.Date with get/set methods) in my Fruit class. I have defined
it in jsp like this:


displayFormat="dd.MM." label="Date" type="date"/>

--
Thx, Milan

Milan Milanovic wrote:
I'm just not sure when I put listValue = "name" and listKey="id" I get
and emtpy combo box with exactly 4 places (it have value option good) ?

One more thing, if I have object Person buyer; in my Fruit class (with
get/set methods), and I have Fruit fruit object in my action class,
where I also have List
allBuyers in my action class. How can I
define combo box so that when buyer is selected, that Person object should
be set to my fruit.buyer object ?

When I removed listKey then it works good. But I now have the same
problem with my datetimepicker field. I have "date" attrib (of type
java.util.Date with get/set methods) in my Fruit class. I have defined it in
jsp like this:

displayFormat="dd.MM." label="Date" type="date"/>

?
--
Thx, Milan

Felipe Lorenz wrote:
Ok.. if i get your idea... the list yout want to put in combobox is
fruit.buyers, hu?

Then, try it:
listKey="personId" name="fruit.buyers" emtpyOption="false"
hedaerKey="none"/>

if you have the object fruit, then:
listValue="personName" listKey="personId" name="fruit.buyers"
emtpyOption="false" hedaerKey="none"/>

maybe the name is not correct. Try chage the attr name to person, for
example.

listValue="personName" listKey="personId" name="person" emtpyOption="false"
hedaerKey="none"/>

On Thu, May 15, 2008 at 6:05 PM, Milan Milanovic 
wrote:



When I set listKey="fruit.buyers.id", I get a empty combo box, but with
correct number of emtpy spaces (in my case 4) ?

--
Thanks, Milan

Felipe Lorenz wrote: You need eht attribute
"listKey" where you'll put the Person id!!!

see:

http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/components/Select.html

On Thu, May 15, 2008 at 5:19 PM, Milan Milanovic
wrote:


Hi,

I have simple class Fruit, that have "id" (long), "name" (String), and
"buyers" List of

. In my action class I have Fruit fruit; object

with get/set methods.

In my jsp I have combo box defined like this:


emtpyOption="false" value = "fruit.buyers" hedaerKey="none"
multiple="false"/>

and when I sumbit form that contain this combo box, it generates

following

error:

22:16:18,281 ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
ParametersInterceptor - [setParameters]: Unexpected Exception caught

setting

'fruit.buyers' on class 'com.myproject.actions.FruitAction': Error

setting

expression 'fruit.buyers' with value '[Ljava.lang.String;@15b4492'



















   



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



Re: [Struts 2] Many-to-many form-interface

2008-05-19 Thread Laurie Harper
A multiple select seems to be the 'simplest thing that could possibly 
work' for this, but there are other options. For example, something like 
s:optiontransferselect [1] gives a slightly fancier way of providing the 
same thing. Another alternative would be to have an Ajax-y 'combo box' 
to select the first author/book, and an 'add another' button, or a 
select/combo that onchange added the selection to a separate list and 
reset, or...


Again, without knowing why you don't like the multi-select solution, 
it's all a little vague and hand-wavy.


L.

[1] http://struts.apache.org/2.0.11.1/docs/optiontransferselect.html

David Canos wrote:

Sorry Laurie.
I will try to make me clarify

I just want to build a form field that
* in a Author profile will let me select the books that a author have.
* in a Book profile will let me select the authors of the book.

It could be possible by a multiple select but I really dont like this
solution so I asked looking for a better way.

Thank u


2008/5/19 Laurie Harper <[EMAIL PROTECTED]>:


David Canos wrote:


I want to build a generic form-interface to cover a simple many-to-many
relation.
Like a Writer and Books relation where a Writer could write some books and
a
book could be written by some writers.

I was thinking in a concrete Struts tag but I find nothing.

Could you show me how to solve this issue in a generic way?


It's a bit difficult to offer advice when the requirements are this
vague... What do you want this form to do? Allow you to edit a book's
authors? Allow you to edit an authors books? Some combination of both? (how
would that work?)

L.


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



[Struts 2] Datetimepicker tag Bug ?!

2008-05-19 Thread Milan Milanovic
It seems that there is a bug with  tag. I defined it as in 
documentation:
   
  
   
  I have delivery object in my action class with date field (of type 
java.util.Date) and all necessary get/set methods. But when I submit the form I 
get this error:
   
  17:55:47,968 ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - 
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 
'delivery.date' on 'class com.myProject.actions.MyTestAction: Error setting 
expression 'delivery.date' with value '[Ljava.lang.String;@3b678'
   
  It seems that Struts 2 always send String for any type of tag and that it 
cannot set Date ?

  --
  Thx in advance, Milan

   

RE: Struts 2 and Sitemesh

2008-05-19 Thread Asleson, Ryan

OK, I now get content.  I specified the wrong value in the 
tag's namespace attribute.
 

-Original Message-
From: Asleson, Ryan [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 16, 2008 2:27 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 and Sitemesh


OK, doing that made the error go away, but none of the content is
showing up.  Hmm. 

-Original Message-
From: Relph,Brian [mailto:[EMAIL PROTECTED]
Sent: Friday, May 16, 2008 2:22 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 and Sitemesh


You might try this:





You can also reference this issue:

https://issues.apache.org/struts/browse/WW-2079


Brian Relph

-Original Message-
From: Relph,Brian [mailto:[EMAIL PROTECTED]
Sent: Friday, May 16, 2008 2:14 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 and Sitemesh


Can you provide your struts.xml? 

Brian Relph

-Original Message-
From: Asleson, Ryan [mailto:[EMAIL PROTECTED]
Sent: Friday, May 16, 2008 1:52 PM
To: Struts Users Mailing List
Subject: Struts 2 and Sitemesh

 
Hello,
 
I'm new to Struts 2 and have some experience with Sitemesh, but I'm
having trouble getting the two to work together.
 
I have defined a decorator like this:
 

/*.action


So it should be decorating anything that goes to Struts 2.  The
default.jsp file has a line that looks like this:
 
http://www.biworldwide.com/info/index.html> " />
 
When I run the page it fails with this error:
 
javax.servlet.ServletException: java.io.FileNotFoundException:
/myapp/include/footer.action
 
I know the decorator default.jsp is being applied because when I remove
the  tag from it there are no errors.
 
If I change the 's page attribute to be an external
website, it works too.
 
So, it looks like it's not getting the call to another internal action.
I've triple-check the path and it is correct.  In fact, I disabled
Sitemesh and went to the /myapp/include/footer.action and it displayed
correctly.
 
Here's what's in web.xml:
 
 
struts-cleanup
/*

 
   
sitemesh
/*

 

struts2
/*


I don't know what else to do.  Can anybody figure out what's going on??
 
Thank you!!
 
-Ryan
 
 

This e-mail message is being sent solely for use by the intended
recipient(s) and may contain confidential information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by phone or reply by
e-mail, delete the original message and destroy all copies. Thank you.

--
CONFIDENTIALITY NOTICE This message and any included attachments are
from Cerner Corporation and are intended only for the addressee. The
information contained in this message is confidential and may constitute
inside or non-public information under international, federal, or state
securities laws. Unauthorized forwarding, printing, copying,
distribution, or use of such information is strictly prohibited and may
be unlawful. If you are not the addressee, please promptly delete this
message and notify the sender of the delivery error by e-mail or you may
call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1)
(816)221-1024.

-
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 e-mail message is being sent solely for use by the intended
recipient(s) and may contain confidential information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by phone or reply by
e-mail, delete the original message and destroy all copies. Thank you.

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


This e-mail message is being sent solely for use by the intended recipient(s) 
and may contain confidential information.  Any unauthorized review, use, 
disclosure or distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by phone or reply by e-mail, delete the 
original message and destroy all copies. Thank you.

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



Re: Spring autowiring null values

2008-05-19 Thread Dave Newton
--- Ian Meikle <[EMAIL PROTECTED]> wrote:

> I have already read this page, the possible values are given as:
> 
> name, type, auto or constructor.
> 
> There is no NONE, or OFF value, and looking at the source code there
> does not seem to be support for it either.
> Hence why I am asking if there is another way of turning this off.

That's why I mentioned the Spring documentation.

http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-autowire

Unless you're using 2.5, in which case look in the 2.5 documentation.

Dave


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



Jsp struts

2008-05-19 Thread Sapan

Hi,
 I got
 ???en_US.errors.required??en_US.errors.required???
 this error on my entry form before submit any button andd I used 
at end of form
 i want to show my message on message or dialog box I donot know where it
goes wrong
 Please help me out.
 Waiting for warm and urgent reply
 Thankx :confused:
Swapna
-- 
View this message in context: 
http://www.nabble.com/Jsp-struts-tp17316740p17316740.html
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: [Struts 2] Simple combobox behaviour

2008-05-19 Thread Milan Milanovic
No one can help ?!
   
  It seems for me that  wrote:
  I hope that someone can answer this simple question.


If I have object Person buyer; in my Fruit class (with
get/set methods), and I have fruit object in my action class,
where I also have List
allBuyers in my action class. How can I
define combo box so that when buyer is selected, that Person object
should be set to my fruit.buyer object ?
When I set my combo box like this:

list="allBuyers" name="fruit.buyer" emptyOption="false"
listKey = "id" listValue = "name"
headerKey="None" multiple="false"/>

but in this case it don't set my fruit.buyer to one choosed in combo box, and I 
get an error:

18:42:32,812 ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - 
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 
'fruit.buyer' on 'class com.myproject.actions.FruitBuyerAction: Error setting 
expression 'fruit.buyer' with value '[Ljava.lang.String;@8825a5'


--
Please help. 

Milan Milanovic wrote: I fixed my first problem, it was naming issue. But I 
still have this question:

If I have object Person buyer; in my Fruit class (with
get/set methods), and I have Fruit fruit object in my action class,
where I also have List
allBuyers in my action class. How can I
define combo box so that when buyer is selected, that Person object
should be set to my fruit.buyer object ?

Now I have the same
problem with my datetimepicker field. I have "date" attrib (of type
java.util.Date with get/set methods) in my Fruit class. I have defined
it in jsp like this:


displayFormat="dd.MM." label="Date" type="date"/>

--
Thx, Milan

Milan Milanovic wrote:
I'm just not sure when I put listValue = "name" and listKey="id" I get
and emtpy combo box with exactly 4 places (it have value option good) ?

One more thing, if I have object Person buyer; in my Fruit class (with
get/set methods), and I have Fruit fruit object in my action class,
where I also have List
allBuyers in my action class. How can I
define combo box so that when buyer is selected, that Person object should
be set to my fruit.buyer object ?

When I removed listKey then it works good. But I now have the same
problem with my datetimepicker field. I have "date" attrib (of type
java.util.Date with get/set methods) in my Fruit class. I have defined it in
jsp like this:

displayFormat="dd.MM." label="Date" type="date"/>

?
--
Thx, Milan

Felipe Lorenz wrote:
Ok.. if i get your idea... the list yout want to put in combobox is
fruit.buyers, hu?

Then, try it:
listKey="personId" name="fruit.buyers" emtpyOption="false"
hedaerKey="none"/>

if you have the object fruit, then:
listValue="personName" listKey="personId" name="fruit.buyers"
emtpyOption="false" hedaerKey="none"/>

maybe the name is not correct. Try chage the attr name to person, for
example.

listValue="personName" listKey="personId" name="person" emtpyOption="false"
hedaerKey="none"/>

On Thu, May 15, 2008 at 6:05 PM, Milan Milanovic 
wrote:

> When I set listKey="fruit.buyers.id", I get a empty combo box, but with
> correct number of emtpy spaces (in my case 4) ?
>
> --
> Thanks, Milan
>
> Felipe Lorenz wrote: You need eht attribute
> "listKey" where you'll put the Person id!!!
>
> see:
>
> http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/components/Select.html
>
> On Thu, May 15, 2008 at 5:19 PM, Milan Milanovic
> wrote:
>
> > Hi,
> >
> > I have simple class Fruit, that have "id" (long), "name" (String), and
> > "buyers" List of
> . In my action class I have Fruit fruit; object
> > with get/set methods.
> >
> > In my jsp I have combo box defined like this:
> >
> >
> > emtpyOption="false" value = "fruit.buyers" hedaerKey="none"
> > multiple="false"/>
> >
> > and when I sumbit form that contain this combo box, it generates
> following
> > error:
> >
> > 22:16:18,281 ERROR
> > com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
> > ParametersInterceptor - [setParameters]: Unexpected Exception caught
> setting
> > 'fruit.buyers' on class 'com.myproject.actions.FruitAction': Error
> setting
> > expression 'fruit.buyers' with value '[Ljava.lang.String;@15b4492'
> >
> >
> >
> >
>
>
>
>
>









   

Re: Spring autowiring null values

2008-05-19 Thread Ian Meikle
Hi Dave,

I have already read this page, the possible values are given as:

name, type, auto or constructor.

There is no NONE, or OFF value, and looking at the source code there does 
not seem to be support for it either.
Hence why I am asking if there is another way of turning this off.

Regards
Ian

CSC Solutions Norge AS
Registered Office: Sandsliåsen 57, 5254 Sandsli, Norway 
Registered in Norway No: 958 958 455

-
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. 
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to 
any order or other contract unless pursuant to explicit written agreement 
or government initiative expressly permitting the use of e-mail for such 
purpose.
-




Dave Newton <[EMAIL PROTECTED]> 
19.05.2008 15:54
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: Spring autowiring null values






--- Ian Meikle <[EMAIL PROTECTED]> wrote:
> We would like to turn off the autowiring completly.
> I understand that this is not really anything to do with STRUTS2, but
> 
> since it seems to be set via the STRUTS Spring plugin
> I thought you guys would know.

It can be set either in the Spring config file or in an S2 config file
[1]. I'm still not convinced that this is the problem you're trying to
solve, but maybe it is.

Dave

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


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




Re: Spring autowiring null values

2008-05-19 Thread Dave Newton
--- Ian Meikle <[EMAIL PROTECTED]> wrote:
> We would like to turn off the autowiring completly.
> I understand that this is not really anything to do with STRUTS2, but
> 
> since it seems to be set via the STRUTS Spring plugin
> I thought you guys would know.

It can be set either in the Spring config file or in an S2 config file
[1]. I'm still not convinced that this is the problem you're trying to
solve, but maybe it is.

Dave

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


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



Re: Spring autowiring null values

2008-05-19 Thread Joachim Ansorg

AFAIK Struts2 tries to set a new value to an object if it's currently null.

E.g. a new value for "person.address.street" should be set in a request. 
If "person" is created in the prepare() method and if the action uses an 
paramsPrepareParams stack then Struts2 tries to create the person object 
in the first params run. Which doesn't make much sense in this case 
because person will be created later by the action.


In the project I'm working on we don't have a setPerson method in the 
action so a new value can't be set from the outside.

And we're using an interface for Person so S2 doesn't know what to create.

Havn't found a way to turn the behaviour off, though.

Regards,
Joachim

We would like to turn off the autowiring completly.
I understand that this is not really anything to do with STRUTS2, but 
since it seems to be set via the STRUTS Spring plugin

I thought you guys would know.

Regards
Ian


CSC Solutions Norge AS
Registered Office: Sandsliåsen 57, 5254 Sandsli, Norway 
Registered in Norway No: 958 958 455


-
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. 
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to 
any order or other contract unless pursuant to explicit written agreement 
or government initiative expressly permitting the use of e-mail for such 
purpose.

-




Dave Newton <[EMAIL PROTECTED]> 
19.05.2008 15:28

Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: Spring autowiring null values






Spring autowiring (is autowiring by name the default?) isn't related to
XWork at all AFAIK.

Can you be a bit more specific about what behavior you're seeing
contrasted against what you'd prefer?

I mean, you can set Spring's default wiring to something else or turn
it off altogether.

Dave

--- Ian Meikle <[EMAIL PROTECTED]> wrote:
  

Is there a way of stopping Spring from autowiring values ?
Especially null values?

We use Spring to set up our actions to ease the integration of
hibernate, but we do not want Spring to set default values when 
property is null.


Can this be turned off ?

I have tried value="false"/> but this does not seem to be respected in all cases. 




-
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: Spring autowiring null values

2008-05-19 Thread Ian Meikle
Hi,

We would like to turn off the autowiring completly.
I understand that this is not really anything to do with STRUTS2, but 
since it seems to be set via the STRUTS Spring plugin
I thought you guys would know.

Regards
Ian


CSC Solutions Norge AS
Registered Office: Sandsliåsen 57, 5254 Sandsli, Norway 
Registered in Norway No: 958 958 455

-
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. 
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to 
any order or other contract unless pursuant to explicit written agreement 
or government initiative expressly permitting the use of e-mail for such 
purpose.
-




Dave Newton <[EMAIL PROTECTED]> 
19.05.2008 15:28
Please respond to
"Struts Users Mailing List" 


To
Struts Users Mailing List 
cc

Subject
Re: Spring autowiring null values






Spring autowiring (is autowiring by name the default?) isn't related to
XWork at all AFAIK.

Can you be a bit more specific about what behavior you're seeing
contrasted against what you'd prefer?

I mean, you can set Spring's default wiring to something else or turn
it off altogether.

Dave

--- Ian Meikle <[EMAIL PROTECTED]> wrote:
> Is there a way of stopping Spring from autowiring values ?
> Especially null values?
> 
> We use Spring to set up our actions to ease the integration of
> hibernate, but we do not want Spring to set default values when 
> property is null.
> 
> Can this be turned off ?
> 
> I have tried  value="false"/> but this does not seem to be respected in all cases. 


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




Re: Spring autowiring null values

2008-05-19 Thread Dave Newton
Spring autowiring (is autowiring by name the default?) isn't related to
XWork at all AFAIK.

Can you be a bit more specific about what behavior you're seeing
contrasted against what you'd prefer?

I mean, you can set Spring's default wiring to something else or turn
it off altogether.

Dave

--- Ian Meikle <[EMAIL PROTECTED]> wrote:
> Is there a way of stopping Spring from autowiring values ?
> Especially null values?
> 
> We use Spring to set up our actions to ease the integration of
> hibernate, but we do not want Spring to set default values when 
> property is null.
> 
> Can this be turned off ?
> 
> I have tried  value="false"/> but this does not seem to be respected in all cases. 


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



Re: How to skip validation for a particular button

2008-05-19 Thread Jim Kiley
Is this an opportunity to write annotation-driven validation instead?

On Mon, May 19, 2008 at 7:26 AM, Arpan Debroy <[EMAIL PROTECTED]>
wrote:

> As I have 4 buttons in each page, I dont want to write xml files for each
> button. There will be so many xml files.
> And all my requests come in one execute method in Action class and from
> there depending on the request I m calling different methods..
>
> On Mon, May 19, 2008 at 4:45 PM, Lukasz Lenart <
> [EMAIL PROTECTED]>
> wrote:
>
> > >
> > > I have 4 buttons in one page and I have written one validaton xml file
> > like
> > > this :-
> > >
> > > action_class - validation.xml
> > >
> > > But for one specific button I want to skip validation process.
> > >
> > > Is there anybody know how to do that.
> > >
> >
> > Do you have different methods for each button? If so prepare separated
> xml
> > files for each one you want to validate like below:
> >
> > ActionClass-method-validation.xml
> >
> > where method is the name from struts.xml (not the real method name in the
> > action's class)
> >
> > or you can use @SkipValidation annotation for particular method;
> >
> >
> > Regards
> > --
> > Lukasz
> >
>
>
>
> --
> Thanks & Regards
> Arpan Debroy
>
> AOL Online India Private Ltd
> RMZ EcoSpace Campus 1A
> Outer Ring Road, Bellandur,
> Bangalore - 560037
> India
> Mobile No :+9886006306
> on-board :+91 (80) 4035 4528
> E-mail : [EMAIL PROTECTED]
>



-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


Re: How to skip validation for a particular button

2008-05-19 Thread Arpan Debroy
As I have 4 buttons in each page, I dont want to write xml files for each
button. There will be so many xml files.
And all my requests come in one execute method in Action class and from
there depending on the request I m calling different methods..

On Mon, May 19, 2008 at 4:45 PM, Lukasz Lenart <[EMAIL PROTECTED]>
wrote:

> >
> > I have 4 buttons in one page and I have written one validaton xml file
> like
> > this :-
> >
> > action_class - validation.xml
> >
> > But for one specific button I want to skip validation process.
> >
> > Is there anybody know how to do that.
> >
>
> Do you have different methods for each button? If so prepare separated xml
> files for each one you want to validate like below:
>
> ActionClass-method-validation.xml
>
> where method is the name from struts.xml (not the real method name in the
> action's class)
>
> or you can use @SkipValidation annotation for particular method;
>
>
> Regards
> --
> Lukasz
>



-- 
Thanks & Regards
Arpan Debroy

AOL Online India Private Ltd
RMZ EcoSpace Campus 1A
Outer Ring Road, Bellandur,
Bangalore - 560037
India
Mobile No :+9886006306
on-board :+91 (80) 4035 4528
E-mail : [EMAIL PROTECTED]


Re: How to skip validation for a particular button

2008-05-19 Thread Lukasz Lenart
>
> I have 4 buttons in one page and I have written one validaton xml file like
> this :-
>
> action_class - validation.xml
>
> But for one specific button I want to skip validation process.
>
> Is there anybody know how to do that.
>

Do you have different methods for each button? If so prepare separated xml
files for each one you want to validate like below:

ActionClass-method-validation.xml

where method is the name from struts.xml (not the real method name in the
action's class)

or you can use @SkipValidation annotation for particular method;


Regards
-- 
Lukasz


How to skip validation for a particular button

2008-05-19 Thread Arpan Debroy
Hi All,

I have 4 buttons in one page and I have written one validaton xml file like
this :-

action_class - validation.xml

But for one specific button I want to skip validation process.

Is there anybody know how to do that.

Thanks
Arpan


Spring autowiring null values

2008-05-19 Thread Ian Meikle
Hi,

Is there a way of stopping Spring from autowiring values ?
Especially null values ?

We use Spring to set up our actions to ease the integration of hibernate, 
but we do not want Spring to set default values when property is null.

Can this be turned off ?

I have tried 
but this does not seem to be respected in all cases. 

Regards
Ian

CSC Solutions Norge AS
Registered Office: Sandsliåsen 57, 5254 Sandsli, Norway 
Registered in Norway No: 958 958 455

-
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. 
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to 
any order or other contract unless pursuant to explicit written agreement 
or government initiative expressly permitting the use of e-mail for such 
purpose.
-


RE: No JavaScript in s:div

2008-05-19 Thread Håken Stark
I'm able to reproduce the behavior you are describing, when 
executeScripts="false" and separateScripts="false" is set. By inspecting the 
html using Firebug, I can see that the javascripts are included, but unable to 
run. But when the attributes are set to executeScripts="true" and 
separateScripts="true", no scripts are executed and included. An error message 
is displayed instead: ' DEBUG: Error running scripts from content: undefined'.

So when for example a s:form is set to validate="true" in the remote content, 
the included scripts is unable to execute. Any workarounds for this would be 
appreciated :)

-Håken



-Original Message-
From: oscar perez [mailto:[EMAIL PROTECTED]
Sent: 16. mai 2008 18:19
To: Struts Users Mailing List
Subject: Re: No JavaScript in s:div

By setting executeScripts="true" and separateScripts="true" it is possible
to execute Javascript included from remote content. However this is executed
but not included in the rendered HTML. If I use executeScripts="false" and
separateScripts="false" the script is included in the rendered html but it
is not executed when the content is loaded.

I would like to mimic the behaviour of an included HTML. this is, if the
HTML contains functions in javascript, these functions are available for
this HTML, and if there is some script that is to be run when loading the
page, this will run. But with s and sx tags it seems impossible to get both,
i.e. execute the scripts when loading the page and have the scripts
available for further use.

Is there any workaround for this?
thanks,
Oscar

On Fri, May 16, 2008 at 4:26 PM, Yoge <[EMAIL PROTECTED]> wrote:

> set  executeScripts="true" in s:div tag.
> For ex
>  executeScripts="true">
>
> --Yoge
> http://zoho.com
>
> On Fri, May 16, 2008 at 12:50 PM, Håken Stark <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> > Are there any solution to these issues:
> >
> > http://issues.apache.org/struts/browse/WW-1766
> > http://issues.apache.org/struts/browse/WW-2501
> >
> > I'm still not able to execute any Javascript included from remote
> content.
> > Same issues persists in both Struts 2.0.11.1 and 2.1.2. Could someone
> give
> > me some input on this issues, especially issue WW-2501, since the comment
> > text says 'removed'?
> >
> > -Håken
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> --Yoge
> 91-9840425388
>

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



Re: [Struts 2] Many-to-many form-interface

2008-05-19 Thread David Canos
Sorry Laurie.
I will try to make me clarify

I just want to build a form field that
* in a Author profile will let me select the books that a author have.
* in a Book profile will let me select the authors of the book.

It could be possible by a multiple select but I really dont like this
solution so I asked looking for a better way.

Thank u


2008/5/19 Laurie Harper <[EMAIL PROTECTED]>:

> David Canos wrote:
>
>> I want to build a generic form-interface to cover a simple many-to-many
>> relation.
>> Like a Writer and Books relation where a Writer could write some books and
>> a
>> book could be written by some writers.
>>
>> I was thinking in a concrete Struts tag but I find nothing.
>>
>> Could you show me how to solve this issue in a generic way?
>>
>
> It's a bit difficult to offer advice when the requirements are this
> vague... What do you want this form to do? Allow you to edit a book's
> authors? Allow you to edit an authors books? Some combination of both? (how
> would that work?)
>
> L.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: [struts2]how to configure the web app - solved!

2008-05-19 Thread kindlerm
First of all, thanks to all who answered to my previous posting!

I did not want one of this big "use another framework 
[Spring/AppFuse/Hibernate/...] in addition to Struts2" things. While this is 
surely the right way to go for a lot of heavy weight systems there are also 
smaller lightweight apps which need some initialization at startup time (and 
btw: these other frameworks themselves need a hook to the lifecycle events of 
the web app)

Finally I found the way to go:

just use a ServletContextListener and put the configuration parameters you need 
in the deployment descriptor web.xml.
The only "trick" needed: use  instead of !
One can access these context parameters the same way like servlet init 
parameters:
use 

...
public void contextInitialized(ServletContextEvent lcEvent) {

ServletContext context = lcEvent.getServletContext();
String par = context.getInitParameter("foo"); // this will access the 
context parameter "foo" from web.xml
...

}

Martin


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