Class Html

java.lang.Object
com.codename1.backend.mvc.Html

public final class Html extends Object
Primitives called by generated views; no template evaluation occurs here.
  • Method Details

    • utf8

      public static byte[] utf8(String text)
    • bytes

      public static byte[] bytes(ByteSink out)
    • string

      public static String string(Object value)
    • truth

      public static boolean truth(Object value)
    • equal

      public static boolean equal(Object a, Object b)
    • text

      public static void text(ByteSink out, Object value)
    • attribute

      public static void attribute(ByteSink out, String name, Object value)
    • attributeValue

      public static String attributeValue(Object value)
      Snapshot an attribute's textual value before it is checked and rendered.
    • submitMethod

      public static String submitMethod(Model model, String value)
      A submitter can belong to a form outside this template or fragment.
    • formEncoding

      public static String formEncoding(String value)
      Form binding supports the two structured HTML form encodings.
    • htmxParameters

      public static String htmxParameters(Model model, boolean get, String parameters)
      Preserve parameter filtering while keeping CSRF tokens out of htmx GET URLs.
    • booleanAttribute

      public static void booleanAttribute(ByteSink out, String name, Object value)
    • urlPart

      public static String urlPart(Object value)
    • badModel

      public static Object badModel(String message)
    • require

      public static Object require(Model model, String name, String view)
    • field

      public static Object field(Model model, String form, String name, Object fallback)
    • errors

      public static String errors(Model model, String form, String name)
    • optionValue

      public static String optionValue(Object value)
      The browser derives an option's implicit value by collapsing ASCII whitespace.
    • checked

      public static boolean checked(Object value, Object candidate)
    • model

      public static Model model(HttpServer.Request request)
    • csrf

      public static void csrf(ByteSink out, Model model)
    • csrf

      public static void csrf(ByteSink out, Model model, Object formId)
    • safeUrl

      public static void safeUrl(String value)
    • localLocation

      public static void localLocation(String location)
    • redirect

      public static HttpServer.Response redirect(HttpServer.Request request, String location)