• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with MyFaces t:popup tag

 
J Haley
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 18417
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
J Haley
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it. had to add forceIdIndex="true" forceId="true" to t:dataList
[ August 04, 2006: Message edited by: J Haley ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!