From issues-return-32471-archive-asf-public=cust-asf.ponee.io@struts.apache.org Fri Oct 12 21:28: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 04B1C18067E for ; Fri, 12 Oct 2018 21:28:04 +0200 (CEST) Received: (qmail 35842 invoked by uid 500); 12 Oct 2018 19:28:04 -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 35831 invoked by uid 99); 12 Oct 2018 19:28:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2018 19:28:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 783861809CC for ; Fri, 12 Oct 2018 19:28:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, 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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ZPlZ3RttH5K4 for ; Fri, 12 Oct 2018 19:28:01 +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 84B355F20B for ; Fri, 12 Oct 2018 19:28:01 +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 1025CE015E for ; Fri, 12 Oct 2018 19:28: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 AA21024DBB for ; Fri, 12 Oct 2018 19:28:00 +0000 (UTC) Date: Fri, 12 Oct 2018 19:28:00 +0000 (UTC) From: "Aleksandr Mashchenko (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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 [ https://issues.apache.org/jira/browse/WW-4968?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1664834= 5#comment-16648345 ]=20 Aleksandr Mashchenko commented on WW-4968: ------------------------------------------ Read [this | https://stackoverflow.com/q/25551470/1700321]. > combining s:set and s:property where the property retrieved is null has u= nexpected 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 > Priority: Major > > I have the following s:set definition: > value=3D"buildEnvironmentSearchView.name" scope=3D"request"> > which I further on use as such in a Dojo input: > data-dojo-props=3D"store:nameIdentificationStore, searchAttr:'name', val= ue:'${name}'" > name=3D"buildEnvironmentSearchView.name" > id=3D"buildEnvironmentSearchView.name" /> > I needed to escape the value this generated for Javascript so single quot= es didn't corrupt the dojo-props, so I replaced it with=C2=A0 > > > > This worked if buildEnvironmentSearchView.name is not null, but when it i= s evaluated to be null, instead of name being set to null, it was evaluated= to the toString value of the top element on my valueStack: be.companyname.= productname.client.struts2.layout.FieldFormatter@19b82032 > I'm not sure why this happens. In the end, I managed to resolve it by put= ting the s:property directly into the data-dojo-props object, but I don't r= eally get why this happened. Is it intended that if you do an s:set with a = null value, it returns the top value of the stack? This doesn't seem to be = documented anywhere. -- This message was sent by Atlassian JIRA (v7.6.3#76005)