| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 22/10/2009 10:36:11
|
applefan
Joined: 03/10/2009 00:00:00
Messages: 24
Offline
|
I was testing the ice:panelBorder component to start building the interface by composition (like the Swing's panelBorder component), but I notice that the tree wasn't rendered correctly when incapsulated inside an ice:panelBorder.
I'm using SEAM 2.2.0GA with ICEFaces 1.8.1.
This is the code:
Code:
<ice:panelBorder>
<f:facet name="west">
<ice:panelGroup>
<ice:form>
<ice:tree id="tree" value="#{treeModel}" var="node"
hideRootNode="true" hideNavigation="false">
<ice:treeNode>
<f:facet name="icon">
<ice:panelGroup style="display: inline;">
<ice:graphicImage />
</ice:panelGroup>
</f:facet>
<f:facet name="content">
<ice:panelGroup
style="display: inline; #{node.userObject.selected ? 'background-color: silver' : 'background-color: white'}">
<ice:outputText
rendered="#{node.userObject.payload.class.name == 'it.scandix.assc.model.Sperimentazione'}"
style="font-weight: bold" value="#{node.userObject.text}" />
<ice:commandLink
rendered="#{node.userObject.payload.class.name == 'it.scandix.assc.model.Fase'}"
style="font-style: italic" value="#{node.userObject.text}"
actionListener="#{testTreeListener.treeListener(e, node.userObject)}">
<!-- #{node.userObject.selected ? 'background-color: lime' : 'background-color: white'} -->
</ice:commandLink>
</ice:panelGroup>
</f:facet>
</ice:treeNode>
</ice:tree>
</ice:form>
</ice:panelGroup>
</f:facet>
<f:facet name="east">
<ice:panelGroup>
<ice:outputText value="#{curFase.clsFase.tipo}"/> <br/>
<ice:outputLabel for="curSperim" value="Sperimentazione" />
<ice:outputText id="curSperim" value="#{curFase.sperimentazione.descrizione}"/>
</ice:panelGroup>
</f:facet>
</ice:panelBorder>
These are the results:
With panelBorder
Without panelBorder
Any ideas?
Thank you.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 22/10/2009 13:32:09
|
philip.breau

Joined: 08/05/2006 00:00:00
Messages: 2691
Offline
|
Hi,
I tested out a tree inside a panelBorder and couldn't replicate what you're seeing. I'd suggest making sure you have the ICEfaces CSS loaded, and remove any other styles that may be interfering.
Thanks,
Philip
|
. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 23/10/2009 03:25:32
|
applefan
Joined: 03/10/2009 00:00:00
Messages: 24
Offline
|
philip.breau wrote:
Hi,
I tested out a tree inside a panelBorder and couldn't replicate what you're seeing. I'd suggest making sure you have the ICEfaces CSS loaded, and remove any other styles that may be interfering.
Thanks,
Philip
Hi Philip,
thank you for checking it. Could you tell me how to see that I have the ICEFaces CSS loaded? I'm working by modifying a seam-gen generated project (with ICEFaces support), so I don't know if that is included and where it is referenced.
Thank you again.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 23/10/2009 09:33:22
|
philip.breau

Joined: 08/05/2006 00:00:00
Messages: 2691
Offline
|
Well, you could first check out the rendered html in the browser and see in any link tags pointing to ICEfaces CSS are in the head. If they are check with tool like Firebug that you can use to analyze the CSS to see if it's being resolved properly.
Philip
|
. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 25/10/2009 09:41:39
|
applefan
Joined: 03/10/2009 00:00:00
Messages: 24
Offline
|
philip.breau wrote:
Well, you could first check out the rendered html in the browser and see in any link tags pointing to ICEfaces CSS are in the head. If they are check with tool like Firebug that you can use to analyze the CSS to see if it's being resolved properly.
Philip
I've seen that rime.css is referenced in the head and it's being loaded. That said, I don't know how to see if it's being resolved properly...
This is an excerpt from the HTML that identifies the first child of the first node:
Code:
<img alt="" src="/ASSC/xmlhttp/css/xp/css-images/tree_line_vertical.gif" border="0">
<img alt="" src="/ASSC/xmlhttp/css/xp/css-images/tree_line_middle_node.gif" border="0">
<div class="icePnlGrp" id="j_id23:tree:n-0-0:j_id25" style="display: inline;">
<img alt="" class="iceGphImg" id="j_id23:tree:n-0-0:j_id26" src=""></div>
<div class="icePnlGrp" id="j_id23:tree:n-0-0:j_id27" style="display: inline; background-color: white;">
<a class="iceCmdLnk" href="javascript:;" id="j_id23:tree:n-0-0:j_id29" onblur="setFocus('');" onclick="var form=formOf(this);form['j_id23:_idcl'].value='j_id23:tree:n-0-0:j_id29';return iceSubmit(form,this,event);" onfocus="setFocus(this.id);" style="font-style: italic;">Tipo I.2 (3)</a>
</div>
Anyway I've found something: if I deactivate this element
Code:
Inherited from datd.icePnlBrdrWest
td {
text-align:center;
}
with Firebug (so that the two subpanels' (west and east) content is not centered but left aligned) the tree is rendered properly.
That element comes from (ProjectROOT)/stylesheet/theme.css.
I don't remember that I've ever edited or added a CSS file in this project: could it has possibily been added by seam-gen?
|
|
|
 |
|
|