List Info

Thread: tx:date displays incorrectly in sheets




tx:date displays incorrectly in sheets
user name
2007-09-21 09:07:52
Hi,
 
Under facelets, I have an editable sheet in which I wanted to include dates; there are two disfunctions:
  • The date button doesn't display
  • the sheet line becomes two lines high (but increasing the width doesn't display any wrapped elements)
Here9;s my code:
 

< tc:sheet

 &nbsp; &nbsp;  xmlns=" http://www.w3.org/1999/xhtml&quot;

 &nbsp; &nbsp;  xmlns:jsp=" http://java.sun.com/JSP/Page&quot;

 &nbsp; &nbsp;  xmlns:tc=" http://myfaces.apache.org/tobago/component"

 &nbsp; &nbsp;  xmlns:tx=" http://myfaces.apache.org/tobago/extension"

 &nbsp; &nbsp;  xmlns:ui=" http://java.sun.com/jsf/facelets"

 &nbsp; &nbsp;  xmlns:h=" http://java.sun.com/jsf/html&quot;

 &nbsp; &nbsp;  xmlns:f=" http://java.sun.com/jsf/core&quot;

 &nbsp; &nbsp;  columns= "*;*"

 &nbsp; &nbsp;  value ="#{contractCtrl.planning}&quot;

 &nbsp; &nbsp;  var ="intervention&quot; >

 

 &nbsp; &nbsp;  <tc:column >

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <tc:link

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; id= "workTaskDetailLink"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; image= "image/edit.PNG">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <tc:attribute

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;    name= "renderedPartially"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;    value= "editContractForm" />

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <f:facet name="popup" >

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;    <tc:popup

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; id= "editContractForm"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; height= "200px"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; width= "200px">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <tc:box label="test" ></tc:box>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;    </tc:popup >

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; </ f:facet>

 &nbsp; &nbsp;   ; &nbsp; &nbsp; </ tc:link>

 &nbsp; &nbsp;  </ tc:column>

 

 &nbsp; &nbsp;  < tc:column label ="|Categorie"; >

 &nbsp; &nbsp;   ; &nbsp; &nbsp; < tc:link

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   id ="category"

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   label ="#{intervention.category.name}&quot;

 &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   action= "contract"; />

 &nbsp; &nbsp;  </tc:column>

 

 &nbsp; &nbsp;  <tc:column label ="#{i18n.intervenant}">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <tc:link

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; id= "intervenant&quot;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; label= "#{intervention.intervenant.firstName} #{intervention.intervenant.lastName}"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; action= "contract"; />

 &nbsp; &nbsp;  </tc:column>

 

 &nbsp; &nbsp;  <tc:column label ="#{i18n.workStartDate}";>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <tx:date

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; id= "workStartDate"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; value= "#{intervention.workStart}"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; labelWidth= "10">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <f:convertDateTime pattern="dd.MM.yyyy"; />

 &nbsp; &nbsp; &nbsp; &nbsp;   ; </tx:date>

 &nbsp; &nbsp;  </tc:column>

 

 &nbsp; &nbsp;  <tc:column label ="#{i18n.workStartTime}";>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <tc:time

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; id= "workStart&quot;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; value= "#{intervention.workStart}" />

 &nbsp; &nbsp;  </tc:column>

 

 &nbsp; &nbsp;  <tc:column label ="#{i18n.workEndTime}">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <tc:time

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; id= "workEnd"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; value= "#{intervention.workEnd}&quot; />

 &nbsp; &nbsp;  </tc:column>

 

 &nbsp; &nbsp;  <tc:column label ="#{i18n.workEndDate}">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <tx:date

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; id= "workEndDate&quot;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; value= "#{intervention.workEnd}&quot;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; labelWidth= "10">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <f:convertDateTime pattern="dd.MM.yyyy"; />

 &nbsp; &nbsp; &nbsp; &nbsp;   ; </tx:date>

 &nbsp; &nbsp;  </tc:column>

 

 &nbsp; &nbsp;  <tc:column label ="#{note}">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <tc:in value ="#{intervention.note}" />

 &nbsp; &nbsp;  </tc:column>

</ tc:sheet>

 

Regards,
Zied
&nbsp;
View Original Image
Re: tx:date displays incorrectly in sheets
country flaguser name
Germany
2007-09-22 09:38:11
Hello Zied,

please try 10px for labelWidth instead of 10.

Regards

Bernd

Zied Hamdi wrote:
> Hi,
> 
> Under facelets, I have an editable sheet in which I
wanted to include dates;
> there are two disfunctions:
> 
>    - The date button doesn't display
>    - the sheet line becomes two lines high (but
increasing the width
>    doesn't display any wrapped elements)
> 
> Here's my code:
> 
> 
> <tc:sheet
> 
>       xmlns="http://www.w3.org/
1999/xhtml"
> 
>       xmlns:jsp="http://java.sun.co
m/JSP/Page"
> 
>       xmlns:tc="http
://myfaces.apache.org/tobago/component"
> 
>       xmlns:tx="http
://myfaces.apache.org/tobago/extension"
> 
>       xmlns:ui="http://java.su
n.com/jsf/facelets"
> 
>       xmlns:h="http://java.sun.co
m/jsf/html"
> 
>       xmlns:f="http://java.sun.co
m/jsf/core"
> 
>       columns="*;*"
> 
>       value="#{contractCtrl.planning}"
> 
>       var="intervention">
> 
> 
> 
>       <tc:column>
> 
>             <tc:link
> 
>                   id="workTaskDetailLink"
> 
>                   image="image/edit.PNG">
> 
>                   <tc:attribute
> 
>                        
name="renderedPartially"
> 
>                        
value="editContractForm" />
> 
>                   <f:facet
name="popup">
> 
>                         <tc:popup
> 
>                             
id="editContractForm"
> 
>                              height="200px"
> 
>                             
width="200px">
> 
>                              <tc:box
label="test"></tc:box>
> 
>                         </tc:popup>
> 
>                   </f:facet>
> 
>             </tc:link>
> 
>       </tc:column>
> 
> 
> 
>       <tc:column label="|Categorie">
> 
>             <tc:link
> 
>                   id="category"
> 
>                  
label="#{intervention.category.name}"
> 
>                   action="contract" />
> 
>       </tc:column>
> 
> 
> 
>       <tc:column
label="#{i18n.intervenant}">
> 
>             <tc:link
> 
>                   id="intervenant"
> 
>                  
label="#{intervention.intervenant.firstName} #{
> intervention.intervenant.lastName}"
> 
>                   action="contract" />
> 
>       </tc:column>
> 
> 
> 
>       <tc:column
label="#{i18n.workStartDate}">
> 
>             <tx:date
> 
>                   id="workStartDate"
> 
>                  
value="#{intervention.workStart}"
> 
>                   labelWidth="10">
> 
>                   <f:convertDateTime
pattern="dd.MM.yyyy" />
> 
>             </tx:date>
> 
>       </tc:column>
> 
> 
> 
>       <tc:column
label="#{i18n.workStartTime}">
> 
>             <tc:time
> 
>                   id="workStart"
> 
>                  
value="#{intervention.workStart}" />
> 
>       </tc:column>
> 
> 
> 
>       <tc:column
label="#{i18n.workEndTime}">
> 
>             <tc:time
> 
>                   id="workEnd"
> 
>                  
value="#{intervention.workEnd}" />
> 
>       </tc:column>
> 
> 
> 
>       <tc:column
label="#{i18n.workEndDate}">
> 
>             <tx:date
> 
>                   id="workEndDate"
> 
>                  
value="#{intervention.workEnd}"
> 
>                   labelWidth="10">
> 
>                   <f:convertDateTime
pattern="dd.MM.yyyy" />
> 
>             </tx:date>
> 
>       </tc:column>
> 
> 
> 
>       <tc:column label="#">
> 
>             <tc:in
value="#{intervention.note}" />
> 
>       </tc:column>
> 
> </tc:sheet>
> 
> 
> Regards,
> Zied
> 

Re: tx:date displays incorrectly in sheets
user name
2007-09-24 03:00:19
Thanks Bernd it works.

2007/9/22, Bernd Bohmann < bernd.bohmannatanion.com">bernd.bohmannatanion.com>:
Hello Zied,

please try 10px for labelWidth instead of 10.

Regards

Bernd

Zied Hamdi wrote:
&gt; Hi,
>
&gt; Under facelets, I have an editable sheet in which I wanted to include dates;
>; there are two disfunctions:
>
&gt; &nbsp; &nbsp;- The date button doesn't display
&gt; &nbsp; &nbsp;- the sheet line becomes two lines high (but increasing the width
&gt; &nbsp; &nbsp;doesn&#39;t display any wrapped elements)
>
> Here's my code:
>
>
> <tc:sheet
>
>; &nbsp; &nbsp; &nbsp; xmlns=&quot;http://www.w3.org/1999/xhtml &quot;
>
> &nbsp;   ;  xmlns:jsp="http://java.sun.com/JSP/Page&quot;
>
&gt; &nbsp; &nbsp; &nbsp; xmlns:tc=&quot;http://myfaces.apache.org/tobago/component "
&gt;
>&nbsp; &nbsp; &nbsp;  xmlns:tx=&quot;http://myfaces.apache.org/tobago/extension"
>
  ; &nbsp;  xmlns:ui=&quot; http://java.sun.com/jsf/facelets"
&gt;
>&nbsp; &nbsp; &nbsp;  xmlns:h=&quot;http://java.sun.com/jsf/html&quot;
>
&gt; &nbsp; &nbsp; &nbsp; xmlns:f=&quot; http://java.sun.com/jsf/core&quot;
>
> &nbsp;   ;  columns=&quot;*;*&quot;
>
>; &nbsp; &nbsp; &nbsp; value=&quot;#{contractCtrl.planning}"
>
>&nbsp; &nbsp;   ; var="intervention">
>
>
>
>  ; &nbsp; &nbsp; <tc:column>
>;
; &nbsp; &nbsp; &nbsp; &nbsp;   ; <tc:link
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  id="workTaskDetailLink";
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  image=&quot;image/edit.PNG">
>
  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; <tc:attribute
>
  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   name=";renderedPartially&quot;
>
>; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; value=&quot;editContractForm&quot; />
>
  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; <f:facet name=";popup";>
>;
; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  <tc:popup
>
>; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;id=&quot;editContractForm&quot;
>
&gt; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;  height="200px"
&gt;
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; width=";200px";>
>;
; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &lt;tc:box label=&quot;test";></tc:box>
&gt;
>&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  </tc:popup>
>;
; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; </f:facet>
>
  ; &nbsp; &nbsp; &nbsp; &nbsp;  </tc:link>
&gt;
>&nbsp; &nbsp; &nbsp;  </tc:column>
&gt;
>
>;
; &nbsp; &nbsp;  <tc:column label=&quot;|Categorie">
>
>&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <tc:link
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  id="category&quot;
>
&gt; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; label=&quot;#{intervention.category.name}&quot;
>
>; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  action=&quot;contract" />
>
  ; &nbsp;  </tc:column>
>
>
&gt;
>&nbsp; &nbsp; &nbsp;  <tc:column label=&quot;#{i18n.intervenant}&quot;>
&gt;
>&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; <tc:link
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  id="intervenant&quot;
>
> &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; label=&quot;#{ intervention.intervenant.firstName} #{
> intervention.intervenant.lastName}"
&gt;
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; action=&quot;contract" />
>
  ; &nbsp;  </tc:column>
&gt;
>
>;
>&nbsp; &nbsp; &nbsp;  <tc:column label=&quot;#{i18n.workStartDate}">
>
>&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <tx:date
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  id="workStartDate"
>;
; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; value=&quot;#{intervention.workStart }&quot;
>
>; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;  labelWidth="10&quot;>
&gt;
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <f:convertDateTime pattern=&quot;dd.MM.yyyy" />
>
  ; &nbsp; &nbsp; &nbsp; &nbsp;  </tx:date>
>
>&nbsp; &nbsp; &nbsp;  </tc:column>
&gt;
>
>;
; &nbsp; &nbsp;  <tc:column label=&quot;#{i18n.workStartTime}">
>
>&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <tc:time
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  id="workStart&quot;
>
> &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; value=&quot;#{intervention.workStart}" />
>
  ; &nbsp;  </tc:column>
&gt;
>
>;
; &nbsp; &nbsp;  <tc:column label=&quot;#{i18n.workEndTime}&quot;>
>
>&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <tc:time
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  id="workEnd";
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  value=&quot;#{intervention.workEnd}" />
>
  ; &nbsp;  </tc:column>
&gt;
>
&gt;
>&nbsp; &nbsp; &nbsp;  <tc:column label=&quot;#{i18n.workEndDate}&quot;>
&gt;
>&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; <tx:date
>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  id="workEndDate&quot;
>
> &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; value=&quot;#{ intervention.workEnd}"
>
>&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  labelWidth="10&quot;>
&gt;
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <f:convertDateTime pattern=&quot;dd.MM.yyyy" />
>
  ; &nbsp; &nbsp; &nbsp; &nbsp;  </tx:date>
&gt;
>&nbsp; &nbsp; &nbsp;  </tc:column>
&gt;
>
>;
; &nbsp; &nbsp;  <tc:column label=&quot;#&quot;>
&gt;
>&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; <tc:in value=&quot;#{intervention.note}" />
>
  ; &nbsp;  </tc:column>
>
> </tc:sheet>
>;
>
> Regards,
&gt; Zied
>



--
Zied Hamdi
zatreex.sourceforge.net
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )