-
Notifications
You must be signed in to change notification settings - Fork 23
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
Make HTML generation configurable #120
Labels
Comments
jmvanel
added a commit
that referenced
this issue
Feb 3, 2017
TODO - rename trait Form2HTMLBanana to HTMLGenerator, polish API - FIX TestCreationForm2Jena
jmvanel
added a commit
that referenced
this issue
Feb 5, 2017
…ion configurable API Scala #120" remove some PASTED code
jmvanel
added a commit
that referenced
this issue
Feb 5, 2017
…ation configurable API Scala" #120 - Selenium suite passes (small trouble unrelated to this commit, probably related to the redirection to /history from /index) - SBT tests pass
Here is an example of overriding a function implementing the form: override def makeBackLinkButton(uri: String, title: String = "") = {
val tit = if (title == "") s" Reverse links for <$uri>" else title
<button type="button"
class="btn btn-info" readonly="yes" title={ tit } data-value={s"$uri"}
onclick={ s"backlinks( '$uri' )" } id={ s"BACK-$uri" }>
bla
</button> Just paste this in makeDefaultForm2HTML in The same customization can also be made in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a Scala developper to change or rewrite the HTML generator , possibly with another technology like Mustache or Scala.JS, the code must be made modular, in the spirit of
Chapter 29 Modular Programming Using Objects
http://www.artima.com/pins1ed/modular-programming-using-objects.html#27.3
The situation
The Configuration is modular thanks to filed abstract field config.
So the Configuration could hold a field for the HTML generation implementation.
Currently the HTML generator is a private [html] trait Form2HTML .
It is used by traits TableViewModule and CreationFormAlgo, that instanciate Form2HTMLBanana.
Then TableViewModule and CreationFormAlgo are added by inheritance in the generic application.
There is an attempt at an HTML Form API for front end developer,
trait HTMLFormAPI ,
but it is not used.
The text was updated successfully, but these errors were encountered: