本文整理汇总了Java中org.kuali.rice.kns.web.struts.form.KualiForm.getTabStates方法的典型用法代码示例。如果您正苦于以下问题:Java KualiForm.getTabStates方法的具体用法?Java KualiForm.getTabStates怎么用?Java KualiForm.getTabStates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kns.web.struts.form.KualiForm
的用法示例。
在下文中一共展示了KualiForm.getTabStates方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doTabOpenOrClose
import org.kuali.rice.kns.web.struts.form.KualiForm; //导入方法依赖的package包/类
/**
*
* Toggles all tabs to open of closed depending on the boolean flag.
*
* @param mapping the mapping
* @param form the form
* @param request the request
* @param response the response
* @param open whether to open of close the tabs
* @return the action forward
*/
private ActionForward doTabOpenOrClose(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, boolean open) {
KualiForm kualiForm = (KualiForm) form;
Map<String, String> tabStates = kualiForm.getTabStates();
Map<String, String> newTabStates = new HashMap<String, String>();
for (String tabKey: tabStates.keySet()) {
newTabStates.put(tabKey, open ? "OPEN" : "CLOSE");
}
kualiForm.setTabStates(newTabStates);
doProcessingAfterPost( kualiForm, request );
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
示例2: showAllAccounts
import org.kuali.rice.kns.web.struts.form.KualiForm; //导入方法依赖的package包/类
/**
* Toggles all specific tabs to open
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward showAllAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiForm kualiForm = (KualiForm) form;
String accountingLineTab = "AccountingLines";
String value = null;
Map<String, String> tabStates = kualiForm.getTabStates();
Map<String, String> newTabStates = new HashMap<String, String>();
for (Entry<String, String> tabEntry : tabStates.entrySet()) {
if (tabEntry.getKey().startsWith(accountingLineTab)) {
newTabStates.put(tabEntry.getKey(), "OPEN");
} else {
if (tabEntry.getValue() instanceof String) {
value = tabEntry.getValue();
} else {
//This is the case where the value is an Array of String,
//so we'll have to get the first element
Object result = tabEntry.getValue();
result.getClass();
value = ((String[]) result)[0];
}
newTabStates.put(tabEntry.getKey(), value);
}
}
kualiForm.setTabStates(newTabStates);
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
示例3: hideAllAccounts
import org.kuali.rice.kns.web.struts.form.KualiForm; //导入方法依赖的package包/类
/**
* Toggles all specific tabs to closed
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward hideAllAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiForm kualiForm = (KualiForm) form;
String accountingLineTab = "AccountingLines";
String value = null;
Map<String, String> tabStates = kualiForm.getTabStates();
Map<String, String> newTabStates = new HashMap<String, String>();
for (Entry<String, String> tabEntry : tabStates.entrySet()) {
if (tabEntry.getKey().startsWith(accountingLineTab)) {
newTabStates.put(tabEntry.getKey(), "CLOSE");
} else {
if (tabEntry.getValue() instanceof String) {
value = tabEntry.getValue();
} else {
//This is the case where the value is an Array of String,
//so we'll have to get the first element
Object result = tabEntry.getValue();
result.getClass();
value = ((String[]) result)[0];
}
newTabStates.put(tabEntry.getKey(), value);
}
}
kualiForm.setTabStates(newTabStates);
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
示例4: showAllAccounts
import org.kuali.rice.kns.web.struts.form.KualiForm; //导入方法依赖的package包/类
/**
* Toggles all specific tabs to open
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward showAllAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiForm kualiForm = (KualiForm) form;
String accountingLineTab = "AccountingLines";
String value = null;
Map<String, String> tabStates = kualiForm.getTabStates();
Map<String, String> newTabStates = new HashMap<String, String>();
for (Entry<String, String> tabEntry: tabStates.entrySet()) {
if(tabEntry.getKey().startsWith(accountingLineTab)){
newTabStates.put(tabEntry.getKey(), "OPEN");
}else{
if (tabEntry.getValue() instanceof String) {
value = tabEntry.getValue();
}
else {
//This is the case where the value is an Array of String,
//so we'll have to get the first element
Object result = tabEntry.getValue();
result.getClass();
value = ((String[])result)[0];
}
newTabStates.put(tabEntry.getKey(), value);
}
}
kualiForm.setTabStates(newTabStates);
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
示例5: hideAllAccounts
import org.kuali.rice.kns.web.struts.form.KualiForm; //导入方法依赖的package包/类
/**
* Toggles all specific tabs to closed
*
* @param mapping
* @param form
* @param request
* @param response
* @return
* @throws Exception
*/
public ActionForward hideAllAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiForm kualiForm = (KualiForm) form;
String accountingLineTab = "AccountingLines";
String value = null;
Map<String, String> tabStates = kualiForm.getTabStates();
Map<String, String> newTabStates = new HashMap<String, String>();
for (Entry<String, String> tabEntry: tabStates.entrySet()) {
if(tabEntry.getKey().startsWith(accountingLineTab)){
newTabStates.put(tabEntry.getKey(), "CLOSE");
}else{
if (tabEntry.getValue() instanceof String) {
value = tabEntry.getValue();
}
else {
//This is the case where the value is an Array of String,
//so we'll have to get the first element
Object result = tabEntry.getValue();
result.getClass();
value = ((String[])result)[0];
}
newTabStates.put(tabEntry.getKey(), value);
}
}
kualiForm.setTabStates(newTabStates);
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
示例6: setTabStatesForCapitalAssets
import org.kuali.rice.kns.web.struts.form.KualiForm; //导入方法依赖的package包/类
/**
* sets the capital assets screens for create and modify and accounting lines
* for capitalization screen as open. If accounting lines for capitalizataion list is
* not empty then set "Accounting Lines for Capitalization" tab to open else set to close.
* If capital asset with capital asset action indicator = 'C' then set "Create Capital Asset"
* tab to open else set to close
* If capital asset with capital asset action indicator = 'M' then set "Modify Capital Asset"
* tab to open else set to close
*
* @param form
*/
protected void setTabStatesForCapitalAssets(ActionForm form) {
KualiForm kualiForm = (KualiForm) form;
CapitalAccountingLinesFormBase capitalAccountingLinesFormBase = (CapitalAccountingLinesFormBase) form;
Map<String, String> tabStates = kualiForm.getTabStates();
Map<String, String> newTabStates = new HashMap<String, String>();
CapitalAssetInformationFormBase capitalAssetInformationFormBase = (CapitalAssetInformationFormBase) form;
CapitalAccountingLinesDocumentBase caldb = (CapitalAccountingLinesDocumentBase) capitalAssetInformationFormBase.getFinancialDocument();
//generated tab key for the three tabs
String tabIdForAccountingLinesForCapitalization = WebUtils.generateTabKey(OLEConstants.CapitalAssets.ACCOUNTING_LINES_FOR_CAPITALIZATION_TAB_TITLE);
String tabIdForCreateCapitalAsset = WebUtils.generateTabKey(OLEConstants.CapitalAssets.CREATE_CAPITAL_ASSETS_TAB_TITLE);
String tabIdForModifyCapitalAsset = WebUtils.generateTabKey(OLEConstants.CapitalAssets.MODIFY_CAPITAL_ASSETS_TAB_TITLE);
tabStates.remove(tabIdForAccountingLinesForCapitalization);
tabStates.remove(tabIdForCreateCapitalAsset);
tabStates.remove(tabIdForModifyCapitalAsset);
//if there are any capital accounting lines for capitalization exists then
if (caldb.getCapitalAccountingLines().size() > 0) {
tabStates.put(tabIdForAccountingLinesForCapitalization, OLEConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_OPEN);
}
else {
tabStates.put(tabIdForAccountingLinesForCapitalization, OLEConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_CLOSE);
}
if (checkCreateAssetsExist(capitalAccountingLinesFormBase)) {
tabStates.put(tabIdForCreateCapitalAsset, OLEConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_OPEN);
}
else {
tabStates.put(tabIdForCreateCapitalAsset, OLEConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_CLOSE);
}
if (checkModifyAssetsExist(capitalAccountingLinesFormBase)) {
tabStates.put(tabIdForModifyCapitalAsset, OLEConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_OPEN);
}
else {
tabStates.put(tabIdForModifyCapitalAsset, OLEConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_CLOSE);
}
kualiForm.setTabStates(tabStates);
}
示例7: setTabStatesForCapitalAssets
import org.kuali.rice.kns.web.struts.form.KualiForm; //导入方法依赖的package包/类
/**
* sets the capital assets screens for create and modify and accounting lines
* for capitalization screen as open. If accounting lines for capitalizataion list is
* not empty then set "Accounting Lines for Capitalization" tab to open else set to close.
* If capital asset with capital asset action indicator = 'C' then set "Create Capital Asset"
* tab to open else set to close
* If capital asset with capital asset action indicator = 'M' then set "Modify Capital Asset"
* tab to open else set to close
*
* @param form
*/
protected void setTabStatesForCapitalAssets(ActionForm form) {
KualiForm kualiForm = (KualiForm) form;
CapitalAccountingLinesFormBase capitalAccountingLinesFormBase = (CapitalAccountingLinesFormBase) form;
Map<String, String> tabStates = kualiForm.getTabStates();
Map<String, String> newTabStates = new HashMap<String, String>();
CapitalAssetInformationFormBase capitalAssetInformationFormBase = (CapitalAssetInformationFormBase) form;
CapitalAccountingLinesDocumentBase caldb = (CapitalAccountingLinesDocumentBase) capitalAssetInformationFormBase.getFinancialDocument();
//generated tab key for the three tabs
String tabIdForAccountingLinesForCapitalization = WebUtils.generateTabKey(KFSConstants.CapitalAssets.ACCOUNTING_LINES_FOR_CAPITALIZATION_TAB_TITLE);
String tabIdForCreateCapitalAsset = WebUtils.generateTabKey(KFSConstants.CapitalAssets.CREATE_CAPITAL_ASSETS_TAB_TITLE);
String tabIdForModifyCapitalAsset = WebUtils.generateTabKey(KFSConstants.CapitalAssets.MODIFY_CAPITAL_ASSETS_TAB_TITLE);
tabStates.remove(tabIdForAccountingLinesForCapitalization);
tabStates.remove(tabIdForCreateCapitalAsset);
tabStates.remove(tabIdForModifyCapitalAsset);
//if there are any capital accounting lines for capitalization exists then
if (caldb.getCapitalAccountingLines().size() > 0 || caldb.isCapitalAccountingLinesExist()) {
tabStates.put(tabIdForAccountingLinesForCapitalization, KFSConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_OPEN);
}
else {
tabStates.put(tabIdForAccountingLinesForCapitalization, KFSConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_CLOSE);
}
if (checkCreateAssetsExist(capitalAccountingLinesFormBase)) {
tabStates.put(tabIdForCreateCapitalAsset, KFSConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_OPEN);
}
else {
tabStates.put(tabIdForCreateCapitalAsset, KFSConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_CLOSE);
}
if (checkModifyAssetsExist(capitalAccountingLinesFormBase)) {
tabStates.put(tabIdForModifyCapitalAsset, KFSConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_OPEN);
}
else {
tabStates.put(tabIdForModifyCapitalAsset, KFSConstants.CapitalAssets.CAPITAL_ASSET_TAB_STATE_CLOSE);
}
kualiForm.setTabStates(tabStates);
}