portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Evans" <aaronmev...@gmail.com>
Subject Re: [jira] Commented: (JS2-449) User Specific Preferences
Date Thu, 24 Aug 2006 20:00:35 GMT
David,
The testing I have done so far has worked perfectly.  Here's the
scenarios I've tested so far:

For a given portlet X, a preference, 'pref1', is configured in
portlet.xml with value 'initValue'.

There are two instances of portlet X, one in one page in frag ID A and
another in another page in frag ID B.  *No values for 'pref1' are
configured in the PSML.*

1. User 1 logs in and browses to the page containing frag ID A and
then goes into the edit portlet mode.  As expected, 'pref1' is set to
'initValue'.
2. User 1 changes the value to 'user1ValA' and saves his preferences
(in processAction, prefs.store() is called).
3. User 1 logs out and logs back in.  Browsing to frag ID A, as
expected, the pref is still set  to the new value, 'user1ValA'.
Browsing to frag ID B, as expected, the pref is still set to the
default 'initValue'.

4. User 2 logs in and browses to frag ID A, as expected, the pref
value is the initial value 'initValue'.
5. User 2 edits the preference and sets the value to 'user2ValA' and
saves his preferences.
6. User 1 logs out and logs back in and browses to frag ID A.  His
value for 'pref1' remains 'user1ValA' (as expected).

7. User 1 resets his preference and saves it (via prefs.reset('pref1')
then prefs.store() in processAction).   As expected,  his value is
saved as 'initValue' and the value for User 2 remains unchanged.

As stated above, values for the preference have not been specified in
the PSML fragments, so the User->PSML->portlet.xml chain has so far
not been tested.  This only tested the User->portlet.xml chain and
that preferences are indeed stored on a user by user basis.

So then I added PSML configured preferences (which I thought wouldn't
work properly, but they seemed to):

For a given portlet X, a preference, 'pref1', is configured in
portlet.xml with value 'initValue'.

There are *three* instances of portlet X, frag ID A, frag ID B and
frag ID C.   For frag ID A, no value for the preference was specified.
 For frag ID B, a value of 'psmlValB' was specified.  For frag ID C, a
value of 'psmlValC' was specified.

After resetting the prefs for User 1 and User 2:

1. User 1 logs in and browses to each PSML fragment.  As expected (and
as before), frag ID A used the portlet.xml value of 'initValue'.
However, frag ID B and C both used the PSML override values of
'psmlValB' and 'psmlValC' respectively.

2. User 1 updates his values for the preference to 'user1ValA',
'user1ValB' and 'user1ValC' with respect to frag IDs A, B and C.

3. User 2 logs in and the values for the preference are unaffected by
user 1 and default to the values as expected.

4. User 1 resets his value for the preference for frag A and the value
falls back to the value in portlet.xml (as expected since no value is
specified in the PSML).

5. User 1 resets his value for the pref for frag B and it falls back
to the value specified in the PSML as expected (IMO).

So it looks good as far as I can tell.  As I said, I thought there was
still a problem with PSML prefs, but in the way that I feel it should
work, it seemed fine.

Nice work!

-aaron


On 8/23/06, Aaron Evans <aaronmevans@gmail.com> wrote:
> Thanks.
>
> I'll try to test this over the next couple of nights or this weekend.
> Hopefully my wife doesn't go into labour before then.  :)  I'll let
> you know what I find.
>
> On 8/23/06, David Sean Taylor (JIRA) <jetspeed-dev@portals.apache.org> wrote:
> >     [ http://issues.apache.org/jira/browse/JS2-449?page=comments#action_12430047
]
> >
> > David Sean Taylor commented on JS2-449:
> > ---------------------------------------
> >
> > Aaron,  Ive checked in the initial implementation. Please test when you get a chance.
> > Note that  if you test with the Pick A Number portlet, it is using the session to
cache prefs,
> > so its not a good test of prefs, because of that other problem we discussed with
session termination.
> > Please let us know how your testing went...
> >
> > > User Specific Preferences
> > > -------------------------
> > >
> > >                 Key: JS2-449
> > >                 URL: http://issues.apache.org/jira/browse/JS2-449
> > >             Project: Jetspeed 2
> > >          Issue Type: Improvement
> > >          Components: Portlet Registry
> > >    Affects Versions: 2.1-dev
> > >            Reporter: David Sean Taylor
> > >         Assigned To: David Sean Taylor
> > >             Fix For: 2.1-dev
> > >
> > >
> > > Preferences should be user-specific on all pages.
> > > If User A comes to page /roles/X/x.psml, and stores a pref P1 on portlet x1,
and then User B comes to page /roles/X/x.psml, and also stores a pref P1 on portlet x1, the
prefs for those two users should be different.
> > > I am considering making this feature optional, but the problem is that the
semantics are intrinsic in the data model.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > For more information on JIRA, see: http://www.atlassian.com/software/jira
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message