Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D3DE1018F for ; Mon, 16 Dec 2013 09:45:25 +0000 (UTC) Received: (qmail 21691 invoked by uid 500); 16 Dec 2013 09:45:19 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 20168 invoked by uid 500); 16 Dec 2013 09:45:11 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 20160 invoked by uid 99); 16 Dec 2013 09:45:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 09:45:10 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jotpe.osm@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qc0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 09:45:03 +0000 Received: by mail-qc0-f180.google.com with SMTP id w7so3505360qcr.11 for ; Mon, 16 Dec 2013 01:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=D4xi7XwXmHrikdMa1wn3OvZGaaAMEE7CJrmcGhS57yw=; b=zUiyie323EhJdUe0C3mZiS4pJRVg/U7GHFOEP3NiXw2+o1cX712e7+Kthd8ZoKsrAT Q7OLDI4cIh90n/WjI2BO3SJt9Dha4SNFTfJ36wZO28dOna8tH1VdLAI9GDhm15ejdR5F 3/HN35fv1D0xBqIjBuBklNkgiDsym3qPE50qvTBcwwlBjQ76R3HfQ2/rCE+JH+ZEzOPf c5veCq9rI6qatLuun4lOG/fyulM960wRwBYd7UdcGUuoaOQmKyO09N9hMs4ZQJlgrYfq /lxHNf3rT/v51Ar/skcg1LCiUnA8FogmNU2ur8PxrK+lbCREwbaygZGV9+pEwt9wFTgp ir6A== MIME-Version: 1.0 X-Received: by 10.224.162.212 with SMTP id w20mr30887836qax.68.1387187082844; Mon, 16 Dec 2013 01:44:42 -0800 (PST) Received: by 10.140.42.6 with HTTP; Mon, 16 Dec 2013 01:44:42 -0800 (PST) In-Reply-To: References: Date: Mon, 16 Dec 2013 10:44:42 +0100 Message-ID: Subject: Re: paramsPrepareParamsStack only populates pojo, neither String nor int From: jotpe To: Struts Users Mailing List Content-Type: multipart/alternative; boundary=089e013cb7ce4f5f9f04eda3a952 X-Virus-Checked: Checked by ClamAV on apache.org --089e013cb7ce4f5f9f04eda3a952 Content-Type: text/plain; charset=ISO-8859-1 Thanks for reply! Sorry, my fault: I explained not everything well. I do not need access the User object in my navigation interceptor. They have no contact points! I just execute the interceptor before the paramsPrepareParamsStack to be sure the navigation content gets generated, before the validate method detects maybe field errors... which would broke the interceptor chain. What happens conrete in my case: Html content is generated by the navigator interceptor. If the interceptor stores it into the value stack (before invocation.invoke()) => my String object passwordRepetition stays null in my action class. Without calling ValueStack.set(String,Object) => passwordRepetition is populated well! > or you can replicate the paramsPrepareParamsStack into your new stack and put your navigation interceptor anywhere in that stack you want. (*Chris*) This is a good idea to integrate custom interceptors, which needs already populated class properties. But in this case, there's no need. Regards Johannes 2013/12/13 Chris Pratt > I'm guessing that the user fields aren't actually getting set (since that's > done by the params interceptor that hasn't run yet), but you're seeing the > existing values of the object. The passwordRepetition is showing null, but > it similarly hasn't been set by the params interceptor. > > You can either call the params interceptor one more time before your > navigation interceptor or you can replicate the paramsPrepareParamsStack > into your new stack and put your navigation interceptor anywhere in that > stack you want. > (*Chris*) > > > On Fri, Dec 13, 2013 at 6:53 AM, jotpe wrote: > > > Hello List, > > > > I build myself a custom interceptorstack. The core part has to be the > > paramsPrepareParamsStack, because i work with an or-mapper. > > > > > > > > > > > > > > > > > > > > In my action class, there are 2 variables: > > > > private User user; > > private String passwordRepetition; > > > > > > POST Parameters are for example: > > > > user.id=14 > > user.password=secret > > passwordRepetition=secret > > > > > > Everthing is working fine, if the navigation interceptor is executed > after > > the paramsPrepareParamsStack. But i need to execute it before, because no > > navigation content is generated in case of error detection in a validate > > method. > > > > Is the navigation interceptor executed befor the paramsPrepareParamsStack > > the user varianbles id and passwort are set proper: > > user.id=1 > > user.password=secret > > > > but setPasswordRepetition is never called and passwordRepetition stays > > null!!! > > > > > > The navigation interceptor only generates some html content and saves it > in > > the value stack. Is this no good idea? It's done in this way: > > > > ValueStack vs = ActionContext.getContext().getValueStack(); > > vs.set("servicenav","
    ...
"); > > return invocation.invoke(); > > > > Can please anyone help me? This kind of error, raises a some distrust in > > me... > > > > regards Johannes > > > > > > > > --089e013cb7ce4f5f9f04eda3a952--