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
@TrType | |
@Produces | |
@Transporter tr; |
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
@Produces | |
@Greeting | |
public String getMessage() { |
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
<h:form id="formLogin" prependId="false" | |
onsubmit="document.getElementById('formLogin').action = 'j_security_check';"> | |
<h:panelGrid columns="2"> | |
<f:facet name="header"> | |
Login | |
</f:facet> | |
<h:outputLabel for="j_username" value="Username: "/> | |
<h:inputText id="j_username" required="true" /> |
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
@ServerEndpoint(value = "/notification") | |
public class NotificationEndPoint implements Serializable { | |
/** | |
* Message receiver method | |
* | |
* @param message | |
* @return | |
*/ |
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
<script type="text/javascript"> | |
var host = "ws://localhost:8080/JSFWebSockets/notification"; | |
var wSocket = new WebSocket(host); | |
var browserSupport = ("WebSocket" in window) ? true : false; | |
// called body onLoad() | |
function initializeReception() | |
{ | |
if (browserSupport) | |
{ |
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
<TableView fx:id="personView" layoutX="110.0" layoutY="71.0" prefHeight="136.0" prefWidth="334.0"> | |
<columns> | |
<TableColumn maxWidth="5000.0" minWidth="10.0" prefWidth="116.0" resizable="true" fx:id="personViewIdCol" /> | |
<TableColumn maxWidth="5000.0" minWidth="10.0" prefWidth="124.0" resizable="true" text="Name" fx:id="personViewNameCol" /> | |
<TableColumn maxWidth="5000.0" minWidth="10.0" prefWidth="93.0" resizable="true" text="Age" fx:id="personViewAgeCol" /> | |
</columns> | |
</TableView> | |
<HBox layoutX="131.0" layoutY="283.0" prefHeight="64.0" prefWidth="306.0" /> | |
<Label layoutX="91.0" layoutY="229.0" text="ID" /> | |
<TextField fx:id="idTxt" layoutX="110.0" layoutY="229.0" prefWidth="67.0" /> |
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
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()); | |
} | |
}); | |
} |
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 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 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
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); |
NewerOlder