Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Strange behavior from <a> tags when using Clay HTML templates: msg#00066

apache.shale.user

Subject: Re: Strange behavior from <a> tags when using Clay HTML templates

>From: "Richard Eggert" <reggert@xxxxxxxxxxxxxxxxxxxxxxxx>
>
> I'm having an issue using anchor () tags that are explicitly mapped to
> h:commandLink (implicitly mapped tags don't work at all in this case).
>
> Consider the following HTML template named bugTest.html loaded via an XML
> view
> named "/bugTest.clay":
>
>
><html>
> <body>
> <form>
> <a href="some-other-page.html" jsfid="h:commandLink"
> action="/some-other-view.clay">
> Go here
> </a>
> </form>
> </body>
></html>
>
>
>
>
> When viewed offline in a web browser, this page works fine.
>
> However, when viewed online using Clay, the text within the link becomes
> "some-other-page.html Go here" instead of just "Go here", and clicking on the
> link just causes the page to reload.
>
> Is this a bug, or am I doing something wrong? There doesn't seem to be any
> valid reason why the contents of the "href" attribute should be moved to be
> nested within the tag, or why the "action" attribute shouldn't propagate to
> the
> commandLink component.
>

Yeah, I think this is a bug. What I think is going on here is that the
implicit mapping is overriding the commandLink's value [1].

What I mean is that the anchored tag is mapped to the outputLink by default.
We should check to see if there is an action symbol override before using the
href. Or, just look at the componentType after the jsfid overrides to make
sure it's an outputLink. The outputLink puts the href in the components value
attribute where a commandLink puts the text in the value attribute.

Please create a JIRA ticket for this one.

[1]
http://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/OutputLinkBuilder.java?view=markup


>
> Rich Eggert
> Member of Technical Staff
> Proteus Technologies, LLC
> http://www.proteus-technologies.com
>
>

Gary


>
>
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
user-groups.jax...    php.zend.framew...    os.solaris.open...    web.quixote.use...    java.openjdk.ho...    ietf.secmech/20...    gnu.glpk/2004-0...    recreation.cars...    network.smokepi...    linux.drivers.i...    cms.opencms.dev...    fonts.gfontview...    text.xml.soap.u...    voip.nist-sip/2...    debian.ports.hp...    xfree86.interna...    science.biology...    qnx.openqnx.dev...    mail.sylpheed.c...    busybox/bios/20...    emulators.kvm.s...    hardware.openco...    apple.fink.begi...    kde.german/2006...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation