| Author |
Message |
|
|
Create a class (e.g. MyTreeNode) that extends IceUserObject
Embed it in a DefaultMutableTreeNode
[list]in your wrapped class object create a
function (like: public List<MenuItemBase> getMenumodel())
that contruct a List<MenuItemBase>
[/list]
put an ice:menuPopup in your node
example:
Code:
<ice:tree id="myTree"
value="#{BeanName.model}"
var="nodo"
actionListener="#{BeanName.treeNodeExpand}"
hideRootNode="false"
imageDir="#{sessionbean.skinPath}/css-images/"
hideNavigation="false">
<ice:treeNode>
<f:facet name="icon">
<...snip...>
</f:facet>
<f:facet name="content">
<ice:panelGroup >
<ice:commandLink value="#{nodo.userObject.text}"
actionListener="#{nodo.userObject.clickLink}" >
</ice:commandLink>
<ice:menuPopup id="qtaPupMenu" imageDir="/images">
<ice:menuItems value="#{nodo.userObject.menumodel}" />
</ice:menuPopup>
</ice:panelGroup>
</f:facet>
</ice:treeNode>
</ice:tree>
|
 |
|
|
I think it's the right way. I adopted this solution:
Code:
public class MyNoTree extends IceUserObject {
private JavaBean bean;
public MyNoTree(DefaultMutableTreeNode no, JavaBean bb) {
super(no);
bean = bb;
}
public JavaBean getBean() {
return bean;
}
public DefaultMutableTreeNode getNode() {
return getWrapper();
}
then I wrote an helper function to add a node with my bean wrapped
Code:
public MyNoTree addTreeNodo(DefaultTreeModel p_model, DefaultMutableTreeNode p_noPadre, JavaBean myBean)
DefaultMutableTreeNode mutno = new DefaultMutableTreeNode();
DefaultTreeModel l_model = p_model;
if (l_model == null)
l_model = getSession().getTreeModel();
MyNoTree notree = new MyNoTree(mutno, myBean);
int qtaFigli = p_tnPadre.getChildCount();
notree.setBranchContractedIcon(getIcoDettClosed());
notree.setBranchExpandedIcon(getIcoDettOpen());
notree.setLeafIcon(getIcoLeaf());
notree.setExpanded(false);
mutno.setUserObject(notree);
l_model.insertNodeInto(mutno, p_noPadre, qtaFigli);
return notree;
}
|
 |
|
|
Hi all
If I use a modal ice:panelPopup the modal iframe take position after my last div.
Analyzing the iframe the style is:
Code:
element.style {
background-color: black;
border-width: 0;
height: 829px;
left: -167px;
opacity: 0.5;
position: absolute;
visibility: visible;
width: 1263px;
z-index: 25000;
}
No "top" element !
I've solved this by introducing a CSS selector in my layout.css:
Code:
iframe[title='Ice Modal Frame'] {
top: 0;
opacity: 0.2;
}
I dont like it!
My question: is there a better solution rather than this one?
the other one is: opacity is not considered at all, is there a way to comunicate gamma opacity ?
Thanks in advance for any suggestions
|
 |
|
|
Hi to all
I'm trying ICEFaces-1.8.2_P03 but I found this glitch in _P02 too.
If I have a .xhtml page with a ice:dataTable like this (see Snippet One)
pay attention to my dataTable id! "TT_xxx" it's a suffix name for all other ids.
I found that when this page is rendered, the function (see Snippet Two)
Code:
UISeries.synchWithPaginator()
calls:
Code:
DataPaginator paginator = D2DViewHandler.findComponent(":" + dataPaginatorClientId, FacesContext.getCurrentInstance().getViewRoot());
but, findComponent() returns a: Code:
com.icesoft.faces.component.ext.HtmlDataTable
so I get a ClassCastException!
I think this is due to the function:
Code:
D2DViewHandler.findComponent(UIComponent uiComponent, String componentId)
particularly in the rows:
Code:
<snip...>
} else if (componentId.endsWith(child.getId())) {
component = child;
break;
<snip...>
When I get there with all my pages Ids I have:
child.getId() == "TT_xxx"
component.getId() == "pagTorTT_xxx"
This function find that Code:
componentId.endsWith(child.getId())
so I get back a HtmlDataTable and not a DataPaginator
Snippet One
Code:
Snippet One
-----------
<ice:dataTable id="TT_xxx"
value="#{beansingle.editableTableBean.listData}"
var="row"
styleClass="cisTTtable"
rowClasses="#{beansingle.editableTableBean.rowClasses}"
rows="#{beansingle.editableTableBean.rowsInPage}"
binding="#{beansingle.editableTableBean.dataTable}" >
<ice:column >
<ice:rowSelector value="#{beansingle.editableTableBean.selectedRows[row]}"
selectedClass="cisTTRowSelected"
mouseOverClass="cisTTRowOver"
immediate="true"
toggleOnInput="false"
multiple="false"
selectionListener="#{beansingle.editableTableBean.rowSelectionListener}">
<f:attribute value="#{row}" name="row" />
</ice:rowSelector>
<f:facet name="header" ...
<ice:inputText value=" ...
</ice:column>
<ice:column ... />
<ice:column ... />
</ice:dataTable>
<ice:panelGroup id="pagrpTT_xxx"
styleClass="cisTTPaginator"
rendered="#{beansingle.editableTableBean.showPaginator}">
<ice:dataPaginator id="pagTorTT_xxx"
rendered="#{beansingle.editableTableBean.showPaginator}"
rowsCountVar="rowsCount"
for="TT_xxx"
paginator="true"
renderFacetsIfSinglePage="false"
fastStep="3"
paginatorMaxPages="5" >
<f:facet name="first">
<ice:graphicImage
url="#{sessionbean.skinPath}/layout/form/arrow-first.gif"
title="#{msg.pgbtn_primapag}"/>
</f:facet>
</ice:dataPaginator>
</ice:panelGroup >
Snippet Two
Code:
Daemon Thread [http-80-4] (Suspended)
D2DViewHandler.findComponent(UIComponent, String) line: 986
D2DViewHandler.findComponent(UIComponent, String) line: 977
D2DViewHandler.findComponent(UIComponent, String) line: 977
D2DViewHandler.findComponent(UIComponent, String) line: 977
D2DViewHandler.findComponent(String, UIComponent) line: 827
HtmlDataTable(UISeries).synchWithPaginator() line: 703
HtmlDataTable(UISeries).encodeBegin(FacesContext) line: 308
HtmlDataTable.encodeBegin(FacesContext) line: 109
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 355
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 357
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 357
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 364
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 364
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 357
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 364
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
CustomComponentUtils.renderChild(FacesContext, UIComponent) line: 338
PanelStackRenderer.encodeChildren(FacesContext, UIComponent) line: 115
PanelStack(UIComponentBase).encodeChildren(FacesContext) line: 840
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 357
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 357
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 357
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 357
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 357
DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 364
GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 95
HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 840
D2DFaceletViewHandler(D2DViewHandler).renderResponse(FacesContext, UIComponent) line: 490
D2DFaceletViewHandler(D2DViewHandler).renderResponse(FacesContext, UIComponent) line: 495
D2DFaceletViewHandler(D2DViewHandler).renderResponse(FacesContext, UIComponent) line: 495
|
 |
|
|
Hi to all
I'm facing with the following problem in the ice-cc:editableTable component with a column (BigDecimal in my backing bean) rappresenting a currency.
My intention is to format the currency. I wrote the following but it does'nt work in list mode. If I edit the cell, formatting take place!
Code:
<ice-cc:textColumn
title="#{lmsg.classtitle}"
property="importo">
<f:convertNumber
currencyCode="EUR"
type="currency"
pattern="##,####0.00" />
</ice-cc:textColumn>
It would be nice if formatting appens in both mode.
Is there another way of doing it ?
Many thanks in advance for any suggestion
|
 |
|
|
Thanks brad, i'll do so, but ... It was better the other way
I found that "foo" works but other 3 if I write it in /xmlhttp/custom, i.e:
<head>
<title>Hello world !</title>
<ice:outputStyle href="/xmlhttp/custom/#{sessionbean.skinName}/#{sessionbean.skinName}.css" />
</head>
|
 |
|
|
In my skinning app I would write something like this
<head>
<title>Hello world !</title>
<ice:outputStyle href="/xmlhttp/css/#{sessionbean.skinName}/#{sessionbean.skinName}.css" />
</head>
and have a skin ComboBox with selectItems: xp, rime, royale, foo
the first 3 works fine, the forth no ... due to the check that "ServeCSSResource" does
|
 |
|
|
Hi Brad
The problem is that I found no way to have skin with another name then "xp" "rime" or "royal". You can change the appearance of "xp" "rime" and "royal" but no way to create a new skin, let say "foo" (sibling of those mentioned) because the class "ServeCSSResource" check those 3 names.
|
 |
|
|
Hi all
Is there a way to write own ICEFaces skin (let say, starting from one already existing) and avoiding error from ServeCSSResource() "Cannot find CSS file for ..." blah ?
Thanks in advance
|
 |
|
|
thank to you, Wu
It worked ! But I had to remove manually the old version ! :-!
|
 |
|
|
Hi All
I'm using MyEclipse
MyEclipse Enterprise Workbench
Version: 7.1
Build id: 7.1-20090306
I installed MyEclipse-IDE-v7.1.1-ICEfaces-v1.8.0 but in the log file I get the following ...
eclipse.buildId=unknown
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=it_IT
Command-line arguments: -os win32 -ws win32 -arch x86 -clean -clean
!ENTRY org.eclipse.update.configurator 4 0 2009-05-19 08:25:06.523
!MESSAGE Could not install bundle plugins/com.genuitec.eclipse.icefaces_7.1.0.zmyeclipse7102009030516.jar C:\WinApp\java\MyEclipse 7.1\Common\plugins\com.genuitec.eclipse.icefaces_7.1.0.zmyeclipse7102009030516.jar
!ENTRY org.eclipse.update.configurator 4 0 2009-05-19 08:25:06.629
!MESSAGE Could not install bundle plugins/com.genuitec.myeclipse.icefaces.branding_7.1.0.zmyeclipse7102009030516.jar C:\WinApp\java\MyEclipse 7.1\Common\plugins\com.genuitec.myeclipse.icefaces.branding_7.1.0.zmyeclipse7102009030516.jar
!ENTRY org.eclipse.update.configurator 4 0 2009-05-19 08:25:06.630
!MESSAGE Could not install bundle plugins/com.genuitec.myeclipse.icefaces_7.1.0.zmyeclipse7102009030516.jar C:\WinApp\java\MyEclipse 7.1\Common\plugins\com.genuitec.myeclipse.icefaces_7.1.0.zmyeclipse7102009030516.jar
!ENTRY org.eclipse.update.configurator 4 0 2009-05-19 08:25:06.690
!MESSAGE Could not install bundle plugins/com.icesoft.ide.eclipse.designtime_7.1.0.zmyeclipse7102009030516.jar C:\WinApp\java\MyEclipse 7.1\Common\plugins\com.icesoft.ide.eclipse.designtime_7.1.0.zmyeclipse7102009030516.jar
!ENTRY org.eclipse.update.configurator 4 0 2009-05-19 08:25:06.691
!MESSAGE Could not install bundle plugins/com.icesoft.ide.eclipse.icefaces.doc_7.1.0.zmyeclipse7102009030516.jar C:\WinApp\java\MyEclipse 7.1\Common\plugins\com.icesoft.ide.eclipse.icefaces.doc_7.1.0.zmyeclipse7102009030516.jar
!ENTRY org.eclipse.equinox.p2.core 4 0 2009-05-19 08:25:11.284
!MESSAGE Provisioning exception
After that there's no ICEFaces 1.8 capabilities. Any ideas would be apreciated ...
Thanks in advance
|
 |
|
|