[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
gridcol background binding  XML
Forum Index -> Development
Author Message
rchiluano

Power User

Joined: 28/12/2017 07:21:54
Messages: 79
Offline

Hi captain,

I'd like to set gridcol background dynamically but it seems
its binding is not working?

Regards,
Ryan
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

Hi,

the GRIDCOL background only affects the grid-column-header background. The background of the cells is not affected.

Is this what you mean?

Regards, Björn

Björn Müller, CaptainCasa GmbH
rchiluano

Power User

Joined: 28/12/2017 07:21:54
Messages: 79
Offline

Hi,

No captain.
I'd like to set background for the header column only. Dynamically.

Ryan
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

Hi,

just tested:


Code:
 package test;
 
 import java.io.Serializable;
 import org.eclnt.editor.annotations.CCGenClass;
 import org.eclnt.jsfserver.pagebean.PageBean;
 
 import javax.faces.event.ActionEvent;
 
 @CCGenClass (expressionBase="#{d.C193}")
 
 public class C193
     extends PageBean 
     implements Serializable
 {
     public void onAction(javax.faces.event.ActionEvent event) 
     {
         if ("#FF0000".equals(m_backgroundColor))
             m_backgroundColor = "#00FF00";
         else
             m_backgroundColor = "#FF0000";
     }
 
     String m_backgroundColor = "#FF0000";
     public String getBackgroundColor() { return m_backgroundColor; }
     public void setBackgroundColor(String value) { this.m_backgroundColor = value; }
 
     public C193()
     {
     }
 
     public String getPageName() { return "/ztest/c193_gridcol.jsp"; }
     public String getRootExpressionUsedInPage() { return "#{d.C193}"; }
 
 }
 


and

Code:
 <t:rowtitlebar id="g_ccpreview_1" />
 <t:rowheader id="g_ccpreview_2" >
     <t:button id="g_ccpreview_3" actionListener="#{d.C193.onAction}" text="button" />
 </t:rowheader>
 <t:rowbodypane id="g_ccpreview_4" >
     <t:row id="g_ccpreview_5" >
         <t:fixgrid id="g_ccpreview_6" objectbinding="#{tobedfined}" width="100%" >
             <t:gridcol id="g_ccpreview_7" background="#{d.C193.backgroundColor}" text="Column" width="100" />
         </t:fixgrid>
     </t:row>
 </t:rowbodypane>
 <t:rowstatusbar id="g_ccpreview_8" />
 


The color changes when pressing the button/onAction...

Did I misunderstand something?

Regards, Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team