You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by Chris Geer <ch...@cxtsoftware.com> on 2012/07/07 00:43:48 UTC

PageType

I'm struggling with PageType at the moment. Right now it's an enum with
three values defined: "USER", "PERSON_PROFILE" and "SUBPAGE". I have a need
to create a new template page similar to Person Profile however there isn't
really an easy way to create/reference that page. If I make a USER page it
shows up as a tab and the other types don't really make sense. I realize I
can overwrite the PageType class but that doesn't really feel like the best
long term approach to stay in sync with Rave developments.

I think there are two options:
1) Create another PageType called STATIC or something like that.
2) Add an attribute to the Page table to tell some User pages not to render
as tabs. (This might make PERSON_PROFILE not needed as well)

Thoughts?

Chris

RE: PageType

Posted by "Franklin, Matthew B." <mf...@mitre.org>.
>-----Original Message-----
>From: jashaj@gmail.com [mailto:jashaj@gmail.com] On Behalf Of Jasha
>Joachimsthal
>Sent: Saturday, July 07, 2012 2:28 AM
>To: dev@rave.apache.org
>Subject: Re: PageType
>
>On 7 July 2012 00:43, Chris Geer <ch...@cxtsoftware.com> wrote:
>
>> I'm struggling with PageType at the moment. Right now it's an enum with
>> three values defined: "USER", "PERSON_PROFILE" and "SUBPAGE". I have a
>need
>> to create a new template page similar to Person Profile however there isn't
>> really an easy way to create/reference that page. If I make a USER page it
>> shows up as a tab and the other types don't really make sense. I realize I
>> can overwrite the PageType class but that doesn't really feel like the best
>> long term approach to stay in sync with Rave developments.
>>
>> I think there are two options:
>> 1) Create another PageType called STATIC or something like that.
>> 2) Add an attribute to the Page table to tell some User pages not to render
>> as tabs. (This might make PERSON_PROFILE not needed as well)
>>
>> Thoughts?
>>
>> Chris
>>
>
>The reason behind the enum was that the page types are needed during the
>initialisation of the portal. If you don't use the initial_data.sql script,
>the portal couldn't start. See [RAVE-478]. The initial_data.sql cannot be
>used for Oracle or PostgeSQL databases.
>The enum is not flexible at all, so in the longer term we need a different
>solution. The pagetypes can be brought back to the database if other
>classes can handle an empty result, e.g. by using a default value if the
>pagetype table does not contain any value.

It seems to me that the PageType should really be more related to the render time definition of the page and not part of the model that stores widgets, preferences and relations to regions.  IMO, we really need to spend the time to work through what we really want in a page model.  

Anyone have thoughts to contribute to the model isolation or page model proposals in the wiki?

>
>[RAVE-478] https://issues.apache.org/jira/browse/RAVE-478
>
>Jasha

Re: PageType

Posted by Jasha Joachimsthal <ja...@apache.org>.
On 7 July 2012 00:43, Chris Geer <ch...@cxtsoftware.com> wrote:

> I'm struggling with PageType at the moment. Right now it's an enum with
> three values defined: "USER", "PERSON_PROFILE" and "SUBPAGE". I have a need
> to create a new template page similar to Person Profile however there isn't
> really an easy way to create/reference that page. If I make a USER page it
> shows up as a tab and the other types don't really make sense. I realize I
> can overwrite the PageType class but that doesn't really feel like the best
> long term approach to stay in sync with Rave developments.
>
> I think there are two options:
> 1) Create another PageType called STATIC or something like that.
> 2) Add an attribute to the Page table to tell some User pages not to render
> as tabs. (This might make PERSON_PROFILE not needed as well)
>
> Thoughts?
>
> Chris
>

The reason behind the enum was that the page types are needed during the
initialisation of the portal. If you don't use the initial_data.sql script,
the portal couldn't start. See [RAVE-478]. The initial_data.sql cannot be
used for Oracle or PostgeSQL databases.
The enum is not flexible at all, so in the longer term we need a different
solution. The pagetypes can be brought back to the database if other
classes can handle an empty result, e.g. by using a default value if the
pagetype table does not contain any value.

[RAVE-478] https://issues.apache.org/jira/browse/RAVE-478

Jasha