I'm deploying my little website on glassfish and I have a 2 method what runs a python file. Methon one is just runs the python file nothing more. When I access to a site it automatically call all the functions...
public void reservate() {
System.out.println("ALMAAA");
String start, end;
start = time1.substring(0,5);
end = time1.substring(6,11);
reserv = new Reservation("ASD", room, "19.00", "20.00");
reserv.getOutput();
}
<p:commandLink value="#{navigationTo.time1button}" onclick="#{navigationTo.reservate()}" style="font-size: 300%"/>
The reserv.getOutput() triggers the file and runs the python file. If I just access to this site even if i dont click on this actionlink it triggers everyting and it made the reservation...
I want to only run this python file if I click the commadnLink.
Any suggestion?