Skip to content

Conversation

@jglick
Copy link
Member

@jglick jglick commented Feb 17, 2025

PoC for jenkinsci/jenkins#21523.

  • dynamically inject text into a page
  • conditionally include a block
  • repeat a block
  • inject text into attribute values
  • conditionally include attribute (such as checked)
  • inject well-formed HTML subtree
  • easy way to localize text (not just injecting a record field delegating to Messages)
  • render recursive structure
  • accept any POJO with the right methods in place of records, to permit lazy calculation
  • access a contextual variable (perhaps as an annotated method parameter)
  • include another HTML view
  • optional view include (dispatchable object is null)
  • optional view include (dispatchable object is not null but does not define view)
  • set some contextual variables on include
  • include a Jelly (or Groovy) view, defining it
  • be included from a Jelly (or Groovy) view
  • accept StaplerRequest and/or StaplerResponse from handler method
  • throw HttpResponseException from handler method
  • consume taglib
  • define taglib
  • view from nested class
  • view from a subtype implementing abstract parts of a supertype
  • supertype defines optional view, subtype may implement
  • use a prefix like st: on active ids (no XML namespaces like Wicket)
  • annotation processor validating that declared view resources exist (and no undeclared resources exist)
  • annotation processor validating that st.* ids match record structure
  • (perhaps) annotation processor that not just validates structure but actually generates code for a handler statically calling model methods (probably still parsing DOM at runtime)
  • review content type
    <!-- TODO find a way to declare that this is an XHTML fragment, e.g. https://stackoverflow.com/a/734212/12916 -->
    // TODO allow *.html if it can be parsed without external deps
    // or use *.xml?
    so that document fragments can either be statically validated, or validated by an annotation processor against the XHTML Schema
  • verify *.xhtml reloading from hpi:run
  • demo in core of Run/index loading allActionsInterruptedBuildAction/summaryCauseOfInterruption/UserInterruption/summary and also AbstractBuild/details
  • demo in core of some (complex) config form
  • demo of some plugin (like workflow-job) interacting with core

@jglick jglick changed the title [JENKINS-31203] Sketch of HTML facet [JENKINS-31203] HTML facet for Stapler Feb 18, 2025
@jglick jglick changed the title [JENKINS-31203] HTML facet for Stapler HTML facet for Stapler Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant