[jboss-jira] [JBoss JIRA] Commented: (JBPORTAL-1832) -object.xml files should be orderable

narinder bansal (JIRA) jira-events at lists.jboss.org
Wed Jul 23 02:23:16 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBPORTAL-1832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12422176#action_12422176 ] 

narinder bansal commented on JBPORTAL-1832:
-------------------------------------------

i got a solution for this issue. you can create any number of  *-object.xml files for pages/subpages as you wish.
all you have do is to include your xml files for your subpages in the main -object.xml file.
i am explaining it through example. say you have a portal named helloportal. it contains two pages home and away. home contains two subpages homesubone and homesubtwo. away contains subpages awaysubone and awaysubtwo. i have created a file helloworld-object.xml which contains two pages home and away. for homesubone, homesubtwo, awaysubone,awaysubtwo i have created files homesubone-object.xml, homesubtwo-object.xml, awaysubone-object.xml and awaysubtwo-object.xml respectively. 

now you include homesubone-object.xml, homesubtwo-object.xml, awaysubone-object.xml and awaysubtwo-object.xml in helloworld-object.xml usins the following code

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd"[
   
   <!ENTITY homesubone SYSTEM "../server/default/deploy/helloworldportal.war/WEB-INF/homesubone-object.xml">
    <!ENTITY homesubtwo SYSTEM "../server/default/deploy/helloworldportal.war/WEB-INF/homesubtwo-object.xml">
	<!ENTITY awaysubone SYSTEM "../server/default/deploy/helloworldportal.war/WEB-INF/awaysubone-object.xml">
	<!ENTITY awaysubtwo SYSTEM "../server/default/deploy/helloworldportal.war/WEB-INF/awaysubtwo-object.xml">

   ]>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



then before closing the </deployments> tag in helloworld-object.xml insert following code 
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

       &homesubone;
	&homesubtwo;
	&awaysubone;
	&awaysubtwo;
	&homesubtwosub;
</deployments>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
insert  your *-object.xml files in web-inf of your war file
it is working fine on my jboss portal 2.6.5 
i am attaching files also

thanks narinder

> -object.xml files should be orderable
> -------------------------------------
>
>                 Key: JBPORTAL-1832
>                 URL: https://jira.jboss.org/jira/browse/JBPORTAL-1832
>             Project: JBoss Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.6.2 Final
>            Reporter: Sylvain FRANCOIS
>
> -object.xml files are loaded without any order rule. This makes mangement of portal/page definitions very difficult with "overwrite" mode since you can't assume if parent has already been loaded or not.
> It should be easy to fix this (I've made a temporary patch) : descriptors URL are already sorted before parsing, but their parsing results are put in a non-sorted Map (cf. org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext). 
> PS : my -object.xml files follow this structure (all with 'overwrite' mode) :
> portal-object.xml
> toppage-x-object.xml (with all its subpages)
> toppage-y-object.xml (with all its subpages)
> toppage-z-object.xml (with all its subpages)
> ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list