Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 97784 invoked from network); 23 Apr 2008 13:00:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2008 13:00:22 -0000 Received: (qmail 21196 invoked by uid 500); 23 Apr 2008 13:00:11 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 21163 invoked by uid 500); 23 Apr 2008 13:00:11 -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 21152 invoked by uid 99); 23 Apr 2008 13:00:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 06:00:11 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DRUG_DOSAGE,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.202.226.200] (HELO gate.abas.de) (212.202.226.200) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 12:59:19 +0000 Received: from gate.abas.de (localhost [127.0.0.1]) by gate.abas.de (8.13.8/8.13.8) with ESMTP id m3NCxdt7006655 for ; Wed, 23 Apr 2008 14:59:39 +0200 (CEST) Received: (from localhost) by gate.abas.de (MSCAN) id 5/gate.abas.de/smtp-gw/mscan; Wed Apr 23 14:59:39 2008 From: Stefan Gebhardt Organization: Abas Software AG, Karlsruhe To: "Struts Users Mailing List" Subject: Re: S2 <480F30EC.9020705@blueskyminds.com.au> In-Reply-To: <480F30EC.9020705@blueskyminds.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804231459.36596.stefan.gebhardt@abas.de> X-ABAS-MAIL-MARK: added by mailmarker.abas.de X-Virus-Checked: Checked by ClamAV on apache.org On Wednesday 23 April 2008 14:51:56 Jeromy Evans wrote: > Stefan Gebhardt wrote: > > Hi s2 users! > > I like to render a html button element. > > > > > cssClass="${pageScope.divClass}" id="btn_new"/> > > > > Most of the times > > > sometimes i get > > > > > > Both result are not correct. Is it a bug? Did i make a mistake? Can you give me hint, please? > > > > greets > > stefan gebhardt > > > Congratulations, you've managed to hit three struts issues in one go: > 1. OGNL is confusing > 2. Struts2 doens't provide enough developer feedback > 3. struts2 submit tag of type button doesn't support the title attribute > > Explanation: > 1. Like most attributes of Struts 2 tags, the title attribute is > evaluated as an OGNL expression. By coincidence, you've used the > reserved word 'new'. > > I think the first issue may be that 'new' is an invalid expression > and/or causes conflicts. First, force it to a string to avoid that risk: > > > 2. You may not be getting any useful feedback about it (such as invalid > expression or invalid property) because you're not using a recent > version of Struts2. This is evident by this line: > > cssClass="${pageScope.divClass}" id="btn_new"/> > > which has not been supported since 2.0.10. I have tried it in Struts > 2.1.1 though and it still evaluates title="new" to the literal string > "new" without any warnings. > > 3. The template for the submit tag is indeed missing the title > attribute. The tag supports it but not the template. You'll have to > create a custom template to enable it. Feel free to raise an issue in > JIRA if there isn't one already there for this. > > Creating a custom template is straight-forward. Copy the submit.ftl > template out of the struts2-core jar and modify it as described here: > http://struts.apache.org/2.0.11.1/docs/extending-themes.html > You need to add 3 lines to the template which you'll see there already > for type=submit > > Hope that helps, > Jeromy Evans > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > Hey Hey great answer! Thank you a lot. it helped stefan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org