こんにちは、コードを使用して単純なコントローラー クラスを作成しています
public class OMTime1 {
public String xx { get; set; }
public PageReference continue1(){
String url='/apex/OneMoreTime?id='+ApexPages.currentPage().getParameters().get('id')+'&process='+xx;
PageReference page=new PageReference(url);
page.setRedirect(true);
return page;
}
}
コード付きのシンプルな VF ページ
<apex:page controller="OMTime1" >
<!-- Begin Default Content REMOVE THIS -->
<!-- End Default Content REMOVE THIS -->
<apex:form >
<apex:selectList id="chooseColor" value="{!xx}" size="1">
<apex:selectOption itemValue="1" itemLabel="Terminate Resource"/>
<apex:selectOption itemValue="2"
itemLabel="Change Resource Position at Same Location"/>
<apex:selectOption itemValue="3" itemLabel="Change Resource Position with in same Location "/>
<apex:selectOption itemValue="4" itemLabel="Change Resource Position to a Different Location"/>
</apex:selectList>
</apex:form>
<apex:form >
<apex:commandButton value="Continue" action="{!continue1}" id="theButton"/>
</apex:form>
</apex:page>
ユーザーが [続行] ページとしてボタン名をクリックすると、私のタスクは URL /apex/OneMoreTime?id=record_id&process=some_value some_value=1,2,3, or 4 にリダイレクトされますが、ボタンをクリックすると /apex/ にリダイレクトされますOneMoreTime?id=record_id&process=null
なぜこの null がパラメーターに入ってくるのか、選択オプションのラベルに関連する値をリダイレクトしたいのですが、解決方法を提案してください