[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Strange behaviour of outlook bar component  XML
Forum Index -> Development Go to Page: 1, 2 Next 
Author Message
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hello,

we have an outlookbar component as navigation element in our application.
When starting the application, the outlookbar looks like this:
-bar1-
-content for bar 1-
-bar2-
-bar3-

when I click on bar2, everything looks fine, clicking on bar3, also fine. So the outlookbar looks like
-bar1-
-bar2-
-bar3-
-content for bar3-

now. But now comes the strange part. Clicking on bar2 or bar1 shows the correct content for this bar, but the arrangement of the bars/content stays the same:
-bar1-
-bar2-
-bar3-
-content for bar1-
After another click on bar1 the layout is correct (as in the first example).

I debugged the code and looked if there is some problem in my code, but the sequence of items is correct when debugging.

Can you help me?

Tobias
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

...yes, we are "investigating"...

Bjötn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi Tobias,

currently we cannot reproduce with own examples - both statically and dynamically defined grids.

Could you please tell: what's the color of the buttons in the "wrong case" - is the "bar3" button highlighted as well, though "content1" is shown?

Björn

Björn Müller, CaptainCasa GmbH
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hello,

highlighting is correct, bar 1 is highlighted if the content of bar1 is shown, just the ordering of the bars/conent is wrong.

Tobias
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hello,

I just tried your new setup (20080122).

And if I add the value binding to some property on server side, without doing anything with this property besides providing getter and setter, it works perfectly fine. Thank you for this.

But if I remove the getter and setter on server side, the oulookbar always displays its content after the first bar. You should at least add this behaviour to your documentation.

Tobias
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

...yes, you are right: the reason of course is that the server value always is interpreted as int "0" if no property binding is defined...

Thanks fot the advice! Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

...switching back to "0" / first tab when not defining a value-binding was solved, available in next version.

Björn

Björn Müller, CaptainCasa GmbH
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Hello everybody,

I have the same problem again -- years later --

But it only happens if I set the rendered flag of the outlook contend to false in the beginning and setting it true after an outlook item was clicked.
Then the outlook content is displayed at the bottom, the first time. After that the outlookbar and the content behave properly.
Code:
 private void initOutlookbar() {
     ...
     OUTLOOKBARCONTENTNode contentNode = new OUTLOOKBARCONTENTNode();
     contentNode.setRendered("#{d.navigation.outlookContentRendered}");
     ...
     m_outlookContentRendered = false;
 }
 

Code:
 public void onExecute(final ActionEvent ae) {
      OUTLOOKBARITEMComponent item = (OUTLOOKBARITEMComponent) ae.getSource();
      ...
      m_outlookContentRendered = true;
 }
 

Regards,
Frauke
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi,

an outlookbar requires one (stable) outlookbar content. Inside the outlookbar content you can do what you want - but an outlookbar wihtout content is not valid.

Regards, Björn

Björn Müller, CaptainCasa GmbH
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Yes, I have one single content.

Is it not allowed to set it to rendered=false?

heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Is there any other possibility to show all Outlook Items as "closed" in the beginnig?

Or at least, to select the last one, so I can display an empty content?

Frauke
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi,
selection is done through the VALUE of OUTLOOKBAR. By default it starts with 0 (first OUTLOOKBARITEM).
Regards, Björn

Björn Müller, CaptainCasa GmbH
leuchtner

Active

Joined: 16/01/2008 12:51:23
Messages: 17
Offline

Hi!

I've got an other issue regarding the outlookbar.

I have an outlook bar with a dynamic content. I initialized the nodes with the setContentNodes() method (DYNAMICCONTENTBinding class). In the first step everything works fine. But when I try to reinitialize the nodes (second call of setContentNodes()) I always get a client side error.
As a workaround, I found out, that can check

getContentNodes() == null

and call

getContentNodes().clear();
getContentNodes().addAll(myNewNodes);

But this is quite much code for a simple reinitialization and is "nice" pitfall, if you aren't aware of that!
Can you provide us a more convenient way for node reinitialization?

regards
Michael

CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi,

I do not undestand yet:

setContentNodes(List<ComponentNode>) sets the list of sub nodes. What you pass is what you get...

I assume, that in your case you re-use the list object of the first setContentNodes(...) call, and you do not clear the list before re-building it. (?)

Regards, Björn

Björn Müller, CaptainCasa GmbH
leuchtner

Active

Joined: 16/01/2008 12:51:23
Messages: 17
Offline

Hi Björn!

Well - only after the first call I get the correct result. If I call setContentNodes() a second time (with the same, re-builded list) I get a client side error after the server roundtrip (ArrayOutOfBoundsException)

Regards
Michael
 
Forum Index -> Development Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.6 © JForum Team