You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "dutrieux (JIRA)" <ji...@apache.org> on 2010/08/31 00:02:00 UTC

[jira] Created: (PIVOT-621) BindMapping for ImageView

BindMapping for ImageView
-------------------------

                 Key: PIVOT-621
                 URL: https://issues.apache.org/jira/browse/PIVOT-621
             Project: Pivot
          Issue Type: New Feature
          Components: wtk
    Affects Versions: 2.0
            Reporter: dutrieux
            Priority: Minor


It is possible to have the BindMapping for ImageView.
My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.

Best regards

Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-621) BindMapping for ImageView

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904715#action_12904715 ] 

Greg Brown commented on PIVOT-621:
----------------------------------

I just checked in an update that adds these methods as well as a getType() method that returns an enum representing which method the bind mapping will use. I think that addresses the use cases well - let me know what you think.


> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PIVOT-621) BindMapping for ImageView

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown resolved PIVOT-621.
------------------------------

    Fix Version/s: 2.0
       Resolution: Fixed

This is resolved but not tested - would appreciate any feedback.


> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-621) BindMapping for ImageView

Posted by "dutrieux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904737#action_12904737 ] 

dutrieux commented on PIVOT-621:
--------------------------------

Juste one think it's missing clear() method that set image to null when ImageKey is not null

> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (PIVOT-621) BindMapping for ImageView

Posted by "dutrieux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904700#action_12904700 ] 

dutrieux edited comment on PIVOT-621 at 8/31/10 2:09 PM:
---------------------------------------------------------

I think it's good to have too the URLBindMapping interface

public interface URLBindMapping {
      
        public URL toImage(Object value);

        public Object valueOf(URL image);
    }

Because if not we loose the ResourceCache and asynchronous loading of ImageView.

Or maybe you can refactory resourceCache and asynchronous of method "setImage(final URL imageURL)"  to a re-usable class for caller.

Duto

      was (Author: dutrieux):
    I think it's good to have too the URLBindMapping interface

public interface URLBindMapping {
      
        public URL toImage(Object value);

        public Object valueOf(URL image);
    }

Because if not we loose the ResourceCache and asynchronous loading of ImageView.

Duto
  
> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-621) BindMapping for ImageView

Posted by "dutrieux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904700#action_12904700 ] 

dutrieux commented on PIVOT-621:
--------------------------------

I think it's good to have too the URLBindMapping interface

public interface URLBindMapping {
      
        public URL toImage(Object value);

        public Object valueOf(URL image);
    }

Because if not we loose the ResourceCache and asynchronous loading of ImageView.

Duto

> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (PIVOT-621) BindMapping for ImageView

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904706#action_12904706 ] 

Greg Brown edited comment on PIVOT-621 at 8/31/10 2:17 PM:
-----------------------------------------------------------

It might make more sense to add two additional methods to ImageBindMapping:

public URL toImageURL(Object value);
public String toImageResourceName(Object value);

Then load() could simply call each in turn (getImage(), getImageURL(), getImageResourceName()) to see which one doesn't return null.

OTOH, it isn't difficult to load an image and set it in the resource cache - it's only a few lines of code.


      was (Author: gbrown):
    It might make more sense to add two additional methods to ImageBindMapping:

public URL toImageURL();
public String toImageResourceName();

Then load() could simply call each in turn (getImage(), getImageURL(), getImageResourceName()) to see which one doesn't return null.

OTOH, it isn't difficult to load an image and set it in the resource cache - it's only a few lines of code.

  
> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-621) BindMapping for ImageView

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904706#action_12904706 ] 

Greg Brown commented on PIVOT-621:
----------------------------------

It might make more sense to add two additional methods to ImageBindMapping:

public URL getImageURL();
public String getImageResourceName();

Then load() could simply call each in turn (getImage(), getImageURL(), getImageResourceName()) to see which one doesn't return null.

OTOH, it isn't difficult to load an image and set it in the resource cache - it's only a few lines of code.


> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (PIVOT-621) BindMapping for ImageView

Posted by "dutrieux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904728#action_12904728 ] 

dutrieux edited comment on PIVOT-621 at 8/31/10 3:24 PM:
---------------------------------------------------------

Oki that's work perfectly and nicely thx for all

      was (Author: dutrieux):
    It's seem to be perfect, I test it and feedback after
  
> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (PIVOT-621) BindMapping for ImageView

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904706#action_12904706 ] 

Greg Brown edited comment on PIVOT-621 at 8/31/10 2:16 PM:
-----------------------------------------------------------

It might make more sense to add two additional methods to ImageBindMapping:

public URL toImageURL();
public String toImageResourceName();

Then load() could simply call each in turn (getImage(), getImageURL(), getImageResourceName()) to see which one doesn't return null.

OTOH, it isn't difficult to load an image and set it in the resource cache - it's only a few lines of code.


      was (Author: gbrown):
    It might make more sense to add two additional methods to ImageBindMapping:

public URL getImageURL();
public String getImageResourceName();

Then load() could simply call each in turn (getImage(), getImageURL(), getImageResourceName()) to see which one doesn't return null.

OTOH, it isn't difficult to load an image and set it in the resource cache - it's only a few lines of code.

  
> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-621) BindMapping for ImageView

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904740#action_12904740 ] 

Greg Brown commented on PIVOT-621:
----------------------------------

Thanks for catching that - added.


> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-621) BindMapping for ImageView

Posted by "dutrieux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904728#action_12904728 ] 

dutrieux commented on PIVOT-621:
--------------------------------

It's seem to be perfect, I test it and feedback after

> BindMapping for ImageView
> -------------------------
>
>                 Key: PIVOT-621
>                 URL: https://issues.apache.org/jira/browse/PIVOT-621
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>    Affects Versions: 2.0
>            Reporter: dutrieux
>            Priority: Minor
>             Fix For: 2.0
>
>
> It is possible to have the BindMapping for ImageView.
> My exemple is when I load a Panel with a Bean which contents a Boolean, I would like to display a cross image or valid image  dependant on Boolean.
> Best regards
> Duto 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.