07-25-2013 06:06 AM
I have made a bitmapfield and editfield and add fieldChange listener to both.
There is a save button.
I want when the user changes the bitmapfield and enter save button the particular action takes place and same with editfield.
So the problem is i don't understand how to check bitmapfield with the save buttonfield.
else if(bitmapfield==save) ///???
07-25-2013 06:26 AM
The BitmapField does not normally generate a fieldchanged notification as it is normally just displays an image and people don't click it. So you have two choices:
a) Implement a change notification in your BitmapField
b) override navigationClick in your BitmapField.
Of the two options (a) is probably the more elegant, but it is also the most code changes - so try to get (b) wotking. You have already been told about this in one of your other Threads here:
07-25-2013 06:33 AM
in my bitmapfield i have already added a navigational click and its doing different task.
What i want when the user edit the bitmapfield by adding new image and then click on save button then this image gets saved in some url.
And when the user edits the other field and click the save button then that content gets saved to some other link.
The problem is i have to use the same save button but that sends data to different url.
07-25-2013 07:07 AM
What exactly are you saving?
The actual raw bytes that make up the Birmap that is displayed, or some 'name' that is associated with the displayed image. Most people will save the 'name' since it is a lot smaller. Saving the raw byes can be done, but then you should look at how you create the Bitmap you display in the first place. If this is, for example, downloaded, then saving the URL you downloaded it from is probably OK.
Please can you describe what you want to save?
07-25-2013 07:13 AM
See i have made a profile page that contains the data from the server.
i can edit them and send the changed fields to the server.
I am getting the response from the server in string .
So i retrieve the string as image name of the server and get the Bitmap from that and place it in bitmapfield.
So when i edit the bitmapfield and click the save button the new image gets saved .
07-25-2013 07:37 AM
If I understand correctly, your profile picture is a URL, that you download.
If someone selects a new profile image, then you need to update that URL with new image. You can't do that directly from the Blackberry. You will have to send a request to the server and supply the raw bytes in whatever format the Server requires.
There will probably be a special Server request that you will have to use, and it will specify the format of the request and the type of data that it will accept. You need to review the Server documentation before you can implement this.