| Author |
Problem with MyFaces t:popup tag
|
J Haley
Ranch Hand
Joined: Jul 22, 2004
Posts: 66
|
|
I�m running into a problem with a MyFaces t:popup tag. The code snip has an ouputText element of #{row.serviceDesc} with a graphic behind it. Hovering over the graphic will display a popup window the #{row.serviceDesc} being displayed. I�m reusing the same field only for test purposes. The problem is the occurrence of #{row.serviceDesc} is incrementing properly outside of the t:popup, but inside of the t:popup the value holds on to its first occurrence. Any ideas what I�m missing?
|
 |
J Haley
Ranch Hand
Joined: Jul 22, 2004
Posts: 66
|
|
|
The popup uses a javascript to show and hide elements wrapped in a div tag. Looks like the problem is that both of my div tags have the same id. How do I resolve this? Can I make my own id?
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14487
|
|
|
You can put an id attribute on any JSF tag you like. In fact, it's a good idea, since a lot of JSF messages list the tag they were mad at. If you supply the ID, you'll know which tag was bad. Otherwise JSF will synthesize a tag id, and good luck trying to match that id against your page source.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
J Haley
Ranch Hand
Joined: Jul 22, 2004
Posts: 66
|
|
|
I believe my problem is that I need an id on t:popup, and that id needs to be dynamic. I know it should be generated uniquely, but due what I saw in the generated html I don�t think it is. For example, every iteration of t:popup, since its inside of t:datalist, needs to be unique. I could use rowIndex from t:datalist, but I did not seem to be able to use that as part of my id attribute. Unless I was missing something.
|
 |
J Haley
Ranch Hand
Joined: Jul 22, 2004
Posts: 66
|
|
Got it. had to add forceIdIndex="true" forceId="true" to t:dataList [ August 04, 2006: Message edited by: J Haley ]
|
 |
 |
|
|
subject: Problem with MyFaces t:popup tag
|
|
|