1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default Dynamic value provider

    Dynamic value provider


    Is there way to generate fields dynamically using ValueProvider instead specifying the fields.

    Please throw some idean on this.

  2. #2
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default Dynamic value provider

    Dynamic value provider


    Is there way to generate fields dynamically using ValueProvider instead of specifying fields.

    Please throw some idea on this.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default Dynamic value provider

    Dynamic value provider


    Is it possible to create own Custom*Impl by implementing ValueProvider<T, ?> so that this Impl can be used as per my need instead of generating own per field basis.

    Please throw some idea on this.

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    What does your data model look like? If you have a regular Java bean-like object, with fields and getters/setters to define those fields, this isn't easy - GWT doesn't have runtime reflection. The PropertyAccess interface is intended to provide some automatically generated instances for getters and setters, but you have to describe the properties you want access to.

    If your data model is a Map<String, ?>, so that you can put arbitrary objects in on the server, and want to read them out with a specific ValueProvider<T,?>, that is pretty easy to do. There are several forum posts that discuss this, as well as a blog post.

    Some forum posts on this topic (Found by searching for ValueProvider in this same forum):
    http://www.sencha.com/forum/showthre...l=1#post815861
    http://www.sencha.com/forum/showthre...l=1#post815835
    Blog post that discusses ideas around this - specifically check out the section titled ValueProvider:
    http://www.sencha.com/blog/building-gxt-charts/

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default


    Thanks for replying with links.

  6. #6
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default


    How do I check null values before configuring into ColumnConfig.

    ColumnConfig<MyProxy, Long> wParent = new ColumnConfig<MyProxy, Long>(
    (ValueProvider<? super MyProxy, Long>)(props.parent() == null ? "None"
    : props.parent()), 150, "Parent");

  7. #7
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Generated PropertyAccess instances can never return null, so such a thing isn't necessary. Or, in this case, legal Java - you can't pass a String (i.e. "None") into the ColumnConfig constructor's first argument (which expects a ValueProvider).

    What are you trying to do? Avoid drawing null? Avoid NullPointerExceptions? Can you give a specific example?

  8. #8
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default


    com.myprojet.shared.model.proxy.PersonProxy_person_personKey_ValueProviderImpl.getValue(PersonProxy_person_personKey_ValueProviderImpl.java:1)

  9. #9
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    What is the rest of the stack trace? One line doesn't tell practically anything at all.

    What does the PersonProxy class look like? What does the PropertyAccess look like?

    I believe this NPE isn't coming from calling props.parent(), it is from trying to invoke the person.getPersonKey() method or whatever, and *that* is throwing the exception.

  10. #10
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
    ramgovind is on a distinguished road

      0  

    Default


    Yes, getPersonKey throws null pointer exception as value in the database is null.

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..." hd porno faketaxi