Announcement Announcement Module
Collapse
No announcement yet.
Assign selected message-properties to tagx-File Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Assign selected message-properties to tagx-File

    I extended the input.tagx by a parameter fielddescription which should show a helptext for the inputfield.

    Code:
    <jsp:directive.attribute name="fielddescription" type="java.lang.String" required="false" description="Optional description for field and expected input" />
    If i call the input.tagx like this

    Code:
    <spring:message var="help_username" code="help_username" text=""/>
    
    <field:input field="username" fielddescription="${help_username}" id="c_de_gundl_spak_domain_FlashStream_username" z="user-managed"/>
    which works nice, but declaring a variable with the message-tag for every help-text is a roundabout way.

    Is there a way to autogenerate variables once for all message-entries in a central "code-position"?

    Or is there a possibility a assign the values by convention like it's done in the id-Attribute?

  • #2
    As you probably guessed Roo would not know about your (absolutely valid) extensions to the tag library.

    In order to automate the addition of your custom attributes you would need to write your own little add-on which listens to Roo internal metadata so it can manage the jspx files when needed. This is already possible right now but we are looking to make it easier over the next releases.

    One more point I should mention here. If you add a new attribute to an element in a jspx file you basically tell Roo not to roundtrip this element any more. Roo figures this out because the hascode for this element will not match any more. You can avoid this situation by renaming your attribute slightly to '_fielddescription' if you wish. More details here http://static.springsource.org/sprin...html#jsp-views

    Comment

    Working...
    X