Re: Aida Digest, Vol 44, Issue 15

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Aida Digest, Vol 44, Issue 15

Hi Herbert,

Thank you for the help. The page has displayed nicely. I am looking forward to learning more about this awesome framework.

Ching de la Serna

On Mon, Jan 24, 2011 at 7:00 PM, <[hidden email]> wrote:
Send Aida mailing list submissions to
       [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
       [hidden email]

You can reach the person managing the list at
       [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Aida digest..."

Today's Topics:

  1. hello papoy (Ching de la Serna)
  2. Re: Webuser uuid (Nicholas Moore)
  3. Re: hello papoy (Herbert K?nig)


Message: 1
Date: Sun, 23 Jan 2011 20:39:29 +0800
From: Ching de la Serna <[hidden email]>
Subject: [aida] hello papoy
To: [hidden email]
       <AANLkTi=YAegfW7a_so4bSoDjWujakXSEzVy31U=[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"


I am trying to make a small app that says 'Hello Papoy'
Object subclass: #Papoy >> name
                   >> name:

WebApplication subclass: #PapoyApp >> viewMain

       | e |
       e := WebElement new.
       e addTextH1: 'Hello, Papoy'.

on a workspace:

papoy _ Papoy new.
papoy name: 'test papoy'.

AIDASite newNamed: 'papoy'.
(AIDASite named: 'papoy') addUserService: papoy named: #papoy.
(AIDASite named: 'papoy') urlResolver defaultURL: '/pap.html' forObject:
(AIDASite named: 'papoy') start..
(AIDASite named: 'papoy') host: 'localhost' ip: '' port: 8881.

Mozilla firefox browser: http://localhost:8881/pap.html
The server runs and serves: http://localhost:8881/admin?view=login
displaying the aidademo login page

What step is missing?

Thanks in advance.

Ching de la Serna
-------------- next part --------------
An HTML attachment was scrubbed...


Message: 2
Date: Sun, 23 Jan 2011 14:33:17 +0100
From: Nicholas Moore <[hidden email]>
Subject: Re: [aida] Webuser uuid
To: "AIDA/Web general discussion list" <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"

It is possible, but unlikely, that a duplicate uuid could exist, so I have a WebUser class variable: setOfUids to hold all the uuids for my site. I test for the existence in the initid method:



       newUuid := (AIDASite random next * 1000000000) rounded printString.
       (WebUser setOfUuids contains: [:each | each = newUuid])
                       ifTrue:[newUuid := self initId ].
       WebUser setOfUuids add: newUuid.
       self id: newUuid.
       self otherValuesAt: #uuid put: (self id)

I think that the WebUser id may be redundant, but I also set the Person id to be the same as the WebUser id for the moment. I hope to have time to look at the Person/Party parts soon.

On Sunday 23 Jan 2011 10:03:08 Janko Miv?ek wrote:
> Nicholas, thanks for this note, I just changed #initId to set up a
> string instead of number, as you suggested.
> Best regards
> Janko
> On 20. 01. 2011 12:31, Nicholas Moore wrote:
> > In 6.1 a WebUser uuid can end up as a large integer or a string:
> >
> > WebUser>>initId
> >
> > self id: (AIDASite random next * 1000000000) asInteger.
> >
> > self otherValuesAt: #uuid put: (self id)
> >
> > WebUser>>uuid
> >
> > "unique identifier "
> >
> > ^self otherValuesAt: #uuid ifAbsentPut: [(AIDASite random next *
> > 1000000000) rounded printString]
> >
> > i assume that it should be a string to be consistent with Party, which
> > also returns a string.
> >
> > Nicholas
> >

Nicholas Moore

Check out my Blog

"Still Running - that I may die in good health"
-------------- next part --------------
An HTML attachment was scrubbed...


Message: 3
Date: Sun, 23 Jan 2011 15:49:22 +0100
From: Herbert K?nig <[hidden email]>
Subject: Re: [aida] hello papoy
To: AIDA/Web general discussion list <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1

Hi Ching,

CdlS> WebApplication subclass: #PapoyApp >> viewMain

CdlS>         | e |
CdlS>         e := WebElement new.
CdlS>         e addTextH1: 'Hello, Papoy'.

I'm not sure if you get away without ending your view method without a
variant of:

self style pageFrameWideNoNavigationWith: e title: 'yourTitle' .

CdlS> Mozilla firefox browser: http://localhost:8881/pap.html
CdlS> The server runs and serves:
CdlS> http://localhost:8881/admin?view=login
CdlS> displaying the aidademo login page

This is to be expected, you have to login with 'admin' and 'password',
after that you should be forewarded to your page. If you don't want
this, do the login and then as an admin you can assign the 'guest'
user the right to view your page. Then the steps you describe will lead
directly to your page.

To set the access rights you go to localhost:8888 in your browser. On
the top of the demo page you log in as admin, go to security in the
left bottom nav bar. Select 'users', select 'guest'. At the bottom find
'access rights'. There you'll find your app and can set the guests


Herbert                            mailto:[hidden email]


Aida mailing list
[hidden email]

End of Aida Digest, Vol 44, Issue 15

Aida mailing list
[hidden email]