You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Susan Bradeen <Su...@softlanding.com> on 2003/04/04 19:00:04 UTC

Too many tags

In a couple of my JSPs I currently define properties from my 
ApplicationResouces.properties file like this ...

  <bean:define id="priorityHeading" >
        <bean:message key="priority.heading"/>
  </bean:define>

Which is then used for column headings and such in my display like this 
... 

  <display:column property="priority" title="<%= priorityHeading %>"/>

The problem is that I have *so* many <bean:define> tags, and my resulting 
.java files are huge. I would like to pull out these <bean:define>s and 
put this "definition" code somewhere else, outside my JSPs. 

Is my only option to add all the "definitions" as properties to my 
ActionForm, then populate them in the Action with the something like ...

    MessageResouces messages = getResouces(request);
    myForm.setPriorityHeading(messages.getMessage("priority.heading"));

This will add quite a bit of code to my Action. Is there a way to access 
the ApplicationResources.properties file in an ActionForm? Then perhaps I 
could set these values within a form bean instead?

Perhaps I have made this way too difficult from the beginning?

Thank you,
Susan Bradeen
susanb@softlanding.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org