You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2010/10/24 16:48:20 UTC

[jira] Resolved: (WICKET-1531) Behaviours cannot change tag name

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

Martin Grigorov resolved WICKET-1531.
-------------------------------------

    Resolution: Not A Problem
      Assignee: Martin Grigorov

In Wicket 1.5 this is already possible:
* use org.apache.wicket.behavior.IBehavior.beforeRender(Component) 
* MarkupElement markupElement = component.getMarkup().get()
* cast to ComponentTag and do whatever you need with the tag.

> Behaviours cannot change tag name
> ---------------------------------
>
>                 Key: WICKET-1531
>                 URL: https://issues.apache.org/jira/browse/WICKET-1531
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.3
>            Reporter: John Patterson
>            Assignee: Martin Grigorov
>             Fix For: 1.5-M3
>
>
> IBehaviour.onComponentTag() is called after Component.onComponentTat() which usually checks the name of the tag and throws an exception if it is not what is expected.  This means I cannot change the name of the tag in the behaviour.
> The use case is this:
> I am building a kind of "Bean panel" application and it is really awkward to deal with the input form component as a panel.  Simply changing the name of the tag from <input> to <select> has really made the code a LOT simpler.
> I created a Behaviour to change the name to clean up the code a bit more but it does not work.

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