Hi,

When using ajaxSelectObj and I have the currently selected object in a
SessionVar and refreshes the page, the selected object is not selected
in the browser after the page refresh, even if the generated html has
the correct selected="selected" option.

This only happens on Firefox (OS X), not Chrome or Safari and seems to
be a known FF issue (eg
http://www.beyondcoding.com/2008/12/16/option-selectedselected-not-working/)

but I was wondering if there's some well known Lift workaround? The
obvious problem is of course that the view is now out of sync with the
server....

/Jeppe

The basic lift app with the following template & snippet:

      <form>
        <lift:helloWorld.select>
          My select <select:lc1/>
        </lift:helloWorld.select>
      </form>

class HelloWorld {
  val lcs = List(1,2,3)
  private object lc1 extends SessionVar[Box[Int]](Empty)
  
  def select(in: NodeSeq): NodeSeq = {
    println("lc1 is: "+lc1.is)
    bind("select", in, "lc1" ->    ajaxSelectObj(lcs.map(lc => (lc, "Item 
"+lc.toString)), lc1.is,
                        (lc:Int) => {
                          lc1(Full(lc))
                          println("selected lc1=%s".format(lc1)); 
                          SetHtml("mylc", Text(lc.toString))
                        }))
  }
}  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to