2017-11-01 10 views
0

optiontransferselectタグのボタン位置を再配置しようとしています。optiontransferselectタグのボタン位置

私がプログラムを実行すると、addToRightLabel="-> move to the right side"ボタンがaddToLeftLabel="<- move to the left side"ボタンの下にあることがわかりました。

addToLeftLabel="<- move to the left side"ボタンをaddToRightLabel="-> move to the right side"ボタンの下にしてみます。

ここにjspのコードがあります。

コードで
<s:optiontransferselect 
allowUpDownOnLeft="false" 
allowUpDownOnRight="false" 
allowSelectAll="false" 
allowAddAllToLeft="false" 
allowAddAllToRight="false" 

addToRightLabel="-> move to the right side" 
addToLeftLabel="<- move to the left side" 

leftTitle="Option values:" 
headerKey="0" 
name="option" 
list= "optionList" 
doubleId="selectedValues" 
doubleHeaderKey="0" 
rightTitle="Selected Values:" 
doubleList="selectedOptionList" doubleName="selectOption"> 
</s:optiontransferselect> 

、私は、私がプログラムを実行するとaddToLeftLabel="<- move to the left side"しかし、addToRightLabel="-> move to the right side"の下にすでに気付いaddToLeftLabel="<- move to the left side"

下記まだaddToRightLabel="-> move to the right side"私はこの2つのウェブサイトStruts 2 optiontransferselect exampleoptiontransferselectを訪問するが、私は得ることはありません問題を解決するためのアイデア。

最悪の場合、私はlist= "optionList"doubleList="selectedOptionList"の間の値を入れ替えることができると思っていますが、私はボタンの位置をどのように再配置するかについてより良い解決策を模索しています。

したがって、私の質問はoptiontransferselectタグ(addToLeftLabel="<- move to the left side"の下にaddToRightLabel="-> move to the right side"を入れてください)のボタン位置をどのように再配置するかです。

ありがとうございました。

+0

タグはフリーマーカでレンダリングされます。必要に応じてコードを変更できます。 –

答えて

0

私はstruts2コアのjarを使用しているので、Eclipseで開き、template.simpleに移動してoptiontransferselect.ftlを見つけます。ファイルを開いたら、<#if parameters.allowAddToRight?default(true)><#t/><#if parameters.allowAddToLeft?default(true)><#t/>の位置を入れ替えてください。

これは良い解決策ではありませんが、これで問題は解決します。

optiontransferselectの新しいftlファイルを作成し、私のケースに合うようにコードを書くことをお勧めします。このアクションは、新しいstruts2コアjarアップデートが変更されたコードを上書きしないようにすることです。