|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.co.fujitsu.reffi.client.nexaweb.model.BaseModel
jp.co.fujitsu.reffi.client.nexaweb.model.XalReturnPossibilityModel
public abstract class XalReturnPossibilityModel
[概 要]
処理の結果、新規xalを画面挿入する可能性の有るモデルが継承するクラスです。[詳 細]
xalを画面にレンダリングした後、、ウィンドウ識別を容易にする為の機能を提供します。addIdentifierToWindows(Document)
を呼び出すことによって、[備 考]
parentId、communicateIdについてはaddIdentifierToWindows(Document)
を参照して下さい。
使用例)
・同じxalを複数読み込むが、読み込んだ後にユニークに特定する
public class MapXalFetchAction extends BaseAction { @Override protected void reserveModels(List結果、ui Documentには以下のように挿入され、communicateIdで同一xalがユニーク識別可能になります。> models) { models.add(HTTPRequestCore.class); } @Override public boolean nextModel(int index, ModelProcessEvent prev, Model next) throws Exception { switch(index){ case 0: // 都道府県選択コンボボックスから選択中の都道府県を取得 String prefecture = getElementValueByName("comboPrefecture").getElementValue(0).getValue(); // *サーバロジックは任意 ((HTTPRequestCore)next).setRequestUrl("webcontroller"); ((HTTPRequestCore)next).addUrlParameters("forward.page", "/pages/map.xal"); // 取得予定のxal内ウィンドウcommunicateIdに都道府県名を設定 ((HTTPRequestCore)next).setCommunicateId(prefecture); break; } return true; } }
<ui> <window name="map" communicateId="hokkaido"> : </window> <window name="map" communicateId="tokyo"> : </window> </ui>
[環 境] JDK 6.0 Update 11
Copyright (c) 2008-2009 FUJITSU Japan All rights reserved.
コンストラクタの概要 | |
---|---|
XalReturnPossibilityModel()
|
メソッドの概要 | |
---|---|
protected Vector<Element> |
addIdentifierToWindows(Document document)
[概 要] 通信の結果取得したウィンドウレベルエレメントに識別子parentId、communicateIdを付与します。 |
String |
getCommunicateId()
[概 要] 通信識別IDを取得します。 |
Element |
getEventSourceWindow()
[概 要] このモデルを起動したコンポーネントが属するウィンドウレベルエレメントを返却します。 |
protected void |
mainproc()
[概 要] 主処理です。 |
void |
setCommunicateId(String communicateId)
[概 要] 通信識別IDを設定します。 |
void |
setEventSourceWindow(Element eventSourceWindow)
[概 要] このモデルを起動したコンポーネントが属するウィンドウレベルエレメントを設定します。 |
クラス jp.co.fujitsu.reffi.client.nexaweb.model.BaseModel から継承されたメソッド |
---|
addModelProcessListener, finalproc, fireModelFailure, fireModelFinished, fireModelSuccess, getController, getExecuteIndex, getListenerList, getParameterMapping, getResult, getSuccessCount, incrementSuccessCount, isSkip, postproc, preproc, removeModelProcessListener, run, setController, setExecuteIndex, setListenerList, setParameterMapping, setResult, setSkip, trap |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public XalReturnPossibilityModel()
メソッドの詳細 |
---|
public Element getEventSourceWindow()
[概 要]
このモデルを起動したコンポーネントが属するウィンドウレベルエレメントを返却します。[詳 細]
eventSourceWindowフィールド値を返却します。[備 考]
public void setEventSourceWindow(Element eventSourceWindow)
[概 要]
このモデルを起動したコンポーネントが属するウィンドウレベルエレメントを設定します。[詳 細]
eventSourceWindowフィールド値を、引数eventSourceWindowで設定します。[備 考]
eventSourceWindow
- このモデルを起動したコンポーネントが属するウィンドウレベルエレメントpublic String getCommunicateId()
[概 要]
通信識別IDを取得します。[詳 細]
communicateIdフィールド値を返却します。[備 考]
setCommunicateId(String)
によって任意設定されていない場合、
public void setCommunicateId(String communicateId)
[概 要]
通信識別IDを設定します。[詳 細]
communicateIdフィールド値を、引数communicateIdで設定します。[備 考]
communicateId
- 通信識別IDprotected void mainproc() throws Exception
[概 要]
主処理です。[詳 細]
アクションから譲渡された、イベント発生元ウィンドウレベルエレメントを、 フィールドに保存します。[備 考]
保存されたイベント発生元ウィンドウレベルエレメントのid属性値が、 新たに取得したウィンドウレベルエレメントのparentId属性値として設定されます。
BaseModel
内の mainproc
Exception
- オーバーライド先で発生する可能性が有る例外protected Vector<Element> addIdentifierToWindows(Document document)
[概 要]
通信の結果取得したウィンドウレベルエレメントに識別子parentId、communicateIdを付与します。[詳 細]
引数Documentに含まれる、window、dialogエレメントを取得し、 privateオーバーロードメソッドに処理委譲します。[備 考]
「parentId」について
通信の結果新しく取得したウィンドウレベルエレメントの親を識別する為のIDです。
「親」はDOM構造的な親では無く、画面の発生元を表します。
Aウィンドウ内アクション発生 → XalReturnPossibilityModel通信発生、の結果として
Bウィンドウが画面表示された場合、
Aウィンドウ(id="123")はBウィンドウ(id="456", parentId="123")の親となります。
「communicateId」について
1通信を識別する為のIDです。
同じ画面(同じxal)が複数クライアント上に存在するような場合にA.xalとA´.xalを
識別する為に使用します。
<ui> // A通信の結果取得したA.xal <window name="abc" id="nx-12345" communicateId="com_A"> <button name="btn"> </window> // B通信の結果取得したA.xal <window name="abc" id="nx-67890" communicateId="com_B"> <button name="btn"> </window> </ui>上記の場合、abcウィンドウはcommunicateIdを判断することによってユニークに 識別出来ます。
document
- 通信の結果取得したXML Document
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |