Optimizing object size - TheOpenCloudEngine/metaworks GitHub Wiki
showDetails μ°Έκ³ κ°μΈ InstaceMonitorPanel μμ μ»κ³ μ νλ μΈλΆμ μΈ κ°μ instanceId λΏμ΄κΈ° λλ¬Έμ μ΄λ₯Ό Autowire ν΄μ κ°μ Έμ¬ λ, InstaceMonitorPanel λ΄μ instanceId μ κ°λ§ μ±μμ μλ²λ‘ κ°μ Έμ¨λ€.
package com.abc.activitytype.view;
public class DataInputActivityView extends ActivityView {
@ServiceMethod(inContextMenu = true, target = ServiceMethod.TARGET_POPUP)//, where = "running")
public void showDetails(
@AutowiredFromClient(payload="instanceId") InstanceMonitorPanel instanceMonitorPanel,
@Payload("element")IElement element){
MetaworksRemoteService.wrapReturn(new ModalWindow(new Label("detail for " + getElement().getName() + " and the instanceId is " + instanceMonitorPanel.getInstanceId()), "title"));
}
}
μμ λ Canvas λ΄μ ν¬ν¨λ Role μ μμ μ΄λ¦λ§μ μ°Έκ³ ν΄μ€κΈ° μν Selector μ΄λ€. λ°λΌμ μ 체 Canvas μ μμ£Ό μΌλΆ κ°λ§μ μλ²λ‘ μ°Έκ³ ν΄ μ€λ κ²μ΄ ν¨μ¨μ μ΄λ€. Canvas μ λ΄μ©μ κ°μ Έμ¬λ (Canvas λ μμ£Ό 무κ²κ³ ν° λ°μ΄ν°λ₯Ό κ°κ³ μλ€) Canvasμ νλ‘νΌν°μΈ elementViewList Array (νΉμ List) κ° μ€μμ classκ° RoleView μΈκ²λ§ κ°μ Έμ€λλ°, κ·Έμ€μμλ κ°μ Έμ¨ RoleView κ°μ²΄μ element.name λ§ μ±μμ μλ²λ‘ 보λΈλ€.
package org.uengine.kernel.face;
public class RoleSelectorFace extends SelectBox implements Face <Role>{
@AutowiredFromClient(
payload = "elementViewList[__className=='org.uengine.kernel.view.RoleView'].element.name"
)
public Canvas canvas;
...
@ServiceMethod(inContextMenu = true)
public void loadOptions(@Payload("selected") String selected){
setValueToFace(Role.forName(selected));
}
}
public Object showProperty(@AutowiredFromClient(payload = {"id", "elementViewList[true].element.name"})
Canvas canvas
)
@AutowiredFromClient(
payload = "elementViewList[__className=='com.abc.activitytype.view.DataInputActivityView' && toEdge==value.fromEdge].element.outValue.name"
) Canvas canvas,
νΉμ
@AutowiredFromClient(
payload = "elementViewList[value.fromEdge.indexOf(toEdge) > -1].element"
) Canvas canvas,