[ 
https://issues.apache.org/struts/browse/SHALE-426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary VanMatre resolved SHALE-426.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.0-SNAPSHOT
                   1.0.5-SNAPSHOT
         Assignee: Gary VanMatre

Fix available in the 20070319 nightly build.

> Implicit mapping of <a> tag appears to be overriding explicit mapping
> ---------------------------------------------------------------------
>
>                 Key: SHALE-426
>                 URL: https://issues.apache.org/struts/browse/SHALE-426
>             Project: Shale
>          Issue Type: Bug
>          Components: Clay
>    Affects Versions: 1.0.4
>            Reporter: Richard W. Eggert II
>         Assigned To: Gary VanMatre
>             Fix For: 1.0.5-SNAPSHOT, 1.1.0-SNAPSHOT
>
>
> From discussion with Gary VanMatre on user@shale.apache.org:
> >From: "Richard Eggert" <[EMAIL PROTECTED]>
> >
> > 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to