Welcome Guest Search | Active Topics | Sign In | Register

ColorPicker Issue Options
Aboozar
Posted: Tuesday, December 2, 2008 4:26:56 AM

Rank: Advanced Member
Groups: Member

Joined: 6/13/2007
Posts: 32
Hi,

I have the following scenario:
I have placed a colorpicker control in a page and a link which will fire

eo_GetObject('ColorPicker1').clear();
eo_GetObject('ColorPicker1').accept();

It will clear the colorpicker value in ClientSide well. However when the page is postbacked the colorpicker object shows the previous color it had before firing the client side events.

What I need to do it to clear a ColorPicker value in ClientSide and send this null value to ServerSide.

Your advise is highly appreciated.

Best Regards,
Aboozar
eo_support
Posted: Tuesday, December 2, 2008 11:06:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi,

Try to use:

eo_GetObject('ColorPicker1').setValue("");

That should clear out the value for you.

Thanks!
Aboozar
Posted: Tuesday, December 2, 2008 11:38:48 AM

Rank: Advanced Member
Groups: Member

Joined: 6/13/2007
Posts: 32
eo_support wrote:
Hi,

Try to use:

eo_GetObject('ColorPicker1').setValue("");

That should clear out the value for you.

Thanks!


No difference. Using this method also doesn't change anything.

Please advice.
eo_support
Posted: Tuesday, December 2, 2008 11:43:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi,

The same code did work for us. What version are you running?

Thanks
Aboozar
Posted: Tuesday, December 2, 2008 11:58:15 AM

Rank: Advanced Member
Groups: Member

Joined: 6/13/2007
Posts: 32
The latest.

If it works for you and the previous value will not be preserved after postback then please let me double check my end and will get back to you with sample code if the issue appeared again.

Anyway, thanks for always being available.
Aboozar
Posted: Tuesday, December 2, 2008 11:57:17 PM

Rank: Advanced Member
Groups: Member

Joined: 6/13/2007
Posts: 32
eo_support wrote:
Hi,

The same code did work for us. What version are you running?

Thanks


I tried your solution but unfortunately it didn't work.
You can download the project from this link.

Please do the followings:
1- select a color
2- press the button to postpack the page
3- click the clear link (the color will be remved)
4- press the button again to postback the page
5- after the page is loaded again you will see that instead of no color we still have the previous color in the color picker.

What we want is that when we clear the color picker in client side the value goes clear on the server side as well.

Since we are in the last stages of releasing a package and we have just noticed this bug, therefore your advice is greatly appreciated.
eo_support
Posted: Wednesday, December 3, 2008 6:00:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi,

Thank you very much for the detailed steps. We have confirmed this to be a bug (Our test did not include step 2 so it went through).

It should be fairly easy for us to fix this on our side. So we will fix it and provide a new build to you as soon as possible. If you'd prefer to stay with your current build, an easy workaround for you is to disable view state on the ColorPicker.

Thanks!
Aboozar
Posted: Wednesday, December 3, 2008 8:50:56 AM

Rank: Advanced Member
Groups: Member

Joined: 6/13/2007
Posts: 32
Thank you for taking care of the issue.
Since we need the ViewState for ColorPicker then I believe we should wait for the new build.

Please inform me once it is ready.
Aboozar
Posted: Sunday, December 7, 2008 1:13:33 AM

Rank: Advanced Member
Groups: Member

Joined: 6/13/2007
Posts: 32
Thanks to all your efforts.
We've got the new build and that bug is fixed.

Now we have discovered another bug with the ColorPicker as described below:

When you place a ColorPicker inside a CallBackPanel and set the visibility of ColorPicker to False at the first point. After a postback and when you make it visible again then it can not hold it's value after another postback.

In other words do a below steps:
1- Place a CallBackPanel
2- Place Button1 , Button2 and a ColorPicker inside the CAllBackPanel
3- Set the "visible" property of the ColorPicker to "false"
4- On Click event of Button1 set the "visible" property of ColorPicker to "true"
5- On the Click event of Button2 just write the value of the ColorPicker
6- Run the Application (you will see Button1 and Button2)
7- Click Button1 (Which will postback the page and make the ColorPicker visible)
8- Click the ColorPicker and select a color
9- Click Button2 (in order to postback the page and write the value of the ColorPicker)
10- After the page is loaded again you will see that the ColorPicker value is Empty. The expected result is that the ColorPicker should preserve its value after Postback since the EnableViewState property has been set to "True"

It looks like that when ColorPicker is within a CallBackPanel and becomes visible it can not save its value into the ViewState.

Any idea?

Best Regards,
Aboo
eo_support
Posted: Monday, December 8, 2008 7:35:58 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Thanks. We will look into it and see what we can find.
eo_support
Posted: Monday, December 8, 2008 12:21:17 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi,

Try to place a eo:ScriptManager control before the CallbackPanel in the page. That should resolve the issue for you.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.