From issues-return-32472-apmail-struts-issues-archive=struts.apache.org@struts.apache.org Fri Oct 12 19:28:05 2018 Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B3905194A5 for ; Fri, 12 Oct 2018 19:28:05 +0000 (UTC) Received: (qmail 36378 invoked by uid 500); 12 Oct 2018 19:28:04 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 36334 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 36080 invoked by uid 99); 12 Oct 2018 19:28:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2018 19:28:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 78D68C1883 for ; Fri, 12 Oct 2018 19:28:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id lfQzKemWdEHX 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 8E5425F30F 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 26FDDE02EB 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 AC16424DBE 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] [Comment Edited] (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 edited comment on WW-4968 at 10/12/18 7:27 PM: -------------------------------------------------------------------- Read [this|https://stackoverflow.com/q/25551470/1700321]. was (Author: aleksandr-m): 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)