voyent
[Solved] 2 jsp using the same backing bean  XML
Forum Index -> Components
Author Message
Baleyba

Joined: 16/Nov/2006 00:00:00
Messages: 110
Offline


Hi, we have a problem with components that are using the same valuebinding on differents jsp files in the same application.

For example, on the jsp files, we are using:

<ice:panelTabSet styleClass="myTab" selectedIndex="0" binding="#{bean.selectedTabSet}" id="tabSet1" > ...

On the first jsp that we are opening, the panelTabSet is ok. (Opening order between the two jsp isn't important).

On the second jsp, the binding is broken. We can't see the panelTabSet.
On debug, the broken panelTabSet object exists but doesn't have children.

When we return on the first jsp, it is ok.

Do you know this problem ?

regards
Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1982
Offline


This is the first time I have heard of this problem. There might be something else happening on the second page.

Binding aren't necessary needed for most application. What are you using the binding for?
[Email]
aberrant80

Joined: 20/Jul/2006 00:00:00
Messages: 34
Offline


Did you check whether the two "bean" instances are actually the same instance?
Baleyba

Joined: 16/Nov/2006 00:00:00
Messages: 110
Offline


Hi all,

thanks for your answers.
Sorry for my late. I'm trying to do a little example.

patrick.corless> I'm using binding to have only one object to manage whereas having a lot of parameters into my bean.
Pages are very complex and have a lot of components.

aberrant80> Yes I think I'm using the same instance because I defined a link between the bean and a "central" bean into my faces-config.xml file.

I'm doing a small example to show you the problem.

thanks again

regards
Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
Baleyba

Joined: 16/Nov/2006 00:00:00
Messages: 110
Offline


Hi all,

I have done a little example: This is a MyEclipse project.

You have 2 pages and 3 beans:
- beanPage1 that manage page1
- beanPage2 that manage page2
- popupBean that manage popup

You can see that if you open first the popup on the first page, we don't see popup panelTabSet on the second and etc.. It disappears...


I have also try to use a "bean mediator" in order to keep beans references like on the webmail icefaces demo but it doesn't work too.

I hope this would help us.

regards
Bal.
 Filename binding.zip [Disk] Download
 Description Binding between 2 jsp demo
 Filesize 32 Kbytes
 Downloaded:  368 time(s)


JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
SuperPat

Joined: 10/Oct/2007 00:00:00
Messages: 11
Offline


I have the same problem with an HTMLPanelGroup used in one JSP included in two others.

In the fist page, it work find, in the second page it work fin too but if y return to the first page, the panel group disappeared.

The only way that I have found is to duplicate all the attributes and therefore make two different JSF...

Can you correct this please?
michael.thiem


Joined: 04/Jun/2007 00:00:00
Messages: 704
Offline


Hi,

could you also post the java sources?

Thanks,
Michael
SuperPat

Joined: 10/Oct/2007 00:00:00
Messages: 11
Offline


This is a short example:

Two jsp, each containing an panelGroup with a binding on the same attribute of a controller. If you navigate from page to page you will see the panelGroup disappear from one of the pages.
 Filename TestProject.zip [Disk] Download
 Description
 Filesize 29 Kbytes
 Downloaded:  358 time(s)

Baleyba

Joined: 16/Nov/2006 00:00:00
Messages: 110
Offline


Hi,

It seems to be the same problem that I reported.

does someone know if it exists a solution for keeping the binding ?

thanks for your help
regards

Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
Baleyba

Joined: 16/Nov/2006 00:00:00
Messages: 110
Offline


Hi all!

Anyone tested my little example and have solution ? :)

regards
Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
Baleyba

Joined: 16/Nov/2006 00:00:00
Messages: 110
Offline


Hi,

I have news...


I have done some tests. And the problem comes from the binding attribute.

I get problem every time I'm changing pages with navigation rules described into the faces-config.xml and when I have a binding attached to a tabset.

Sometimes it doubles icefaces tags into the tabset and is generating exception ..

regards
Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
Baleyba

Joined: 16/Nov/2006 00:00:00
Messages: 110
Offline


Hi all,

Ok the problem is soved with JBOSS 4.2.2 instead of 4.0.5...

Bal.

JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team