You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by James Liao <ji...@gmail.com> on 2005/07/06 10:07:33 UTC

Does J2 support portlet preference personalize?

Hi all,
Does J2 support portlet preference personalize?
Think about the following scenario:
Both user A and B have the same weather forecast portlet on their own
page. User A want to see city A, B and C weather, while user B would
like to see city D, E and F. The city could be configurated by portlet
preferences.

When user A login and view the weather forecast portlet, he will got
city A, B and C's weather. When user B login and view the weather
forecast portlet, she should got city D, E and F's weather.

It that possible in current J2? or will it be supported in future?

Thanks,
- James Liao

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


Re: Does J2 support portlet preference personalize?

Posted by David Sean Taylor <da...@bluesunrise.com>.
James Liao wrote:
> Hi all,
> Does J2 support portlet preference personalize?

Yes

> Think about the following scenario:
> Both user A and B have the same weather forecast portlet on their own
> page. User A want to see city A, B and C weather, while user B would
> like to see city D, E and F. The city could be configurated by portlet
> preferences.

That is supported

> 
> When user A login and view the weather forecast portlet, he will got
> city A, B and C's weather. When user B login and view the weather
> forecast portlet, she should got city D, E and F's weather.
> 
> It that possible in current J2? or will it be supported in future?
>

What may be confusing, is the behavior of preferences on shared pages, 
such as page located in the root / psml directory i.e. pages not located 
under the user's psml tree. On these pages, preferences are shared 
amongst users. There are two valid use cases for preferences on pages:

1. where prefs are shared
2. where prefs are user specific, even on shared pages

This 2nd case is not currently supported, since prefs are stored based 
on the entity key, which does not include the user as part of the key.


-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

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


Re: Does J2 support portlet preference personalize?

Posted by James Liao <ji...@gmail.com>.
Hi david,
Sorry for bother you again.
I have worked it out. The cause of the following problem is that I
copy the same default-page.psml for both user a and b. Once I remove
the iframe portlet and add it by portlet selector, all the problems
are solved.

I seems that the key point for a portlet is fragment id must not be
the same in a PSML page:
<fragment id="P-104eef130e6-10003" type="portlet" name="demo::IFramePortlet">
  <property name="row" value="0" layout="TwoColumns" /> 
  <property name="column" value="1" layout="TwoColumns" /> 
</fragment>

I think J2 is powerful enough for me!
Thank you very much!!!!!

-James Liao


On 7/7/05, James Liao <ji...@gmail.com> wrote:
> David,
> Thanks for all your responses.
> I have followed your suggestion to test it, but still feel confused.
> 1. I create two users A and B.
> 2. I give both of them j1 profile.
> 3. I create two folders named a and b in %J2_HOME%\WEB-INF\pages\_user\
> 4. I put default-page.psml into both of above folders. It is like this:
>    pages
>            _user
>                      a\default-page.psml (page owner a)
>    pages
>            _user
>                      b\default-page.psml (page owner b)
> 5. I login as user A, enter the edit mode and remove a portlet from
> page. It will not affect user B's default-page.psml. So I think they
> are not shared pages, they are private pages. Is that right?
> 
> 6. There is iframe portlet on both of user A's default-page.psml and
> user B's default-page.psml. I change iframe portlet's src preference
> on user A's default-page.psml. when I login as user B and view his own
> default-page.psml, I found the iframe portlet's src preference is the
> same as user A's.
> 
> Am I doing something wrong? What I want to see is the preference
> change of user A's portlet will not be reflected to user B.
> 
> Could you please give me more detail about what is a shared page and
> what is a private page?
> 
> Thanks!
> 
> - James Liao
> 
> 
> 
> On 7/7/05, David Pankros <dp...@miragy.com> wrote:
> > > The edit mode button is NOT hidden based on the criteria "unless
> > > you're admin"
> > Well, I didn't mean to imply username was the criteria, if that's the
> > impression I gave.  I really expected to be role-based.
> >
> > > First, the portlet.xml descriptor determines whether edit mode is even
> > > supported.
> > Yes, I know that.  My portlets correctly declare their modes in the
> > portlet.xml, as per the spec.
> >
> > > Second, Jetspeed uses declarative security to secure access to
> > > portlets (and pages).
> > >
> > > Edit mode buttons are hidden based on the above criteria.
> > Well, I guess that's my fault.  Last time I checked, I couldn't find any
> > docs on the declarative constraints and had no idea what the allowable
> > values were or if there WERE other values.  Now I see they're in:
> > http://portals.apache.org/jetspeed-2/bronco.html#Declarative_and_Global_
> > Constraints
> >
> > For my custom pages, I just modified the default page, which used
> > public-view and not public-edit, as I would have expected.
> >
> > Sorry about the confusion.  I'm off to change that now...
> >
> > Dave
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.323 / Virus Database: 267.8.9/42 - Release Date: 7/6/2005
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
>

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


Re: Does J2 support portlet preference personalize?

Posted by James Liao <ji...@gmail.com>.
David,
Thanks for all your responses.
I have followed your suggestion to test it, but still feel confused.
1. I create two users A and B. 
2. I give both of them j1 profile.
3. I create two folders named a and b in %J2_HOME%\WEB-INF\pages\_user\
4. I put default-page.psml into both of above folders. It is like this:
   pages
           _user
                     a\default-page.psml (page owner a)
   pages
           _user
                     b\default-page.psml (page owner b)
5. I login as user A, enter the edit mode and remove a portlet from
page. It will not affect user B's default-page.psml. So I think they
are not shared pages, they are private pages. Is that right?

6. There is iframe portlet on both of user A's default-page.psml and
user B's default-page.psml. I change iframe portlet's src preference
on user A's default-page.psml. when I login as user B and view his own
default-page.psml, I found the iframe portlet's src preference is the
same as user A's.

Am I doing something wrong? What I want to see is the preference
change of user A's portlet will not be reflected to user B.

Could you please give me more detail about what is a shared page and
what is a private page?

Thanks!

- James Liao



On 7/7/05, David Pankros <dp...@miragy.com> wrote:
> > The edit mode button is NOT hidden based on the criteria "unless
> > you're admin"
> Well, I didn't mean to imply username was the criteria, if that's the
> impression I gave.  I really expected to be role-based.
> 
> > First, the portlet.xml descriptor determines whether edit mode is even
> > supported.
> Yes, I know that.  My portlets correctly declare their modes in the
> portlet.xml, as per the spec.
> 
> > Second, Jetspeed uses declarative security to secure access to
> > portlets (and pages).
> >
> > Edit mode buttons are hidden based on the above criteria.
> Well, I guess that's my fault.  Last time I checked, I couldn't find any
> docs on the declarative constraints and had no idea what the allowable
> values were or if there WERE other values.  Now I see they're in:
> http://portals.apache.org/jetspeed-2/bronco.html#Declarative_and_Global_
> Constraints
> 
> For my custom pages, I just modified the default page, which used
> public-view and not public-edit, as I would have expected.
> 
> Sorry about the confusion.  I'm off to change that now...
> 
> Dave
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.9/42 - Release Date: 7/6/2005
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
>

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


RE: Does J2 support portlet preference personalize?

Posted by David Pankros <dp...@miragy.com>.
> The edit mode button is NOT hidden based on the criteria "unless
> you're admin"
Well, I didn't mean to imply username was the criteria, if that's the
impression I gave.  I really expected to be role-based.

> First, the portlet.xml descriptor determines whether edit mode is even
> supported.
Yes, I know that.  My portlets correctly declare their modes in the
portlet.xml, as per the spec.

> Second, Jetspeed uses declarative security to secure access to
> portlets (and pages).
> 
> Edit mode buttons are hidden based on the above criteria.
Well, I guess that's my fault.  Last time I checked, I couldn't find any
docs on the declarative constraints and had no idea what the allowable
values were or if there WERE other values.  Now I see they're in:
http://portals.apache.org/jetspeed-2/bronco.html#Declarative_and_Global_
Constraints

For my custom pages, I just modified the default page, which used
public-view and not public-edit, as I would have expected.

Sorry about the confusion.  I'm off to change that now...

Dave

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.9/42 - Release Date: 7/6/2005
 


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


Re: Does J2 support portlet preference personalize?

Posted by David Sean Taylor <da...@bluesunrise.com>.
David Pankros wrote:
>>AFAIK, preferences are stored according to portlet and user keys, as
>>says PLT.14.2:
>>
>>"Portlet Specification assumes preference attributes are user
>>specific,..."
> 
> 
> Then why is the edit mode button, which is generally used for setting
> preferences, hidden unless you're admin?

The edit mode button is NOT hidden based on the criteria "unless you're 
admin"

First, the portlet.xml descriptor determines whether edit mode is even 
supported.

Second, Jetspeed uses declarative security to secure access to portlets 
(and pages).

Edit mode buttons are hidden based on the above criteria.

>  It was my understanding that
> users SHOULD be able to set their own preferences, but the default
> "tigris" portlet decorators don't seem to agree with that concept.
> 
> IMHO, either the preferences are NOT user-specific, or the decorator
> should always allow the user to enter edit mode when the portlet says it
> supports edit.  (Obviously, I support the latter suggestion.)
> 
> Just my $0.02.
> 
> Dave
> 
> 

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

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


RE: Does J2 support portlet preference personalize?

Posted by David Pankros <dp...@miragy.com>.
> AFAIK, preferences are stored according to portlet and user keys, as
> says PLT.14.2:
> 
> "Portlet Specification assumes preference attributes are user
> specific,..."

Then why is the edit mode button, which is generally used for setting
preferences, hidden unless you're admin?  It was my understanding that
users SHOULD be able to set their own preferences, but the default
"tigris" portlet decorators don't seem to agree with that concept.

IMHO, either the preferences are NOT user-specific, or the decorator
should always allow the user to enter edit mode when the portlet says it
supports edit.  (Obviously, I support the latter suggestion.)

Just my $0.02.

Dave


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.9/42 - Release Date: 7/6/2005
 


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


Re: Does J2 support portlet preference personalize?

Posted by Randy Watler <wa...@wispertel.net>.
James,

AFAIK, preferences are stored according to portlet and user keys, as 
says PLT.14.2:

"Portlet Specification assumes preference attributes are user specific,..."

Randy

James Liao wrote:

>Hi all,
>Does J2 support portlet preference personalize?
>Think about the following scenario:
>Both user A and B have the same weather forecast portlet on their own
>page. User A want to see city A, B and C weather, while user B would
>like to see city D, E and F. The city could be configurated by portlet
>preferences.
>
>When user A login and view the weather forecast portlet, he will got
>city A, B and C's weather. When user B login and view the weather
>forecast portlet, she should got city D, E and F's weather.
>
>It that possible in current J2? or will it be supported in future?
>
>Thanks,
>- James Liao
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>
>  
>



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