Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 59305200D44 for ; Mon, 20 Nov 2017 20:58:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 56299160BF9; Mon, 20 Nov 2017 19:58:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 97D2A160BE1 for ; Mon, 20 Nov 2017 20:58:51 +0100 (CET) Received: (qmail 79109 invoked by uid 500); 20 Nov 2017 19:58:50 -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 79098 invoked by uid 99); 20 Nov 2017 19:58:50 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Nov 2017 19:58:50 +0000 Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id E5FF91A00C7 for ; Mon, 20 Nov 2017 19:58:49 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id o41so11467201lfi.2 for ; Mon, 20 Nov 2017 11:58:49 -0800 (PST) X-Gm-Message-State: AJaThX6fiy38nyur9hvbBJtjGePYxT72ykxlnABh+xVGpz/rvwaYXnuB 2IXULf8rRPUtCBpS0YgFIqMZmFAFijQkC6OCjCU= X-Google-Smtp-Source: AGs4zMbgs6GHgkpx3B3aKS24LfCt+FCSq0W6zheIXsiuBMwslLQnZSSZf3qzV0v09jrenrfvDLVIpBxeXJqDwytIcmc= X-Received: by 10.46.66.216 with SMTP id h85mr4730311ljf.108.1511207927506; Mon, 20 Nov 2017 11:58:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.78.201 with HTTP; Mon, 20 Nov 2017 11:58:26 -0800 (PST) In-Reply-To: References: From: Lukasz Lenart Date: Mon, 20 Nov 2017 20:58:26 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: s:select selected option from a list based on a condition To: Struts Users Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable archived-at: Mon, 20 Nov 2017 19:58:52 -0000 2017-11-20 14:30 GMT+01:00 heberraja@gmail.com : > list=3D"students" listKey=3D"sid" listValue=3D"name" > value=3D"defaultStudent.equals('true')" > /> > > I have a select tag as above. The Student object has a boolean value defa= ultStudent with getter isDefaultStudent. How to pre-select the default stud= ent based on this boolean value. Value accepts only static value, not condi= tion. value=3D"%{#this.defaultStudent ? #this.name : '-1'}" or value=3D"%{[0].defaultStudent ? [0].name : '-1'}" Regards --=20 =C5=81ukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org