« first day (614 days earlier)      last day (395 days later) » 

7:13 PM
hey @metadaddy
how's it going?
 
@nivyaj Going well - hey - 2 people in here at the same time!
How are things with you?
 
for all intents & purposes, it's a crowd in here :)
 
@nivyaj LOL
 
pretty good. plowwing through some code.
yourself?
 
Updating wiki.developerforce.com/page/…, doing some Force.com/ExactTarget integration, and preparing a session on Minecraft and Raspberry Pi!
And answering questions on StackExchange
 
7:18 PM
hah, i really liked that streaming API minecraft demo you did
 
:-D
 
are there any real world applications that are derivitive of it?
 
Not directly, but we're showing it on Salesforce1 World Tours as an example of APIs in action
It's certainly sparking a lot of thinking about what is possible with the APIs
 
nice, I'll check it out when i get home.
 
7:36 PM
Cool - lunchtime here! Ping me any time in this room - it's always open in my browser!
ttfn
 
later!
@meta If you have a chance, can you g
 
@nivyaj g???
 
can you take a look at this? i'm stuck salesforce.stackexchange.com/questions/32091/…
if you have a sec :-/
 
So where are you stuck right now?
I see Mohith's suggestion to use an actionFunction - looks sensible
 
i can't get the syntax to work.
 
7:43 PM
The syntax of the actionFunction?
 
this is throwing null
    console.log(document.getElementById("!$Component.successCode"));
i think my action function is ok
<apex:actionFunction name="updateState" rerender="form" />
<apex:inputHidden id="successCode" value="{!successCode}"/>
and in my controller, i have a getter setter for successCode
 
haha
 
That $Component stuff is a nightmare
 
Yes!
 
7:46 PM
You have to reference it close to the element
so, right after, I think you can do this...
<apex:inputHidden id="successCode" value="{!successCode}"/>
<script>
var successCode = document.getElementById("{!$Component.successCode}");
</script>
I think I remember that working
Oh - and you were missing the {} from console.log(document.getElementById("!$Component.successCode"));
Should be console.log(document.getElementById("{!$Component.successCode}"));
 
i don't follow why i need 2 scripts
 
The key seems to be to put the reference to $Component right after the element, so VF doesn't have to traverse the DOM
 
aren't i setting it intially?
ah
 
"A $Component path specifier is matched against the component hierarchy:
At the current level of the component hierarchy where $Component is used; and then
At each successive higher level in the component hierarchy, until a match is found, or the top-level of the component hierarchy is reached.
There is no backtracking, so if the ID you’re trying to match requires a traversal up and then back down, it won’t match."
So referencing it right there seems to solve the problem
You can put the var successCode in script at the top of the page
 
Ah, that's helpful...
thanks :)
 
7:52 PM
At runtime, the assignment will happen as the page loads, since VF substitutes the string for {!$Component.successCode}
and then you can use successCode wherever it's in scope
Good luck!
 
enjoy your lunch :)
 
Will do - ttfn!
 
8:24 PM
great SSO session pat
 

« first day (614 days earlier)      last day (395 days later) »