Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-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 6F2A79080 for ; Mon, 5 Mar 2012 20:34:02 +0000 (UTC) Received: (qmail 71267 invoked by uid 500); 5 Mar 2012 20:34:00 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 71154 invoked by uid 500); 5 Mar 2012 20:34:00 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Delivered-To: moderator for user@commons.apache.org Received: (qmail 97297 invoked by uid 99); 5 Mar 2012 20:10:16 -0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of coloraura.com@gmail.com designates 209.85.210.52 as permitted sender) Received-SPF: pass (google.com: domain of coloraura.com@gmail.com designates 10.68.221.167 as permitted sender) client-ip=10.68.221.167; Authentication-Results: mr.google.com; spf=pass (google.com: domain of coloraura.com@gmail.com designates 10.68.221.167 as permitted sender) smtp.mail=coloraura.com@gmail.com; dkim=pass header.i=coloraura.com@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-type:message-id :content-transfer-encoding:cc:x-mailer:from:subject:date:to; bh=vPtpGsqUePHELB2pQ2CI3JEIfZy0trF+JSoz/xHdEa8=; b=LerNgFM/D5gpwijXqfb0djdNtJz3ldy/Rr1Ti1+YuGYmCw8p6/E/rEkmSOfjGwCXg5 VZuoYKo4durLtxkfC92xVxLjWC2W112DEU9toXe4MjCSHjVNhM8EEVWiOWfjL0jGQVXK 0RWoSHsa5jn6mq83YElNcFSVOnLja9FbJIW9EycOOO82E1TqnnMv5pAMCuVhUqZVQeAM QhRT1Iy4/6/j8BkQQqKmcDIdWn1oZ0OuFLZ/porbpEhjHLMlbWIBJ0lZiShMBnRu00d5 hmTqH4L6vKFy6tTCsIA4/R8Q6w89LBmgcxM60Q1MZBL4nnChsID9oR36/9C426wrszAo W3ZA== References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Message-Id: <106FB74F-8C57-4156-9A56-7CE9F7410F61@gmail.com> Content-Transfer-Encoding: quoted-printable Cc: Commons Users List X-Mailer: iPhone Mail (9A405) From: Daniel Pitts Subject: Re: [OGNL] Mask operators Date: Mon, 5 Mar 2012 12:09:41 -0800 To: Commons Users List X-Virus-Checked: Checked by ClamAV on apache.org Or more simply m.get("a-b") :-) OGNL is a great tool. But don't use it where it doesn't help.=20 Thanks, Daniel. Sent from my iPhone On Mar 5, 2012, at 8:20 AM, Chris Pratt wrote: > Try getValue("\"a-b\""); > (*Chris*) > On Mar 5, 2012 4:54 AM, wrote: >=20 >> Is there a way to mask operators in ognl so that they do not get >> interpreted as operators? >>=20 >> Example: >> I have a Map m which contains a key 'a-b' >> If I write Ognl.getValue("a-b", m), Ognl tries to find a and b inside the= >> map and subtracts b from a. >> But what I want is to get the key named 'a-b'. >> I already tried to use a backslash: Ognl.getValue("a\\-b", m) but this is= >> not accepted by Ognl (Malformed OGNL expression). >>=20 >> Any ideas? >> ---------------- >> Disclaimer: >> Diese Nachricht dient ausschlie=C3=9Flich zu Informationszwecken und ist n= ur >> f=C3=BCr den Gebrauch des angesprochenen Adressaten bestimmt. >>=20 >> This message is only for informational purposes and is intended solely fo= r >> the use of the addressee. >> ---------------- --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org