This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stateDropDown = SHtml.ajaxSelect( | |
Wiring.states.map(i => (i, i)), | |
Full(1.toString), | |
selected => { | |
//What to do when you select an entry | |
replace(selected) | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private object Info { | |
val selectedState= ValueCell(state) | |
val cities= selectedState.lift(_ + "") | |
val ids= selectedState.lift(_ + "") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stateDropDown = SHtml.ajaxSelect( | |
CitiesAndStates.states.map(i => (i, i)), | |
Full(1.toString), | |
selected => { | |
//What to do when you select an entry | |
Info.selectedState.set(selected) | |
state= selected | |
Noop | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class reactiveweb extends Logger{ | |
val statesSelect= Select(Val(CitiesAndStates3.states)) | |
statesSelect.selectedIndex.value ()= Some(0) | |
val validCitiesSignal= statesSelect.selectedItem map { | |
case None => Nil | |
case Some(state) => CitiesAndStates3.citiesFor(state) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class reactiveweb extends Logger{ | |
val statesSelect= Select(Val(CitiesAndStates3.states)) | |
statesSelect.selectedIndex.value ()= Some(0) | |
val validCitiesSignal= statesSelect.selectedItem map { | |
case None => Nil | |
case Some(state) => CitiesAndStates3.citiesFor(state) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.fmpwizard.code.snippet | |
/* | |
* Copyright 2007-2010 WorldWide Conferencing, LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.fmpwizard.code.snippet | |
/* | |
* Copyright 2007-2010 WorldWide Conferencing, LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class Boot { | |
... | |
def boot { | |
if (!DB.jndiJdbcConnAvailable_?) DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor) | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case object MyTabGroup extends RequestVarSnapshotGroup | |
object MyVar1 extends SnapshotRequestVar(MyTabGroup, "foo") | |
object MyVar2 extends SnapshotRequestVar(MyTabGroup, 42) | |
def render = { | |
/** | |
* when this function is applied, | |
* it will restore the values of all the members of the MyTabGroup | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case CityStateUpdate(cometName, city, state) => { | |
info("Comet Actor %s will do a partial update".format(this)) | |
/** | |
* You can have many partialUpdate() calls here. | |
*/ | |
partialUpdate( | |
SetHtml("city", Text(city)) | |
) | |
partialUpdate( |