The Enterprise Sample relies on the CSS file for positioning of channels on the page. When creating new layouts or modifying existing layouts, review the Enterprise Sample CSS files under /var/opt/SUNWportal/portals/portal-ID/web-src/enterprise/css.
The various CSS file are available and are selected based on client browser type and client operating system. The CSS file selection logic can be found in writeCSS function in /var/opt/SUNWportal/portals/portal-ID/web-src/enterprise/js/util.js.
The Enterprise Sample supports layout=3 (THIN-WIDE-THIN) layout.
You can extend the code to support multiple layouts by modifying the table.jsp file in /var/opt/SUNWportal/portals/portal-ID/desktop/enterprise_sample/JSPTableContainerProvider/ directory.
Replace the code in the table.jsp Listing 1 with the code in Listing 2.
Listing 1
<!-- Begin Left Column of Channels --> <div class="tableContainerColumnLeft"> <dttable:getColumns id="channels" column="left" scope="request"/> <jsp:include page="column.jsp" flush="true"> <jsp:param name="columnName" value="center"/> </jsp:include> </div> <!-- End Left Column of Channels --> <!-- Begin Middle Column of Channels --> <div class="tableContainerColumnCenter""> <dttable:getColumns id="channels" column="center" scope="request"/> <jsp:include page="column.jsp" flush="true"> <jsp:param name="columnName" value="center"/> </jsp:include> </div> <!-- End Middle Column of Channels --> <!-- Begin Right Column of Channels --> <div class="tableContainerColumnRight"> <dttable:getColumns id="channels" column="right" scope="request"/> <jsp:include page="column.jsp" flush="true"> <jsp:param name="columnName" value="center"/> </jsp:include> </div> <!-- End Right Column of Channels --> |
Listing 2
You can find the original code in /var/opt/SUNWportal/portals/portal-ID/desktop/enterprise_sample/JSPTableContainerProvider/table.jsp starting at Line # 78
<dtpc:getIntegerProperty key="layout" id="layout"/> <jx:declare id="layout" type="Integer"/> <!-- start table-container --> <% if (layout == 1) { %> <!-- THIN-WIDE layout --> <!-- Begin Left Column of Channels --> <div class="tableContainerColumnLeft"> <dttable:getColumns id="channels" column="left" scope="request"/> <jsp:include page="column.jsp" flush="true"> <jsp:param name="columnName" value="left"/> </jsp:include> </div> <!-- End Left Column of Channels --> <!-- Begin Right Column of Channels --> <div class="tableContainerColumnCenter"> <dttable:getColumns id="channels" column="right" scope="request"/> <jsp:include page="column.jsp" flush="true"> <jsp:param name="columnName" value="center"/> </jsp:include> </div> <!-- End Right Column of Channels --> <% } else if (layout == 3) { %> <!-- THIN-WIDE-THIN layout --> <!-- Begin Left Column of Channels --> <div class="tableContainerColumnLeft"> <dttable:getColumns id="channels" column="left" scope="request"/> <jsp:include page="column.jsp" flush="true"> <jsp:param name="columnName" value="left"/> </jsp:include> </div> <!-- End Left Column of Channels --> <!-- Begin Middle Column of Channels --> <div class="tableContainerColumnCenter"> <dttable:getColumns id="channels" column="center" scope="request"/> <jsp:include page="column.jsp" flush="true"> <jsp:param name="columnName" value="center"/> </jsp:include> </div> <!-- Begin Right Column of Channels --> <div class="tableContainerColumnRight"> <dttable:getColumns id="channels" column="right" scope="request"/> <jsp:include page="column.jsp" flush="true"> <jsp:param name="columnName" value="right"/> </jsp:include> </div> <!-- Begin Right Column of Channels --> <% } else if (layout == 4) { %> <!-- Add custom layout here --> <% } %> </div><!-- end table-container --> |
Redeploy the portal web application using the utility: /opt/SUNWportal/bin/psadmin redeploy --adminuser amAdmin --passwordfile password-filename --portal portal-ID.
Modify the width property to change the layout of the channel column. Specify one of the following:
The channel appears in one of the thin columns.
The channel appears at the top spanning the entire horizontal space.
The channel appears at the top spanning the entire horizontal space.
The channel appears at the bottom spanning the entire horizontal space.
For example, the following specifies that a channel appears at the top spanning the entire horizontal space:
<String name="width" value="full_top”/> |
Load the display profile into LDAP by using the psadmin subcommand.
See Editing the Display Profile and Sun Java System Portal Server 7.2 Command-Line Reference.