4

the following picture is just a sample picture to make the explanation of my problem easier. I am using Vaadin 7.x. and have a CDIView in my project. Now, imagine that we're already in "Buttons & Links" page and want to jump to "Labels" page using the "Open Labels" Button on the page.

I already used a navigator to navigate to the "Labels" page, but the problem is, when I navigate to "Labels" page, the "Buttons & Links" item in Vaadin CDIView stays selected, instead of getting deselected. And of course the "Labels" item should get selected.

My second problem will be, calling a method from the Label page, when I open the page using the "Open Labels" Button.

More Information:

  • All the MenuItems are added using a @CDIView annotation top on the class and I just get to navigate them through the names of each class.

I'm gonna be happy with every solution and suggestion you can give me.

Thanks in advance and best regards. R.

enter image description here

Reza P.
  • 306
  • 2
  • 18
  • Try calling invalidate and/or repaint on parent node – Abishek Stephen Sep 08 '21 at 08:41
  • @AbishekStephen Thanks for the reply! Can you give me more details please? I have no idea how to repaint or invalidate on the parent node - I mean in this case with Vaadin CDIView - but I'm gonna give it a try – Reza P. Sep 08 '21 at 09:41
  • I use Java Swing and I call those methods when the view model is not concurrent with current state of data. I predicted it would be a case of mismatched UI state and suggested the above solution. Invalidate/repaint methods will be available in the UI component's class, else you have to write your own logic. I am not sure how to do it in Vaadin, but consider it with a grain of salt. Kudos. – Abishek Stephen Sep 12 '21 at 13:41
  • Thanks alot @AbishekStephen, I still didn't find anything that can help me with it, I think I need to write my own logic. Thanks again (: – Reza P. Sep 13 '21 at 09:24
  • You're welcome. Please update here if you find a solution. – Abishek Stephen Sep 13 '21 at 13:00

0 Answers0