I have a tile I use to build a html control that has to write a string.  I
use several message bundles within my application.  I pass the bundle into
the tile.

Is it legal to pass in the name of the bundle to the tile.
What happens is somehow the first bundle that is written to is used for all
calls into the tile.  It doesn't use the current bundle definition.  So,
throughout my application I have columns named ???xxxxx.yyy??? whatever the
name
of the column is because it couldn't find it in the bundle of the first
caller.

Any suggestions
Thanks

<tile:insert page='/com/mbresearch/main/tile/column.jsp'>
  <!-- The action target -->
  <tile:put name='target' value='/APPLICATION.do'/>
  <!-- The name of the Resource Bundle -->
  <tile:put name='bundle' value='APPLICATION'/>
  <!-- The name of the resource element to get from the bundle -->
  <tile:put name='column' value='name.column'/>
  <!-- The name of the sortBy field -->
  <tile:put name='sortBy' value='${form.sortBy}'/>
</tile:insert>

Inside the tile I do

<tile:importAttribute name='bundle'/>
<head>
    <fmt:setLocale value='en'/>
    <fmt:setBundle basename='${bundle}'/>

<tile:importAttribute name='target'/>
<tile:importAttribute name='column'/>
<tile:importAttribute name='sortBy'/>

    <td class="column" nowrap>
    <c:url var='sortName' value='${target}'>
        <c:param name='topic' value='sort'/>
        <c:param name='sortBy' value='${sortBy}'/>
        <c:param name='sortOrder' value='false'/>
    </c:url>

    <html-el:link href='${sortName}'>

        <!-- WRITE THE NAME OF THE COLUMN FROM THE BUNDLE -->
        <fmt:message key="${column}"/>

        <html:img page="/images/UArrow.jpg" border="0" align="middle"/>
    </html-el:link>
    </td>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to