| Author |
Message |
|
|
a very old problem I'm trying to solve... I've got a table, scrolled, using a <column> tag to allow row selection, and a <columns> tag to define the headers. The problem is that the headers' widths don't match the cells' widths below. For the example just look at the attached picture.
When I look at the generated HTML I'm stunned, it's so complicated... however a few things seem strange, mainly the fact that the table is built on 2 <div>, each containing a table. The first div defines the headers, the second defines the tbody. How is it possible to align headers and cells if they do not belong in the same table ???
Is this a bug ? Anyone ever had the same problem ? I also attach my JSF source and the generated html for the whole table.
Any advice is welcome !
PS: environment: liferay 5.2.3 (same problem in 5.1, 5.2.2), icefaces 1.8.1 (same problem in 1.7, 1.8.0), JDK5
|
 |
|
|
ask icefaces not to compress resources (liferay does it already), change in web.xml the following parameter:
<context-param>
<param-name>com.icesoft.faces.compressResources</param-name>
<param-value>false</param-value>
</context-param>
it worked for me...
|
 |
|
|
Hi all,
I can't export my datatables in portlets ! I didn't try in 1.8.0 but in 1.8.1 I get a ClassCast in DataExporter class, method createFile:
Code:
ServletContext context = ((HttpSession) FacesContext
.getCurrentInstance().getExternalContext().getSession(false))
.getServletContext();
The session actually inherits from PortletSession, not HttpSession...
Any idea on a work-around ? I hope this issue will be solved in the next version !
Thanks
|
 |
|
|
Hi Deryk,
this works:
Code:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:ice="http://www.icesoft.com/icefaces/component"
locale="#{sessionController.locale}">
<ice:portlet>
<ice:outputStyle href="/xmlhttp/css/xp/xp-portlet.css" />
<ice:outputStyle href="/css/broadridge.css" rel="stylesheet" type="text/html" />
<f:loadBundle basename="com.broadridge.clientselection.i18n.jsf_multitab" var="tabsmsgs" />
<ice:panelGroup>
<ice:form autocomplete="true">
<!-- Displayed Tabs -->
<ice:panelGroup styleClass="exampleBox panelTabSetContainer">
<ice:panelTabSet id="icePnlTbSet"
var="aTab"
value="#{dynamicTabbedPaneBean.tabs}"
tabPlacement="bottom"
selectedIndex="#{dynamicTabbedPaneBean.currentTab}">
<ice:panelTab label="#{aTab.title}"
title="#{aTab.title}">
<ice:panelGroup rendered="#{aTab.eventName eq tabsmsgs['customerlist.event.name']}">
<ui:include src="./AlertDisplayAll2.xhtml"></ui:include>
</ice:panelGroup>
<ice:panelGroup rendered="#{aTab.eventName eq tabsmsgs['customer.event.name']}">
<ui:include src="./AlertDisplayAlertsForClient.xhtml"></ui:include>
</ice:panelGroup>
<ice:panelGroup rendered="#{aTab.eventName eq tabsmsgs['alert.event.name']}">
<ui:include src="./AlertDisplayClientsForAlert.xhtml"></ui:include>
</ice:panelGroup>
</ice:panelTab>
</ice:panelTabSet>
</ice:panelGroup>
</ice:form>
</ice:panelGroup>
</ice:portlet>
</f:view>
But I'd like to code something like:
Code:
...
<ice:panelGroup rendered="#{aTab.visible}">
<ui:include src="#{aTab.actualPage}"></ui:include>
</ice:panelGroup>
...
My bean named "dynamicTabbedPaneBean" managed an undefined number of Tab instances each describing a page displayed in a tab.
My ultimate goal would be to provide a Bean (and a JSF page) able to display any JSF page in a tabset.
I hope this will help you understand what I intend to do... Thanks for your help.
|
 |
|
|
yes, indeed I made a mistake in the post. I actually use #.
But it does not work, it seems icefaces uses the ui:include tag statically ?
|
 |
|
|
According to me this may simply not be possible. The structure of the pages belong to the portal, and you can't just get the portal instantiate a portlet from a JSF command. Maybe it's possible by calling the portal API, however, but you still have to decide where the portlet is supposed to be displayed (Top ? bottom ? left sife of your portlet ?), and also you should be aware of what is allowed by the current layout of your Liferay page.
If I understand well the principles, your portal page must be structured via portal user interface, then portlets may exchange data between JSF pages by using ajax. I'm currently doing such things and it works fine.
However, if I'm wrong, if you find a solution please let me know I'd be most interested in it !
|
 |
|
|
Hello,
In liferay portal 5.2.3 with icefaces 1.8.1, I have developped a portlet (actually the portlet is almost nothing, the JSF page in it does the whole work, it is basically a simple panelTabset) which is designed to allow any page to be displayed as a tab in a tabset. These pages are supposed to be detail pages (eg. I have a list of Customers, I click on a Customer to see the details==> the details page appears as a Tab in this portlet).
The problem is that this portlet should be able to display almost any other page, starting from an event in the server, then an ajax push. So I can't hard code the pages' names in my tabset, I must include pages dynamically. It seems it's still not possible in icefaces... If I hard code "src='./detail.xhtml'", it works, if I code "src='${page.name}'" it won't.
Any idea ??? thanks !
|
 |
|
|
OK I noticed something strange. Say I've got 5 lines per page. I'm watching the first page, items 0 thru 4. I click on the "next page" button. The "com.icesoft.faces.component.ext.HtmlDataTable" behind the scene is called, method "setFirst(5)" which is fine, 5 is indeed the first line of the second page.
But, and that's what seems strange to me, during the render, another "com.icesoft.faces.component.ext.HtmlDataTable" is created, instead of reusing the one which is now up to date...
Is this normal ?
|
 |
|
|
I've setup a few traces. First I subclassed ListDataModel by MyRowListDataModel, which makes me able to see what happens in the method "setRowIndex". Then I have implemented a phaseListener, which allows me to observe in which phase the row index is supposed to change.
I deployed this, and clicked on the "next page" button until it worked (usually the second of third time I click on it). Here's what I'm seeing: row index is first set to -1 several (3) times then set to index of each line of the currently displayed page (0 to 4 for a page of 5 items), then last set to -1 once more, this during phases APPLY_REQUEST_VALUES, PROCESS_VALIDATIONS, UPDATE_MODEL_VALUES. It is during the phase RENDER_RESPONSE that the rowIndex is set to the index values of the next page (5 to 9 for the next page). One more "-1" (so there are 2) is done at the end of the RENDER_RESPONSE phase.
So I suppose I must now study the stacktrace and see which class sends the row index during this specific phase and see why sometimes it's OK and sometimes not...
|
 |
|
|
I just edited a basic text in a page so as to force repackaging and redeploying the whole. And, yes, liferay injects many things during deployment (not only in the web.xml, but also it adds jars and probably other things), but tell me why should it work "sometimes" !??!!? I'm puzzled, really.
I wonder if the simple fact to hot redeploy is involved in this issue. However I must admit that 4 months ago I used to work for 1 month, deploying and redeploying, without any problem. When the problem first occured, I reinstalled the liferay bundle and the bug disappeared; this work around worked fine for several weeks, but one day it was no more sufficient...
I've been trying to "touch" the problem for a long time now but I can't find any evidence that would prove if the portal is involved, or icefaces, or the browsers, or anything else.
To me it's probably a bug somewhere in my code, but I really don't know what. I've been a Java programmer for 10 years now, and I've never faced something like this.
I tried to debug directly in icefaces ,but it's a bit complicated as I'm not a specialist in JSF. I'd like to be sure the paginator receives the "next page" order, I couldn't figure this out yet.
The showcase works fine, although the portlet is only a few pixel high (just one line of text is visible in firefox 3; a few lines in IE7, dunno if it's normal). My tablemodel is a bit more sophisticated, I need to be able to customise displayed columns, sort order, nb of lines per page... I'm using facelets, this may explain that.
If you think about interesting tests likely to help me, please let me know; the same if you think I'd try to debug in some specific classes of icefaces... The bug is related to the paginator, for sure, but where can I debug "efficiently" ?
another bug is the width of columns. In my application, any table with "scrolled" set to true has its cells not aligned with the headers. Did you notice this ?
Last thing, my company should (I hope) sign a support contract, I really need someone working with me on this issue.
|
 |
|
|
I'm stunned. So let's sum up the situation...
* I'm working on a Win XP SP2 workstation (the whole runs on my workstation during dev period)
* I'm using JDK 1.6_04
* IDE: netbeans 6.5 along with portal pack
* browsers: both firefox 3 and IE7 (most often firefox 3); I installed the firefox plugin firebug 1.3.3 to help dev CSS.
* Bundle tomcat6 / liferay 5.1.2 (I intend to use Glassfish later, or JBoss, before putting into production) with pushserver 1.8.0 deployed
* and, of course icefaces 1.8.0 (but I already had the same issue with 1.7.*, without pushserver deployed separately)
I decided to reinstall the whole from scratch on a new workstation, I made it work... So I first concluded my workstation had a problem. I then copied the whole server directory on my workstation... and it worked ! So this is not a problem on my PC, nor a problem related to my browsers...
So I tried to change just a text in an xhtml, hot-deployed my application, then it didn't work any more (even after a restart of the server). Aaaaargh !
Is it possible this issue be a hot deployment issue in liferay ??? I still can't explain why it occurs...
|
 |
|
|
I'm so sorry. I have removed many things from the original project, and I did a bit of refactoring... never trust entirely the refactoring tools :-) ! I should have checked.
That should be OK now.
When you get the list click several times on the ">" next page button. It works "sometimes", at least on my workstation.
Thanks again.
|
 |
|
|
by the way there is also a strange problem with the width of the columns when the table is "scrolled" (you can set it scrolled in the preferences). the cols headers and the corresponding cells are not aligned at all...
re-thanks :-) !
|
 |
|
|
OK this is it, I attach my war file in which you'll find [a part of] my application. I enclosed the required java sources. Simply deploy it in liferay 5.1.2. I removed the classes which depended on the portal, and thoses depending on our mainframe (replaced by a "fake" implementation). I think the interesting class for you will be my tableModel (which hosts row datamodel and col datamodel).
I have developped the basics of a framework so the tablemodel is generic and is made to display standardized beans (DisplayableBean) which are able to deliver standard information on themselves, such as the i18n names of the columns and so on.
You can use the preferences screen to change the appearence of the table.
I hope this will help... otherwise I'll have to spend a bit of time to extract all this out of the portal ASAP. Please let me know if you need further explanations.
...many thanks !
|
 |
|
|
|
it's quite hard to convert to a non portal environment as I'm using services from the portal in my app... data sharing among jsf pages contained by portlets, user & user locale... But I'll take some time to remove useless classes and pages, and try to provide you with a war file easily deployable on Liferay, do you think it'll help ?
|
 |
|
|
|
|