Last active
June 17, 2016 01:31
-
-
Save brito/fa5fcdfb70de9f8fe1b5794f0ab43f5f to your computer and use it in GitHub Desktop.
MAF or ADF reusable scope POJO class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<panelFormLayout xmlns:amx="http://xmlns.oracle.com/adf/mf/amx"> | |
<inputText label="key" value="#{scope.key}"/> | |
<inputText label="value" value="#{scope.value}"/> | |
<commandButton text="Update" actionListener="#{scope.update}"/> | |
</panelFormLayout> | |
<iterator var="key" value="#{scope.properties.keySet}"> | |
<iterator var="properties" value="#{scope.properties.valMap}"> | |
<inputText label="#{key}" value="#{properties[key]}" changeListener="#{scope.update}"/> | |
</iterator> | |
</iterator> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Scope { | |
private Map<Object, Object> properties = (new HashMap<>(){{ | |
// initialize: put(1, "A"); | |
}}) | |
.forEach( (key, value) -> | |
// emit: somefunction(key, value) | |
); | |
private RichInputText key; | |
private RichInputText value; | |
public void setKey(RichInputValue key){ this.key = key; } | |
public RichInputValue getKey(){ return key; } | |
public void setValue(RichInputValue value){ this.value = value; } | |
public RichInputText getValue(){ return value; } | |
public void update(ActionEvent action){ | |
properties.put(key.getValue(), value.getValue()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment