Re: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Musachy Barroso
There is a getItems() in your action right? Does anything get generated at all? musachy -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

Re: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Dave Newton
Martin Gainty wrote: Here is the code private List includeProperties; includeProperties is a List of Regular Expression java.util.regex.Patterns javadoc at http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html try expressing the String as a regex Pattern e.g. [i][t][e][m][s]\p{

RE: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Martin Gainty
Here is the code private List includeProperties; includeProperties is a List of Regular Expression java.util.regex.Patterns javadoc at http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html try expressing the String as a regex Pattern e.g. [i][t][e][m][s]\p{.}\p{*}\p{\}\p{.}[n][a]

Re: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Dale Newfield
john.c.cartwri...@noaa.gov wrote: items.*\.name Can someone please help me w/ what might be wrong? Maybe the whitespace? Does it behave any differently if you do: items.*\.name ? -Dale -

JSON plugin ignoring includeProperties parameter

2009-05-21 Thread John . C . Cartwright
Hello All, I'm trying to use jsonplugin 0.32 w/ struts 2.0.14 and it seems that the includeProperties parameter is being ignored. My configuration looks like: true items.*\.name Can someone please help me w/ what might be wro

session timeout ---execute action in struts2

2009-05-21 Thread Junhua gao
i configured in web.xml com.listener.SessionUserListener 1 but the valueUnbound in SessionUserListener is not executed when session is timeout,who can tell me why? ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.

Re: Nested Struts2 iterator tags

2009-05-21 Thread Bhaarat Sharma
thanks!! On Thu, May 21, 2009 at 2:29 PM, Martin Gainty wrote: > > //Assuming we have this Action > //A Simple Action Class which demonstrates placing information in a Map > public class GetEntryAction extends ActionSupport > { >private ArrayList stats_list=new ArrayList(30); //a collection

RE: Nested Struts2 iterator tags

2009-05-21 Thread Martin Gainty
//Assuming we have this Action //A Simple Action Class which demonstrates placing information in a Map public class GetEntryAction extends ActionSupport { private ArrayList stats_list=new ArrayList(30); //a collection of stats private class stats { private ArrayList entries_list=

Re: Block accessing in some path with filter.

2009-05-21 Thread Andy Sykes
Read the section on the config file elements in struts.xml on the Struts2 docs site. Also read the Interceptors guide[1]. You have to specify the interceptor stack on the action. You can use the element to specify what stack to use by default. And what you've defined is not an intercepto

Re: Nested Struts2 iterator tags

2009-05-21 Thread Bhaarat Sharma
nevermind... this works: On Thu, May 21, 2009 at 12:28 PM, Bhaarat Sharma wrote: > Hi > I have two nested struts iterator tags. > > The value for second iterator tag is property from the first iterator. > > Something like this > > > > HOH Name | HOH DOB value="DOB"/> |

Nested Struts2 iterator tags

2009-05-21 Thread Bhaarat Sharma
Hi I have two nested struts iterator tags. The value for second iterator tag is property from the first iterator. Something like this HOH Name | HOH DOB| Project Member Name Member DOB Failed Verification Descrip

Re: Block accessing in some path with filter.

2009-05-21 Thread Stefano Tranquillini
Big problem folks. i already have an interceptor form the ejb. so i need to use both of these interceptors. i've to update the DEFAULT PACKAGE in this way: i can't simply a

Re: Block accessing in some path with filter.

2009-05-21 Thread Stefano Tranquillini
thanks, but i definide in struts my interceptors in this way: in order to use the interceptors only when namespace is /admin/* but the interceptor is never called! And: where i've to put the globalforward? i putted a the end of the sturts.xml something like tha

Re: Block accessing in some path with filter.

2009-05-21 Thread Stefano
2009/5/21 Paweł Wielgus : > global forward thanks, but i definide in struts my interceptors in this way: in order to use the interceptors only when namespace is /admin/* but the interceptor is never called! ideas? thanks -- Stefano

Re: Preload of database data?

2009-05-21 Thread Wes Wannemacher
It's mostly a matter of preference, in some scenarios, using the action tag makes more sense. There is information here - http://cwiki.apache.org/WW/crud-demo-i.html#CRUDDemoI-Adding&Editinganemployee -Wes On Thu, May 21, 2009 at 10:37 AM, Luis Medina wrote: > Does anyone know which is the dife

Re: Block accessing in some path with filter.

2009-05-21 Thread Paweł Wielgus
Hi Stefano, use global forward. Best greetings, Paweł Wielgus. 2009/5/21 Stefano Tranquillini : > I've some problem with filter. > so i'll try with interceptor. > > i've done something like that: > > public String intercept(ActionInvocation invocation) throws Exception { >        Map session = A

Re: Preload of database data?

2009-05-21 Thread Luis Medina
Does anyone know which is the diference between "prepare data" using the Action Constructor and the prepare method? On Thu, May 21, 2009 at 6:18 AM, wrote: > You can prepare data by implemeting Preparable in your action > > On Tue, May 19, 2009 at 4:48 PM, Christian Benjamin Ries < > christian_b

Re: Block accessing in some path with filter.

2009-05-21 Thread Stefano Tranquillini
I've some problem with filter. so i'll try with interceptor. i've done something like that: public String intercept(ActionInvocation invocation) throws Exception { Map session = ActionContext.getContext().getSession(); Object o = session.get("logged"); boolean ret = false;

RE: IllegalStateException: Cannot forward. Response already committed.

2009-05-21 Thread Hermann X Lau
Hi, I tried out your suggestions and I am still getting this exception. I even put everything in the JSP in one line and mad sure there were no whitespaces. <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic"%><%@ page contentType="text/html" import="org.apache.log4j.Logger"%>

RE: Accessing protected resources via a login page

2009-05-21 Thread Steve
Hi Stuart, You're quite right. I'm not sure how I missed this as I actually logged the output from getQueryString! Still, this has certainly simplified my code. My interceptor calls setUrl on the action. This URL is then passed through a tag on the login form via a getUrl call. If the intercep

Re: How to get request locale in OGNL?

2009-05-21 Thread Gordian Yuan
typo..I try to use #request.locale now .. On Thu, May 21, 2009 at 7:51 PM, Gordian Yuan wrote: > Thank you for your rapid response > > I try to use #context.locale now. It's look fine.But I'm not sure > > When i write , output is zh_CN > > But i write , output is > > {__sitemesh__filterapplied

Re: How to get request locale in OGNL?

2009-05-21 Thread Gordian Yuan
Thank you for your rapid response I try to use #context.locale now. It's look fine.But I'm not sure When i write , output is zh_CN But i write , output is {__sitemesh__filterapplied=true, __spring_security_filterSecurityInterceptor_filterApplied=true, __spring_security_session_fixation_filter

Re: passing form parameters to a custom validator

2009-05-21 Thread manub
Did it this way. Passed field names via the tag, then obtained values inside the validator class using getFieldValue(fieldName, object). Thank you for suggestions. stanlick wrote: > > Rather than pass this, that and the other parameter(s) to your validator, > why not just retrieve what you ne

Re: How to get request locale in OGNL?

2009-05-21 Thread stanlick
invocation.getStack().findString(#attr.locale) On Thu, May 21, 2009 at 6:22 AM, Gordian Yuan wrote: > Hi, > > I want to know how to get request locale in OGNL? > > For now I use > value='#session.WW_TRANS_I18N_LOCALE?#session.WW_TRANS_I18N_LOCALE.toString():"zh_CN"'/> > > This must assume that

Re: passing form parameters to a custom validator

2009-05-21 Thread stanlick
Rather than pass this, that and the other parameter(s) to your validator, why not just retrieve what you need from inside the validator? You have the ActionInvocation passed to your doIntercept(...), which contains the ValueStack containing your objects. Peace, Scott On Tue, May 19, 2009 at 7:

How to get request locale in OGNL?

2009-05-21 Thread Gordian Yuan
Hi, I want to know how to get request locale in OGNL? For now I use This must assume that the initial value is "zh_CN". So I need to know how to get request locale in OGNL. Thx Gordian Yuan

Re: Preload of database data?

2009-05-21 Thread stanlick
You can prepare data by implemeting Preparable in your action On Tue, May 19, 2009 at 4:48 PM, Christian Benjamin Ries < christian_benjamin.r...@fh-bielefeld.de> wrote: > Hi there, > > I have a small site with some informations which are stored in a > database. A method for administrations reason

Re: passing form parameters to a custom validator

2009-05-21 Thread Lukasz Lenart
2009/5/21 manub : > I think that this may work for the expression validator because you are > supplying an expression. I've been thinking about tag, with it you can set any field in your validator and it can be an OGNL expression. Regards -- Lukasz http://www.lenart.org.pl/ --

Re: passing form parameters to a custom validator

2009-05-21 Thread manub
I think that this may work for the expression validator because you are supplying an expression. Maybe I need to use an expression too, but I don't know how to evaluate it within my Java class for Validator. Lukasz Lenart wrote: > > 2009/5/20 manub : >> I've written a custom field validator, w