1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    10
    Vote Rating
    0
    gaboo is on a distinguished road

      0  

    Question Unanswered: java.util.List in Grid

    Unanswered: java.util.List in Grid


    Hi there!

    I would like to make a grid from an object which has a List type attribute.
    The data object looks like this:

    Code:
    public interface Data {
    	public String getName();
    	public List<Double> getData();		// List size = 20 for example
    }
    So the grid would have 21 columns (String, Double, Double, Double....).
    Is it possible to write a PropertyAccess<Data> interface which presents all the Doubles for the grid?

    Best regards
    gaboo

  2. #2
    Sencha User
    Join Date
    May 2009
    Posts
    10
    Vote Rating
    0
    gaboo is on a distinguished road

      0  

    Default java.util.List in Grid

    java.util.List in Grid


    Hi,

    The simple answer is a custom ValueProvider like this one:

    Code:
    public class StatValueProvider implements ValueProvider<StatRow, Integer> {
    
    
    	private int month;
    	
    	public StatValueProvider(int month) {
    		this.month = month;
    	}
    
    
    	@Override
    	public Integer getValue(StatRow object) {
    		return object.getMonths().get(month);
    	}
    
    
    	@Override
    	public void setValue(StatRow object, Integer value) {
    	}
    
    
    	@Override
    	public String getPath() {
    		return null;
    	}
    
    
    }
    In this case the StatRow.getMonths() method is a List<Integer>.

    Best regards

    G.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."