Habpanel custom java code

While figuring out how to get to a specific dashboard in a habpanel panel I found this discussion that eventually got to some javascript that would go back to a dashoard (in the example code it goes to the main dashboard).

I know little about using javascript and there is no discussion in that post about how to use the code example.

Where does one put the java code? Is there Openhab docs for this?


When I get some more free time (rarely lol) I’ll try to incorporare what @ysc says in https://github.com/openhab/org.openhab.ui.habpanel/pull/287 Mostly cosmetics/coding style that’s why I didn’t bother fixing, but if I go get more time, yeah, I’ll incorporate it. Im also working on a HabPanel “extension” outside the main repo so I can code without worrying about convention/styles/etc.

It appears the screensaver is in git.

Is it a custom widget?

How do I find the json file to import? Or is there more to incorporating it in a running OH system?

Java and java script are two totally different programming languages. It sounds like you confuse those a bit and using them interchangeable.

I’m completely aware of the differences and I do use the terms interchangeably. :blush:
Please forgive me. :pensive:

That is because for the last 50 years of my coding career I was able to avoid both for all but minimal necessary exposures. :wink:

I’ve been saying things that get the language lawyers riled up for a long, long, long time. You should have been around when I was the lead in a C++ shop. :sunglasses: And, years before that, dinner at a conference with Kernighan & Ritchie was a riot. :crazy_face:

As for this thread, my original post linked another thread that had a reply with javascript. That thread had nothing (at least to me) that gave an indication of how to use it. Hence this thread.

@luckymallari then noted his github link for a Habpanel screensaver. The demo there looks like a great way to handle this, so, that led to my question of what to do with the contents.

Is it custom widget? Last one of those I tinkered with I got a .json file and imported it from the panel settings manage widgets. Does’t appear to that simple with the screensaver…

It’s the entire habpanel. I think you might need to refresh on newer jargons like pull requests and stuff :slight_smile: your post made me reminisce my c++ days writing device drivers

Yeah, pull requests. Well, I suspected when I looked at the gihub that it was a complete habpanel…

But, I’m not in the mood to play with replacing subsystems on my working system. :roll_eyes:

Here… had some free time.