' .•` KIΛ.RΛR ’•. '
' .•` KIΛ.RΛR ’•. '
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
wait terminal still says 17?`
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
also doesnt work
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
No description
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
No description
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
oki i will try
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
found onlione that its mostly a compatibility issue
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
No description
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
hmhm oki, i have gradel 6.2 selected
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 9/19/2024 in #java-help
Gradle & Java Version
No description
18 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/29/2023 in #java-help
springframework.validation.BindException: Date
yeah ik but i dont know how to change it since thymeleaf does its shit wjho knows where in the background
21 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/29/2023 in #java-help
springframework.validation.BindException: Date
yes?
21 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/29/2023 in #java-help
springframework.validation.BindException: Date
dafuq the datepicker shows a different date then its value?
21 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/29/2023 in #java-help
springframework.validation.BindException: Date
No description
21 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/29/2023 in #java-help
springframework.validation.BindException: Date
an welcher stelle O.o problem ist spring sagt das sobald ich das sobald ich nen datum gesetzt hab:
Field error in object 'reservationForm' on field 'date': rejected value [13/11/2023 12:32]; codes [typeMismatch.reservationForm.date,typeMismatch.date,typeMismatch.java.time.LocalDateTime,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [reservationForm.date,date]; arguments []; default message [date]]; default message [Failed to convert value of type 'java.lang.String[]' to required type 'java.time.LocalDateTime'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@org.springframework.format.annotation.DateTimeFormat java.time.LocalDateTime] for value '13/11/2023 12:32'; nested exception is java.lang.IllegalArgumentException: Parse attempt failed for value [13/11/2023 12:32]]]
Field error in object 'reservationForm' on field 'date': rejected value [13/11/2023 12:32]; codes [typeMismatch.reservationForm.date,typeMismatch.date,typeMismatch.java.time.LocalDateTime,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [reservationForm.date,date]; arguments []; default message [date]]; default message [Failed to convert value of type 'java.lang.String[]' to required type 'java.time.LocalDateTime'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@org.springframework.format.annotation.DateTimeFormat java.time.LocalDateTime] for value '13/11/2023 12:32'; nested exception is java.lang.IllegalArgumentException: Parse attempt failed for value [13/11/2023 12:32]]]
ich komm im java nciht mla zu irgendeinem print in der mapping oder der setter methode ;-; in der url hab ich als wert das ausgewählte datum als paramter wies sein soll ;-; nur ist die seite halt put dann
http://localhost:8080/welcome?date=13%2F11%2F2023+12%3A34
http://localhost:8080/welcome?date=13%2F11%2F2023+12%3A34
21 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/29/2023 in #java-help
springframework.validation.BindException: Date
like in the javascript function it always prints the current date, even when i change the date in the picker it wont change anything =.=
21 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/29/2023 in #java-help
springframework.validation.BindException: Date
public class ReservationForm {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime date;

public ReservationForm(LocalDateTime date) {
this.date = LocalDateTime.now();
}

public LocalDateTime getDate() {
return date;
}

public void setDate(LocalDateTime date) {
this.date = date;
}

}
public class ReservationForm {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime date;

public ReservationForm(LocalDateTime date) {
this.date = LocalDateTime.now();
}

public LocalDateTime getDate() {
return date;
}

public void setDate(LocalDateTime date) {
this.date = date;
}

}
what i want: datepicker sends ajax request on changing the date to reload the displayed data, but when i change the date an error is thrown. demo project to showcase my problem: https://github.com/DragonCat4012/web-thymeleaf
21 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/29/2023 in #java-help
springframework.validation.BindException: Date
<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<title>Spring Boot Thymeleaf Hello World Example</title>
<link rel="stylesheet" th:href="@{webjars/bootstrap/4.2.1/css/bootstrap.min.css}" />
<link rel="stylesheet" th:href="@{/css/main.css}" />

</head>
<body>
<form th:object="${form}">
<div>
<label for="reservation-date"></label>
<input class="formContent" type="datetime-local" th:field="*{date}"
th:onchange="reloadAlleyOptions(this.getAttribute('data-date'))" th:data-date="*{date}" />
</div>

<button type="submit"></button>

</form>
</body>

<script src="https://code.jquery.com/jquery-3.7.1.min.js"
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>

<script>
$(document).bind("ajaxSend", function () {
console.log("waiting for all requests to complete...");
}).bind("ajaxStop", function () {
location.reload();
});

function reloadAlleyOptions(date) {
console.log(date)
console.log("---")
$.ajax({
method: "post",
type: "POST",
url: "/welcome/a?date=" + date,
success: function (response) {

},
error: function (e) {}
});
}
</script>

</html>
<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<title>Spring Boot Thymeleaf Hello World Example</title>
<link rel="stylesheet" th:href="@{webjars/bootstrap/4.2.1/css/bootstrap.min.css}" />
<link rel="stylesheet" th:href="@{/css/main.css}" />

</head>
<body>
<form th:object="${form}">
<div>
<label for="reservation-date"></label>
<input class="formContent" type="datetime-local" th:field="*{date}"
th:onchange="reloadAlleyOptions(this.getAttribute('data-date'))" th:data-date="*{date}" />
</div>

<button type="submit"></button>

</form>
</body>

<script src="https://code.jquery.com/jquery-3.7.1.min.js"
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>

<script>
$(document).bind("ajaxSend", function () {
console.log("waiting for all requests to complete...");
}).bind("ajaxStop", function () {
location.reload();
});

function reloadAlleyOptions(date) {
console.log(date)
console.log("---")
$.ajax({
method: "post",
type: "POST",
url: "/welcome/a?date=" + date,
success: function (response) {

},
error: function (e) {}
});
}
</script>

</html>
21 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/28/2023 in #java-help
Java Date Parsing from String with Timezone
yes it works ^^ thx
9 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/28/2023 in #java-help
Java Date Parsing from String with Timezone
thx!
9 replies
JCHJava Community | Help. Code. Learn.
Created by ' .•` KIΛ.RΛR ’•. ' on 11/25/2023 in #java-help
Thymeleaf Iteration with buttons, every button onclick gets called simultaniosly
ah oki thx!
43 replies