Skip to content

Commit

Permalink
add input element to REST
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
  • Loading branch information
mherwege committed Mar 26, 2023
1 parent 08a323f commit bb11a29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import org.openhab.core.model.sitemap.sitemap.ColorArray;
import org.openhab.core.model.sitemap.sitemap.Frame;
import org.openhab.core.model.sitemap.sitemap.Image;
import org.openhab.core.model.sitemap.sitemap.Input;
import org.openhab.core.model.sitemap.sitemap.LinkableWidget;
import org.openhab.core.model.sitemap.sitemap.Mapping;
import org.openhab.core.model.sitemap.sitemap.Mapview;
Expand Down Expand Up @@ -558,6 +559,10 @@ private PageDTO createPageBean(String sitemapName, @Nullable String title, @Null
bean.mappings.add(mappingBean);
}
}
if (widget instanceof Input) {
Input inputWidget = (Input) widget;
bean.inputHint = inputWidget.getInputHint();
}
if (widget instanceof Slider) {
Slider sliderWidget = (Slider) widget;
bean.sendFrequency = sliderWidget.getFrequency();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class WidgetDTO {
public BigDecimal minValue;
public BigDecimal maxValue;
public BigDecimal step;
public String inputHint;
public String url;
public String encoding;
public String service;
Expand Down

0 comments on commit bb11a29

Please sign in to comment.