[MAGNOLIA-2993] Extract logic out of taglibs - reusability, testability, ... Created: 07/Jan/10 Updated: 20/Apr/17 Resolved: 13/Oct/12 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | taglibs, templating |
| Affects Version/s: | None |
| Fix Version/s: | 4.5 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Jan Haderka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||||||||||||||
| Description |
|
Some of our tags are extremely complex; testing them, fixing them, has become very tedious. Many of them have fuzzy logic that isn't well defined. Extracting this will also allow us to reuse them in Freemarker templates (amongst others) without depending on the taglib itself; a macro library or ${mgnl} methods might provide a simpler/cleaner/lighter syntax. |
| Comments |
| Comment by Magnolia International [ 08/Jan/10 ] |
|
We should also extract the "snippets" logic that was duplicated in stk (see |
| Comment by Fabrizio Giustina [ 31/Jan/10 ] |
|
just a note if anybody will start this: be very careful with tag pooling, according to jsp specification you should never change the value of any field set using a tag attribute, since the container is not forced to reset them. For example if you have two tags in page: the setAttribute(value) method will be called only the first time, while for the second tag the container expects that the attribute is already set by reusing the previous tag instance. If we extract tags in helper classes me must pay attention to this. |
| Comment by Magnolia International [ 08/Feb/10 ] |
|
I thought the "new" JSP 2.0 SimpleTag interfaces/classes got rid of all the lifecycle/pooling cruft; one tag in the jsp=one instance of the tag class. Isn't that the case ? |
| Comment by Magnolia International [ 08/Feb/10 ] |
|
See current draft/concept at http://wiki.magnolia-cms.com/display/DEV/Concept+taglib+cleanup%2C+extraction%2C+rewrite |
| Comment by Magnolia International [ 22/Mar/10 ] |
Status in 4.3
Still to do
|
| Comment by Jan Haderka [ 13/Oct/12 ] |
|
Fixed in 4.5 when rewriting templating engine. |