okay, so i have verified a few things about my components. mainly,
that if i set a value for a session variable on initialization of the
component, the value sticks, so this is not the problem..
the problem lies in the way i have to authenticate via facebook.
here's how the authentication works:
1. facebook loads my app via an iframe.
2. if the user has not authorized my app, i redirect to facebok's
oauth page.
3. if the user authorized the app, facebook forwards the user to the
url i provide in the redirect. when it does this, it sends a POST
with my oauthToken.
here's how i am doing this...
in SBMain's renderConententOn method, i check the session for
oauthToken.
if it doesn't exist, i render a method:
renderAuthorizeCheckOn: html
html
html:
'<script>window.top.location.href
="https://graph.facebook.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri…";</script>'
once this has been accepted, i process the POST, and set my session
variables.. then, it continues with the render cycle..
inside the method that sets the session's oauthToken variable, the
values of the session check out i can indeed inspect the session and the
instance var, and it is set.
once the user is redirected back to my app (via the url sent over in
the renderAuthorizeCheckOn method, the app is loaded up again, but
this time, it has no session.
so, i think at this point, i need to figure out how to make sure that
once the app is hit by a user via facebook (and iframe), is redirected
to facebook for authorization, and then redirected back to my app,
that my app uses the same session for the entire interaction.
anyone have any ideas?
thanks!
--
----
peace,
sergio
photographer, journalist, visionary
http://www.ThoseOptimizeGuys.comhttp://www.CodingForHire.comhttp://www.coffee-black.comhttp://www.painlessfrugality.comhttp://www.twitter.com/sergio_101http://www.facebook.com/sergio101
On Thu, Oct 4, 2012 at 6:24 PM, Damir Majer <damir(a)majcon.de> wrote:
> Hi experts,
>
> proceeding following steps I try to load Pier2 into Pharo1.4
> > Download the latest Pharo Image from Jenkins Server
> https://ci.lille.inria.fr/pharo/view/Pharo%201.4/job/Pharo%201.4/
> <https://ci.lille.inria.fr/pharo/view/Pharo%201.4/job/Pharo%201.4/>
>
> > execute Metacell-Script:
> Gofer new
> squeaksource: 'MetacelloRepository';
> package: 'ConfigurationOfPier2';
> load.
> (Smalltalk at: #ConfigurationOfPier2) load.
>
> After all I want to Start the Seaside Control Panel
> (World-Menu->Tools->Seaside Control Panel) but there is no Control-Panel
> there...
>
Hi. It just means that what you are installing does not includes the
package that has the control panel.
You are sending class side #load. If you check the method it does "self
project stableVersion load".
So you are loading the #stableVersion and the default group. To know what
you are exactly loading, you can check in the ConfigurationOfPier2 to see
what it includes.
Or you can "simulate" the loading and see what it loads. So if you print:
(Smalltalk at: #ConfigurationOfPier2) project stableVersion ---->>> record.
a MetacelloNullRecordingMCSpecLoader(linear load :
linear load : 2.0.9 [ConfigurationOfPier2]
load : ConfigurationOfSeaside30
linear load : 2.0.9 [ConfigurationOfPier2]
load : ConfigurationOfMagritte2
linear load : 2.0.9 [ConfigurationOfPier2]
load : ConfigurationOfMagritte2
linear load : 2.0.9 [ConfigurationOfPier2]
linear load : 3.0.1 [ConfigurationOfSeaside30]
load : ConfigurationOfGrease
linear load : 3.0.1 [ConfigurationOfSeaside30]
linear load : 1.0.1 [ConfigurationOfGrease]
load : Grease-Core-pmm.51
load : Grease-Pharo-Core-pmm.31
load : Seaside-Core-pmm.666
load : Seaside-Pharo-Core-pmm.9
load : Seaside-Canvas-pmm.101
load : Seaside-Pharo-Canvas-lr.3
load : Javascript-Core-lr.88
load : Javascript-Pharo-Core-DaleHenrichs.9
load : Prototype-Core-lr.23
load : Scriptaculous-Core-lr.97
load : JQuery-Core-lr.111
load : JQuery-UI-lr.69
linear load : 2.0.6 [ConfigurationOfMagritte2]
load : ConfigurationOfGrease
linear load : 2.0.6 [ConfigurationOfMagritte2]
load : ConfigurationOfSeaside30
linear load : 2.0.6 [ConfigurationOfMagritte2]
linear load : 3.0.1 [ConfigurationOfSeaside30]
load : Seaside-Component-pmm.85
load : Seaside-HTML5-lr.11
load : Seaside-Session-pmm.134
load : Seaside-RenderLoop-lr.72
load : Seaside-Tools-Core-jf.18
load : Seaside-Flow-jf.22
load : Seaside-Widgets-obi.18
load : Seaside-Environment-pmm.71
load : Seaside-Pharo-Environment-lr.6
load : Seaside-Pharo-Continuation-lr.5
load : Seaside-Pharo-Flow-lr.5
load : Magritte-Model-lr.404
load : Magritte-Morph-lr.53
load : Magritte-Pharo-Model-lr.22
linear load : 2.0.6.1 [ConfigurationOfMagritte2]
linear load : 1.0.7 [ConfigurationOfGrease]
load : Grease-Core-NickAger.70
load : Grease-Pharo-Core-NickAger.49
linear load : 3.0.7 [ConfigurationOfSeaside30]
load : Seaside-Core-NickAger.768
load : Seaside-Pharo-Core-NickAger.16
load : Seaside-Component-jok.92
load : Seaside-Canvas-pmm.117
load : Javascript-Core-lr.90
load : Prototype-Core-lr.25
load : Scriptaculous-Core-pmm.102
load : JQuery-Core-lr.123
load : JQuery-UI-lr.80
load : Seaside-HTML5-pmm.28
load : Seaside-Session-pmm.157
load : Seaside-RenderLoop-lr.73
load : Seaside-Tools-Core-lr.19
load : Seaside-Flow-pmm.23
load : Seaside-Widgets-lr.26
load : Seaside-Environment-NickAger.77
load : Magritte-Seaside-lr.342
load : Magritte-Pharo-Seaside-lr.5
load : Pier-Model-NickAger.421
load : Pier-Pharo-Model-lr.3
load : Pier-Seaside-NickAger.526
load : Pier-Pharo-Seaside-lr.5
load : Pier-Security-NickAger.180
load : Pier-Pharo-Persistency-TudorGirba.20)
As you can see, it doesn't load the package you need. So you can download
that manually, or first try to load Seaside alone (with
ConfigurationOfSeaside3), making sure to load a group that includes that
package, and then you load ConfigurationOfPier2. I think (but I am not
sure) that ConfigurationOfPier2 always expected that you load seaside
before...if you see in the above list of packages, seaside gets loaded
(part of it) just because of dependencies of grease and magritte, but not
for Pier itself....
Finally, Notice that it is VERY GOOD (from my point of view) that
ConfigurationOfPier2 does not load the panel by default because it depends
on OmniBrowser, and the latter is not supported in all platforms.
Cheers,
> Did I miss something?
> Is Pier2 only running on an Pharo1.3 image? (I found on the piercms-Site
> only an Pharo1.3+Pier2 Image)
>
> Best regards,
> Damir
>
>
>
> -----
> --
> Damir Majer
> ... be agile: www.majcon.de
> --
> View this message in context:
> http://forum.world.st/Try-to-load-Pier2-into-Pharo1-4-tp4650092.html
> Sent from the Magritte, Pier and Related Tools mailing list archive at
> Nabble.com.
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
--
Mariano
http://marianopeck.wordpress.com
Hi experts,
maybe this is more an Seaside-Topic than an Pier-Topic?
Hi experts,
proceeding following steps I try to load Pier2 into Pharo1.4
> Download the latest Pharo Image from Jenkins Server
https://ci.lille.inria.fr/pharo/view/Pharo%201.4/job/Pharo%201.4/
> execute Metacell-Script:
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfPier2';
load.
(Smalltalk at: #ConfigurationOfPier2) load.
After all I want to Start the Seaside Control Panel
(World-Menu->Tools->Seaside Control Panel) but there is no Control-Panel
there...
Did I miss something?
Is Pier2 only running on an Pharo1.3 image? (I found on the piercms-Site
only an Pharo1.3+Pier2 Image)
Best regards,
Damir
-----
--
Damir Majer
... be agile: www.majcon.de
--
View this message in context: http://forum.world.st/Fwd-Pier-Try-to-load-Pier2-into-Pharo1-4-tp4650105.ht…
Sent from the Seaside General mailing list archive at Nabble.com.
okay, i know i am just doing something silly.. and it's late.. but i
have spent WAY too much time on this..
i set up a WASession for my app, and it has an instance variable
called 'oauthToken'..
in my app, i can do this:
self session inspect
and see that oauthToken indeed has a value..
but if i go:
self session oauthToken inspect
it bombs out as 'Undefined Object'
i have a conditional running against this.. so
self session oauthToken isNil "this is always true, even though this
variable is set.."
anyone have any idea what i am doing wrong?
thanks!
--
----
peace,
sergio
photographer, journalist, visionary
http://www.ThoseOptimizeGuys.comhttp://www.CodingForHire.comhttp://www.coffee-black.comhttp://www.painlessfrugality.comhttp://www.twitter.com/sergio_101http://www.facebook.com/sergio101
Hi--
Is there an example somewhere of a simple database query UI in
Seaside? I have a bunch of objects in a Gemstone database (in a
GLASS-enabled extent), and I'd like to demo a UI that makes rudimentary
queries on them (e.g., "show me all instances of this class with value X
for field Y").
thanks!
-C
--
Craig Latta
www.netjam.org/resume
+31 6 2757 7177
+ 1 415 287 3547 (no SMS)
the way the facebook authorization scheme works is as follows:
1. on the first go round, facebook sends a POST with some data in it
that needs to be parsed to pull an authorization code out of it.
2. if the app isn't authorized, i need to redirect to an authorization
dialog to so that the user can authorize my app.
3. once the user does that, my app receives an oauth code, and i am on
my way.
i have everything working, except, i am not sure where to store the
authorization code..
in my main component's renderOn, it looks to see if the a instance
variable 'oauthToken' is set. if not, it renders some javascript that
is really just a redirect to the facebook authorization screen.
once the app is authorized, 'oauthToken' is set to the correct value.
then, the authorization dialog sends the request BACK to the root
url..
everything works correctly..BUT.. on the second time back, the
redirect from facebook, it looks like it starts a brand new session
(there is a new instance of the main component created).
i was hoping that this would all be one session, and that i could just
set an instance variable once, and not even touch the session, but i
don't think this is going to happen. plus, it looks like i will be
firing up a new session on return anyway, so what i have saved in
session will be lost.
anyone have any ideas on how to cleanly persist this variable after
facebook's redirect?
--
----
peace,
sergio
photographer, journalist, visionary
http://www.ThoseOptimizeGuys.comhttp://www.CodingForHire.comhttp://www.coffee-black.comhttp://www.painlessfrugality.comhttp://www.twitter.com/sergio_101http://www.facebook.com/sergio101
I've just read:
> WARestfulComponentFilter allows applications to easily switch from session-less parts to session-based parts.
in http://code.google.com/p/seaside/wiki/Seaside310Changelog.
Can someone provide a quick example of that? Is there something
automated in Seaside 3.1 ?