No subject

2018-12-22 Thread Pascal-Eric Servais
Unsubscribe 

[no subject]

2009-07-07 Thread LucaGraf
Hi,

today i seeing some confusing behavior with the  component. If i 
"reset" the pagination with the setFirst(0) method of the table component, the 
table will be rerendered correct and the first page is shown. But if you call 
the setFirst() method from another page then the first the generated "row id's" 
start with 20 instead of 0. (xxx:yyy:20:zzz)

Thats looks not so critical on the first sight ... But i use the id/index  to 
toggle some detail informations of an row/item via JavaScript onmouseover.
This works nice, as long i don't call the setFirst() method to jump to the 
first page. After that i have no chance to match the index with the generated 
id because the index and the generated id's are different. (the generated id's 
start with 20 instead 0)

Another bit confusing thing is that "varStatus.index" get counted over the 
whole result. But the generated "row id's" contains only numbers for one page 
(from 0 to rows-1) so you must additionally store the start index of your 
current page to calculate the "right" index that will match with an generated 
id.

Is call setFirst() not enough to reset the pagination of an ?
Or this is an Bug and i should open an issue in the jira?


Cheers Luca


Here is an simple example (I can provide this as eclipse project, too):


   
  

 
   
  
   
   
   
   
   
   
   
  





public class TrinidadTableHandler
{

private static final int ROWS_PER_PAGE = 20;
   
private CoreTable dataTable;
private int currentStartIndex = 0;
private int currentEndIndex   = ROWS_PER_PAGE -1;
   
private List searchResult;
   

public TrinidadTableHandler() { }

   
public String reset()
{
setCurrentStartIndex(0);
setCurrentEndIndex(ROWS_PER_PAGE - 1);
getDataTable().setFirst(0);
return "success";
}
   
public void pageChangedListener(RangeChangeEvent rce)
{
setCurrentStartIndex(rce.getNewStart());
setCurrentEndIndex(rce.getNewEnd());
}
   
public List getSearchResult()
{
if(null == searchResult)
{
searchResult = new ArrayList();
for(int i=0;i<500;i++)
{
searchResult.add(new Item("Item_" + i, "Detail_" + i));
}
}
return searchResult;
}

...
}
-- 
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02


[no subject]

2009-05-21 Thread Konovalov, Oleg
Hi,

I am new to JSF.
Trying to build prototype i18n JSF app with MyFaces 1.1.5
Mostly care about IE6/7, do not officially support other browsers.

I do have resource bundles, it is localized and internationalized.
So user is supposed to work in either English or Russian.

It all works except a few issues:
1) When user enters something in Russian in inputText field on the first page,
trying to pass it to the next page via managed bean.
But guess what: instead of showing it in Russian,
it shows some garbled text in outputText or outputLabel: Îëåã
FF3 & Chrome show it as: Олег
It does pick up labels from correct bundle on the next page.
Actually, when I switch locale on the same first page, getting the same problem 
in inputText (after page refresh on changing locale).
Is that incorrect encoding or broken Unicode or locale? How can we fix that ?

Less important issues:
2) When we switch locale (correct values in bundles), on the screen it can not 
change currencyCode, currencySymbol, TimeZone,
it always shows the first one it picked, although dateTime and Number 
formatting changes correctly;

3) In IE6 "alt" attribute produces garbled characters in Russian (black 
vertical squares),
looks like IE6 bug; FF3 & Chrome work fine. Please help !

TIA,
Oleg
Email: oleg.konova...@citi.com