cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] PortalFramework CocoonDocsDrafts PortalEngine Thu Feb 19 15:00:05 2004
Date Thu, 19 Feb 2004 14:00:05 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=PortalFramework , version: 9 on Thu Feb 19 13:43:43
2004 by JonEvans

- On this page I hope to build up an FAQ for developing web sites in the new Portal Engine.
+ The Portal Framework ([http://localhost:8888/samples/portal-fw/]) is considered to be "obsolete",
in that it is being replaced with the new [Portal Engine|PortalEngine].
- This is the one included with the stock Cocoon distribution at the url [http://localhost:8888/samples/portal/].
+ Some docs are available in the stock Cocoon installation, here: [http://localhost:8888/docs/developing/webapps/portal.html]
- __Q:__ In {{row.xsl}} and {{column.xsl}}, included with the portal framework, attributes
{{bgcolor}}, {{width}}, {{border}} etc. are checked for and built into the resulting table
if specified.  How do I specify them?
- 
- __A:__ In your layout xml file, like this example:
- 
- {{{
-   <composite-layout name="column">
-             
-     <!-- LEFT COLUMN -->
-     <item>
-       
-       <!-- **** Set width to 70% **** -->
-       <parameter name="width" value="70%"/>
- 
-       <!-- **** Use a red background **** -->
-       <parameter name="bgcolor" value="red"/>
- 
- 
-       <coplet-layout name="coplet">
-         <coplet-instance-data>Coplet-1</coplet-instance-data>
-       </coplet-layout>
-     </item>
-     <!-- RIGHT COLUMN -->
-     <item>
-       <!-- [...] -->
-     </item>
-   </composite-layout>
- }}}
- 
- ----
- 
- __Q:__ How do I render a particular coplet without a minimize button?
- 
- __A:__ In your copletdata xml file, you need to set the "sizable" attribute on your coplet
to false.  Like this:
- 
- {{{
-    <!-- Line wrapping adjusted to make the Wiki
-         slightly easier to read -->
-    <coplet-data id="LoginDetails" name="standard">
-       <title>box.logindetails.heading</title>
-       <coplet-base-data>URICoplet</coplet-base-data>
-       <attribute>
-       	<name>uri</name>
-       	<value
-    xsi:type="java:java.lang.String"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   >cocoon:/coplets/logindetails/coplet</value>
-       </attribute>
- 
- 
-       <aspect>
-         <name>sizable</name>
-         <value
-    xsi:type="java:java.lang.Boolean"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   >false</value>
-       </aspect>
- 
- 
-    </coplet-data>
- }}}
- 
- You will another little tip in the above example, my window renderer stylesheet renders
the title element inside {{<i18n:text></i18n:text>}} tags, so my coplet title
bars are also internationalized.
- 
- ----
- 
- __Q:__ How does my coplet know if it is being rendered in full screen (maximized) mode?
- 
- __A:__ The coplet attribute "aspectDatas/fullScreen" tells you.  In the sitemap for the
particular coplet, do something like this:
- 
- {{{
-     <map:transform src="generatelist.xsl">
-       <map:parameter name="fullscreen" 
-         value="{coplet:aspectDatas/fullScreen}"/>
-     </map:transform>
- }}}
- 
- Then, at the top of your xsl file, you can declare a parameter to receive the information:
- 
- {{{
-   <xsl:param name="fullscreen"/>
- }}}
- 
- The parameter will be set to {{true}} or {{false}} depending on the rendering mode.  You
can use this parameter in an {{xsl:if}} or {{xsl:choice}} block like this:
- 
- {{{
-   <xsl:if test="$fullscreen='true'">
-     <!-- Do some extra thing if we are in fullscreen mode -->
-   </xsl:if>
- }}}
- 
- or
- 
- {{{
-   <xsl:choice>
-     <xsl:when test="$fullscreen='true'">
-       <!-- fullscreen stuff -->
-     </xsl:when>
-     <xsl:otherwise>
-       <!-- normal window stuff -->
-     </xsl:otherwise>
-   </xsl:choice>
- }}}
- 
- ----
- 
- __Q:__ How do I flag a coplet as capable of being rendered in "edit" mode?
- 
- __A:__ Don't know yet...
- 
- ----
- 
- __Q:__ How do I create a link which switches a coplet into or out of edit mode?
- 
- __A:__ Don't know yet...
- 
- ----
- 
- __Q:__ How does my coplet know if it is being rendered in edit mode?
- 
- __A:__ Don't know yet...
- 
- 
- ----
- [Jon Evans|JonEvans]
- 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=CocoonDocsDrafts , version: 15 on Thu Feb 19
13:39:49 2004 by JonEvans

+ * [PortalEngine]


Page: http://wiki.cocoondev.org/Wiki.jsp?page=PortalEngine , version: 4 on Thu Feb 19 14:05:40
2004 by JonEvans

+ Be warned though, this might not be quite what you want.  If you have a coplet on tab 2
of your (now temporary) layout, and you click a link in it to adjust some parameter in it,
it will still revert to the first tab.  So when you render the link you will have to also
explicitly switch to the tab which you are already on (if you see what I mean).



Mime
View raw message