Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple arithmetic to Qute expressions #25824

Closed
rvansa opened this issue May 27, 2022 · 2 comments · Fixed by #27079
Closed

Add simple arithmetic to Qute expressions #25824

rvansa opened this issue May 27, 2022 · 2 comments · Fixed by #27079
Assignees
Labels
area/qute The template engine kind/enhancement New feature or request
Milestone

Comments

@rvansa
Copy link
Contributor

rvansa commented May 27, 2022

Description

Currently simple arithmetic doesn't work in Qute templating: I have used ... {datasetOrdinal + 1 } ... and received an exception:

io.quarkus.qute.TemplateException: Method "+(1)" not found on the base object "java.lang.Integer" in expression {datasetOrdinal.+(1)} in template

I am not sure why I assumed this would work but it would be definitely nice.

Implementation ideas

No response

@rvansa rvansa added the kind/enhancement New feature or request label May 27, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented May 27, 2022

/cc @mkouba

@quarkus-bot quarkus-bot bot added the area/qute The template engine label May 27, 2022
@mkouba
Copy link
Contributor

mkouba commented May 31, 2022

This is definitely doable and I have a branch with POC that implements simple arithmetic operations: https://github.com/mkouba/quarkus/tree/qute-additive-operators

@mkouba mkouba added this to the 2.10 - main milestone May 31, 2022
@mkouba mkouba self-assigned this May 31, 2022
@gsmet gsmet removed this from the 2.10.0.CR1 milestone Jun 9, 2022
mkouba added a commit to mkouba/quarkus that referenced this issue Aug 2, 2022
@quarkus-bot quarkus-bot bot added this to the 2.12 - main milestone Aug 3, 2022
miador pushed a commit to miador/quarkus that referenced this issue Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants