Skip to content
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

Can't set height on webview when editing a sitemap in the main UI #1898

Closed
ghost opened this issue Dec 7, 2020 · 2 comments · Fixed by #2072
Closed

Can't set height on webview when editing a sitemap in the main UI #1898

ghost opened this issue Dec 7, 2020 · 2 comments · Fixed by #2072
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@ghost
Copy link

ghost commented Dec 7, 2020

@Ungeridus commented on Nov 30, 2020, 8:50 AM UTC:

The problem

Can't set height on webview when editing a sitemap in the main UI

Expected behavior

I can set the height on a separate sitemap I edit textually and it displays fine.

Additional information

This works but isn't tall enough to display web page

Text item=DateTime label="Cameras [%1$tl:%1$tM %1$tp]" icon="camera" {
	Webview url="http://10.10.0.3:8080/static/cams.html" icon="camera"
}

When I set the height

Text item=DateTime label="Cameras [%1$tl:%1$tM %1$tp]" icon="camera" {
	Webview url="http://10.10.0.3:8080/static/cams.html" height=24 icon="camera"
}

the sitemap no longer loads and throws an error on openhab.log that starts with

2020-11-30 01:57:17.893 [ERROR] [omponents.UIComponentSitemapProvider] - Cannot build sitemap default
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Integer (java.lang.String and java.lang.Integer are in module java.base of loader 'bootstrap')

This issue was moved by ghys from openhab/openhab-webui#579.

@ghost ghost added the bug An unexpected problem or unintended behavior of the Core label Dec 7, 2020
@ghost
Copy link
Author

ghost commented Dec 7, 2020

@ghys commented on Dec 7, 2020, 8:54 AM UTC:

Probably the normalizeType doesn't work in this case.

@lolodomo
Copy link
Contributor

@ghys : it looks like similar to #1875 . MainUI is apparently converting a boolean or an integer field to a string which is not compliant with the sitemap syntax.

ghys added a commit to ghys/openhab-core that referenced this issue Jan 4, 2021
Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes openhab#2047.
Fixes openhab#1987.
Fixes openhab#1898.
Fixes openhab#1875.
Fixes openhab/openhab-webui#745.

Signed-off-by: Yannick Schaus <[email protected]>
kaikreuzer pushed a commit that referenced this issue Jan 5, 2021
…aps (#2072)

* Fix parsing integer & booleans parameters in UI component based sitemaps

Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes #2047.
Fixes #1987.
Fixes #1898.
Fixes #1875.
Fixes openhab/openhab-webui#745.

Signed-off-by: Yannick Schaus <[email protected]>
cweitkamp pushed a commit that referenced this issue Jan 10, 2021
…aps (#2072)

* Fix parsing integer & booleans parameters in UI component based sitemaps

Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes #2047.
Fixes #1987.
Fixes #1898.
Fixes #1875.
Fixes openhab/openhab-webui#745.

Signed-off-by: Yannick Schaus <[email protected]>
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
…aps (openhab#2072)

* Fix parsing integer & booleans parameters in UI component based sitemaps

Also catch remaining exceptions and log a warning/ignore the parameter
instead of making the whole sitemap building process fail.

Fix wrong feature ID for the video widget URL.

Fixes openhab#2047.
Fixes openhab#1987.
Fixes openhab#1898.
Fixes openhab#1875.
Fixes openhab/openhab-webui#745.

Signed-off-by: Yannick Schaus <[email protected]>
GitOrigin-RevId: fcaf251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant