All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.tsl2.nano.h5.websocket.dialog.IHtmlItem Maven / Gradle / Ivy

Go to download

TSL2 Framework Html5 Extensions (WebServer, Html5Presentation, RuleCover, BeanConfigurator, LogicTable-Sheet, Expression-Descriptors for Actions, Rules, URLs, Queries)

There is a newer version: 2.5.2
Show newest version
package de.tsl2.nano.h5.websocket.dialog;

import java.util.HashMap;
import java.util.Map;

public interface IHtmlItem {
    String getTag();
    String getId();
    String getName();
    Object getValue();
    Map getSpecificAttributes();
    default boolean hasLabel() { return true;}
    default String getContent() {return null;}

    default Map getAttributes() {
        Map attrs = new HashMap<>();
        attrs.put("id", getId());
        attrs.put("name", getName());
        attrs.put("value", String.valueOf(getValue()));
        getSpecificAttributes().keySet().stream().forEach(k -> attrs.put(k, String.valueOf(getSpecificAttributes().get(k))));
        return attrs;
    }
    
    default String toHtml() {
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy