From issues-return-32469-archive-asf-public=cust-asf.ponee.io@struts.apache.org Fri Oct 12 16:52:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 98FD3180660 for ; Fri, 12 Oct 2018 16:52:04 +0200 (CEST) Received: (qmail 7544 invoked by uid 500); 12 Oct 2018 14:52:03 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 7532 invoked by uid 99); 12 Oct 2018 14:52:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2018 14:52:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2FE221A18F4 for ; Fri, 12 Oct 2018 14:52:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id JzWKNp0KaZo4 for ; Fri, 12 Oct 2018 14:52:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 45D6B5F30F for ; Fri, 12 Oct 2018 14:52:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 66F91E2618 for ; Fri, 12 Oct 2018 14:52:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 55C6C24DC4 for ; Fri, 12 Oct 2018 14:52:00 +0000 (UTC) Date: Fri, 12 Oct 2018 14:52:00 +0000 (UTC) From: "Nate (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (WW-4968) combining s:set and s:property where the property retrieved is null has unexpected results MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Nate created WW-4968: ------------------------ Summary: combining s:set and s:property where the property ret= rieved is null has unexpected results Key: WW-4968 URL: https://issues.apache.org/jira/browse/WW-4968 Project: Struts 2 Issue Type: Bug Components: Core Tags Affects Versions: 2.5.14.1 Reporter: Nate I have the following s:set definition: which I further on use as such in a Dojo input: I needed to escape the value this generated for Javascript so single quotes= didn't corrupt the dojo-props, so I replaced it with=C2=A0 This worked if buildEnvironmentSearchView.name is not null, but when it is = evaluated to be null, instead of name being set to null, it was evaluated t= o the toString value of the top element on my valueStack: be.companyname.pr= oductname.client.struts2.layout.FieldFormatter@19b82032 I'm not sure why this happens. In the end, I managed to resolve it by putti= ng the s:property directly into the data-dojo-props object, but I don't rea= lly get why this happened. Is it intended that if you do an s:set with a nu= ll value, it returns the top value of the stack? This doesn't seem to be do= cumented anywhere. -- This message was sent by Atlassian JIRA (v7.6.3#76005)