-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: respect basePath in @CheckedTemplate to find templates
Signed-off-by: Fred Bricon <[email protected]>
- Loading branch information
Showing
13 changed files
with
316 additions
and
59 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...cts/maven/qute-quickstart/src/main/java/org/acme/qute/ItemResourceWithCustomBasePath.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.acme.qute; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
import io.quarkus.qute.CheckedTemplate; | ||
import io.quarkus.qute.TemplateExtension; | ||
import io.quarkus.qute.TemplateInstance; | ||
|
||
@Path("items3") | ||
public class ItemResourceWithCustomBasePath { | ||
|
||
@CheckedTemplate(basePath="ItemResourceWithFragment") | ||
static class Templates { | ||
static native TemplateInstance items(List<Item> items); | ||
static native TemplateInstance items$id1(List<Item> items); | ||
static native TemplateInstance items3$id2(List<Item> items); | ||
static native TemplateInstance items3$(List<Item> items); | ||
} | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_HTML) | ||
public TemplateInstance get() { | ||
List<Item> items = new ArrayList<>(); | ||
items.add(new Item(new BigDecimal(10), "Apple")); | ||
items.add(new Item(new BigDecimal(16), "Pear")); | ||
items.add(new Item(new BigDecimal(30), "Orange")); | ||
return Templates.items(items); | ||
} | ||
|
||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...ojects/maven/qute-quickstart/src/main/java/org/acme/qute/ItemTemplatesCustomBasePath.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.acme.qute; | ||
|
||
import java.util.List; | ||
import io.quarkus.qute.CheckedTemplate; | ||
import io.quarkus.qute.TemplateInstance; | ||
|
||
@CheckedTemplate(basePath="ItemResourceWithFragment") | ||
public class ItemTemplatesCustomBasePath { | ||
|
||
static native TemplateInstance items(List<Item> items); | ||
static native TemplateInstance items$id1(List<Item> items); | ||
static native TemplateInstance items3$id2(List<Item> items); | ||
static native TemplateInstance items3$(List<Item> items); | ||
|
||
} |
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
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
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
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
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
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
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
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
Oops, something went wrong.