You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Chris Kimpton <ki...@yahoo.com> on 2002/03/19 23:06:34 UTC

role based psml and customiser

Hi,

I am using role based psml and then trying to customize the users
setup - but I am getting an NPE:

[Tue Mar 19 22:00:38 GMT+00:00 2002] -- ERROR --
Turbine.handleException: null
[Tue Mar 19 22:00:38 GMT+00:00 2002] -- ERROR --
  Exception:  java.lang.NullPointerException
  Stack Trace follows:
  java.lang.NullPointerException
  at java.util.Hashtable.put(Hashtable.java(Compiled Code))
  at
org.apache.tomcat.session.StandardSession.setAttribute(StandardSession.java:731)
  at
org.apache.tomcat.session.StandardSession.putValue(StandardSession.java:637)
  at
org.apache.jetspeed.modules.actions.controls.Customize.doPerform(Customize.java:119)
  at org.apache.turbine.modules.Action.perform(Action.java:87)
  at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
  at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
  at org.apache.turbine.modules.Page.build(Page.java:90)
  at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
  at org.apache.turbine.Turbine.doGet(Turbine.java:574)


It looks like the Customize action is not handling this situation.

Should this work? 

TIA,
Chris

=====
http://www.soccer2002.org.uk - join in and win CA$H!

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: role based psml and customiser

Posted by Paul Spencer <pa...@apache.org>.

Chris Kimpton wrote:

> Hi,
> 
> --- Paul Spencer <pa...@apache.org> wrote:
> 
>>
>>What is the goal?
>>
>>If the goal is to user the Role PSML as a template for new users,
>>then 
>>Yes copy the psml to the user directory.
>>
>>
> 
> The goal is to have a default psml for logged in users (via the
> role), without the hassle (?) of maintaining psml for each user - but
> allow the user to customise (add/move/remove) their setup if they
> really want to.


If the user is allowed user add/move/remove a portlet, then a PSML must 
be maintained for each user that has added/moved/removed a portlet.  For 
user that have not added/moved/removed a portlet, then they will 
continue to share he PSML in the role.

> 
> Thus if the user gets any problems, I can just delete their user psml
> and let them start again.
> 
> Plus I don't like the fact that you get a horrible exception when you
> click customise  :-(


Agreed

> 
> I will have a look at it.
> 
> Chris
> 
> PS David - thanks for the info on this in the other mail.
> 


Paul Spencer



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: role based psml and customiser

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

--- Paul Spencer <pa...@apache.org> wrote:
> 
> 
> What is the goal?
> 
> If the goal is to user the Role PSML as a template for new users,
> then 
> Yes copy the psml to the user directory.
> 

The goal is to have a default psml for logged in users (via the
role), without the hassle (?) of maintaining psml for each user - but
allow the user to customise (add/move/remove) their setup if they
really want to.

Thus if the user gets any problems, I can just delete their user psml
and let them start again.

Plus I don't like the fact that you get a horrible exception when you
click customise  :-(

I will have a look at it.

Chris

PS David - thanks for the info on this in the other mail.

=====
http://www.soccer2002.org.uk - join in and win CA$H!

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: role based psml and customiser

Posted by Paul Spencer <pa...@apache.org>.

Chris Kimpton wrote:

> Hi,
> 
> --- David Sean Taylor <da...@bluesunrise.com> wrote:
> 
>>Customisation doesn't work for any pages except the default page.
>>I've started on adding page params to every request with
>>JetspeedTemplateLink.
>>
> 
> I think we are talking about slightly different things here - I think
> your talking about amending/customising the role psml layout - which
> is fine, but not what I am after.  What I was thinking is that if a
> user that does not have his own psml layout (cos he is using role
> based psml) customises his account, then I would think that he should
> get a copy of the role psml, under his user directory and that gets
> customised.
> 
> I can have a look at that, if it is not overlapping with anyone elses
> changes?
> 


What is the goal?
If the goal is to allow the user to alter parameters on the existing 
psml, but NOT add, remove, or move portlet, then  David may have a 
better solution.

If the goal is to user the Role PSML as a template for new users, then 
Yes copy the psml to the user directory.

> 
>>Hoping to get that fixed soon, sorry....
>>
> 
> And all that money we are paying for Jetspeed and you can't get a
> simple thing like this fixed   ;-)
> 
> No worries.
> 
> TIA,
> Chris
> 


Paul Spencer


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Mail archives

Posted by David Sean Taylor <da...@bluesunrise.com>.
Sorry don't have my glasses on, try these instead:

http://nagoya.apache.org:8080/eyebrowse/SummarizeList?listId=20

http://nagoya.apache.org:8080/eyebrowse/SummarizeList?listId=21

> -----Original Message-----
> From: David Sean Taylor [mailto:david@bluesunrise.com] 
> Sent: Wednesday, March 20, 2002 11:31 PM
> To: 'Jetspeed Developers List'
> Subject: Mail archives
> 
> 
> I don't know if you've seen this:
> 
> http://nagoya.apache.org:8080/eyebrowse/SummarizeList?listId=22
> 
> And
> 
http://nagoya.apache.org:8080/eyebrowse/SummarizeList?listId=23




--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Mail archives

Posted by David Sean Taylor <da...@bluesunrise.com>.
I don't know if you've seen this:

http://nagoya.apache.org:8080/eyebrowse/SummarizeList?listId=22

And

http://nagoya.apache.org:8080/eyebrowse/SummarizeList?listId=23




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: role based psml and customiser

Posted by David Sean Taylor <da...@bluesunrise.com>.
> Make sure the PEIDs are regenerated!

Good catch thanks!
(and good timing :)



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: role based psml and customiser

Posted by Paul Spencer <pa...@apache.org>.

David Sean Taylor wrote:

> The profiler can find the psml file using its fallback.
> Look at the PSMLManager service:
> 
>     public PSMLDocument createDocument( Profile profile )
> 
> So just get the role-profile normally, clone it, and then modify the
> parameters:
> 
> 	Profile userProfile = profile.clone();
> 	userProfile.setRole(null);
> 	userProfile.setUser( current user );
> 
> And then call
> 
> 	PSMLManager.createDocument(userProfile)
> 
> 


Make sure the PEIDs are regenerated!

Paul Spencer



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: role based psml and customiser

Posted by David Sean Taylor <da...@bluesunrise.com>.
The profiler can find the psml file using its fallback.
Look at the PSMLManager service:

    public PSMLDocument createDocument( Profile profile )

So just get the role-profile normally, clone it, and then modify the
parameters:

	Profile userProfile = profile.clone();
	userProfile.setRole(null);
	userProfile.setUser( current user );

And then call

	PSMLManager.createDocument(userProfile)

> -----Original Message-----
> From: Chris Kimpton [mailto:kimptoc_mail@yahoo.com] 
> Sent: Wednesday, March 20, 2002 9:15 AM
> To: Jetspeed Developers List
> Subject: RE: role based psml and customiser
> 
> 
> Hi,
> 
> --- David Sean Taylor <da...@bluesunrise.com> wrote:
> > 
> > No problem. If I understand correctly, the customizer would 
> determine
> > that the user doesn't have a personal page, and then use the
> > role-based
> > fallback to locate the role-based page, and copy it over to the
> > user's
> > personal page. From that point on, the user would no longer be
> > using
> > role-based fallback, right :/ ?
> > 
> 
> Yep - now to see how hard it is...
> 
> Chris
> 
> =====
> http://www.soccer2002.org.uk - join in and win CA$H!
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> <mailto:jetspeed-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: role based psml and customiser

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

--- David Sean Taylor <da...@bluesunrise.com> wrote:
> 
> No problem. If I understand correctly, the customizer would
> determine
> that the user doesn't have a personal page, and then use the
> role-based
> fallback to locate the role-based page, and copy it over to the
> user's
> personal page. From that point on, the user would no longer be
> using
> role-based fallback, right :/ ?
> 

Yep - now to see how hard it is...

Chris

=====
http://www.soccer2002.org.uk - join in and win CA$H!

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: role based psml and customiser

Posted by David Sean Taylor <da...@bluesunrise.com>.

> -----Original Message-----
> From: Chris Kimpton [mailto:kimptoc_mail@yahoo.com] 
> Sent: Wednesday, March 20, 2002 12:27 AM
> To: Jetspeed Developers List
> Subject: RE: role based psml and customiser
> 
> 
> Hi,
> 
> --- David Sean Taylor <da...@bluesunrise.com> wrote:
> > Customisation doesn't work for any pages except the default 
> page. I've 
> > started on adding page params to every request with 
> > JetspeedTemplateLink.
> 
> I think we are talking about slightly different things here - 
> I think your talking about amending/customising the role psml 
> layout - which is fine, but not what I am after.  What I was 
> thinking is that if a user that does not have his own psml 
> layout (cos he is using role based psml) customises his 
> account, then I would think that he should get a copy of the 
> role psml, under his user directory and that gets customised.
> 
> I can have a look at that, if it is not overlapping with 
> anyone elses changes?

No problem. If I understand correctly, the customizer would determine
that the user doesn't have a personal page, and then use the role-based
fallback to locate the role-based page, and copy it over to the user's
personal page. From that point on, the user would no longer be using
role-based fallback, right :/ ?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: role based psml and customiser

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

--- David Sean Taylor <da...@bluesunrise.com> wrote:
> Customisation doesn't work for any pages except the default page.
> I've started on adding page params to every request with
> JetspeedTemplateLink.

I think we are talking about slightly different things here - I think
your talking about amending/customising the role psml layout - which
is fine, but not what I am after.  What I was thinking is that if a
user that does not have his own psml layout (cos he is using role
based psml) customises his account, then I would think that he should
get a copy of the role psml, under his user directory and that gets
customised.

I can have a look at that, if it is not overlapping with anyone elses
changes?

> 
> Hoping to get that fixed soon, sorry....

And all that money we are paying for Jetspeed and you can't get a
simple thing like this fixed   ;-)

No worries.

TIA,
Chris

=====
http://www.soccer2002.org.uk - join in and win CA$H!

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: role based psml and customiser

Posted by David Sean Taylor <da...@bluesunrise.com>.
Customisation doesn't work for any pages except the default page.
I've started on adding page params to every request with
JetspeedTemplateLink.

Hoping to get that fixed soon, sorry....

> -----Original Message-----
> From: Chris Kimpton [mailto:kimptoc_mail@yahoo.com] 
> Sent: Tuesday, March 19, 2002 2:07 PM
> To: jetspeed-dev@jakarta.apache.org
> Subject: role based psml and customiser
> 
> 
> Hi,
> 
> I am using role based psml and then trying to customize the 
> users setup - but I am getting an NPE:
> 
> [Tue Mar 19 22:00:38 GMT+00:00 2002] -- ERROR --
> Turbine.handleException: null
> [Tue Mar 19 22:00:38 GMT+00:00 2002] -- ERROR --
>   Exception:  java.lang.NullPointerException
>   Stack Trace follows:
>   java.lang.NullPointerException
>   at java.util.Hashtable.put(Hashtable.java(Compiled Code))
>   at
> org.apache.tomcat.session.StandardSession.setAttribute(Standar
> dSession.java:731)
>   at
> org.apache.tomcat.session.StandardSession.putValue(StandardSes
> sion.java:637)
>   at
> org.apache.jetspeed.modules.actions.controls.Customize.doPerfo
> rm(Customize.java:119)
>   at org.apache.turbine.modules.Action.perform(Action.java:87)
>   at
> org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
>   at
> org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPa
> ge.java:143)
>   at org.apache.turbine.modules.Page.build(Page.java:90)
>   at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
>   at org.apache.turbine.Turbine.doGet(Turbine.java:574)
> 
> 
> It looks like the Customize action is not handling this situation.
> 
> Should this work? 
> 
> TIA,
> Chris
> 
> =====
> http://www.soccer2002.org.uk - join in and win CA$H!
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   
> <mailto:jetspeed-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>