This file contains 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
@Alternative | |
public class ImplementerA implements ImplementerIntf{ | |
@Override | |
public String showImplementer() { | |
return this.getClass().getName(); | |
} | |
} |
This file contains 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
<beans xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"> | |
<alternatives> | |
<class>com.incept.cdialternative.ImplementerC</class> | |
</alternatives> | |
</beans> |
This file contains 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
@Named | |
@RequestScoped | |
public class IndexBean implements Serializable { | |
@Inject | |
ImplementerIntf obj; |
This file contains 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
<h:outputText style="color: blue; font-weight: bold" value="flash.i1= "/> | |
<h:inputText id="i1" label="Input1: " value="#{flash.i1}"></h:inputText> |
This file contains 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
<c:set target="#{flash}" property="i2" value="Incept"></c:set> |
This file contains 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
<h:outputText value="#{flash['i1']}"></h:outputText> | |
<h:outputText value="#{flash.keep.i2}"></h:outputText> |
This file contains 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 String someViewAction() { | |
System.out.println("flashExampleBean.someViewAction called"); | |
Flash fl = FacesContext.getCurrentInstance().getExternalContext().getFlash(); | |
Set flSet = fl.keySet(); | |
System.out.println("FL set size = " + flSet.size() | |
+ ", i1 value=" + fl.get("i1") | |
+ ", i2 value=" + fl.get("i2") | |
+ ", i3 value=" + fl.get("i3")); | |
return "index_1"; |
This file contains 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
private void initializeTable() { | |
personViewIdCol.setCellValueFactory(new PropertyValueFactory<Person, String>("Id")); | |
id.setGraphic(upImg); | |
personViewIdCol.setGraphic(id); | |
personViewIdCol.setSortable(false); | |
personViewNameCol.setCellValueFactory(new PropertyValueFactory<Person, String>("Name")); | |
personViewNameCol.sortTypeProperty().addListener(new ChangeListener<SortType>() { | |
@Override | |
public void changed(ObservableValue<? extends SortType> paramObservableValue, SortType paramT1, SortType paramT2) { | |
System.out.println("NAME Clicked -- sortType = " + paramT1 + ", SortType=" + paramT2); |
This file contains 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 void initialize(URL url, ResourceBundle rb) { | |
System.out.println("initialize"); | |
sort(); | |
initializeTable(); | |
pageCount = getPageCount(persons.size(), itemsPerPage); | |
System.out.println("pageCount=" + pageCount); | |
pagination.setPageCount(pageCount); | |
pagination.currentPageIndexProperty().addListener(new ChangeListener<Number>() { |
This file contains 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
private void sort() { | |
//persons.sort((Person p1, Person p2) -> p1.id.compareTo(p2.id)); | |
Collections.sort(persons, new Comparator<Person>() { | |
@Override | |
public int compare(Person t, Person t1) { | |
System.out.println(" comparator called"); | |
return t.getId().compareTo(t1.getId()); | |
} | |
}); | |
} |
OlderNewer