This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
Stefan Haupt  
#1 Posted : Wednesday, October 24, 2007 3:35:35 PM(UTC)
Stefan Haupt

Rank: Member

Groups: Guest
Joined: 10/23/2007(UTC)
Posts: 12

Hi

I have integrated your code in a large solution. The code compiles fine but ajax actions do nothing and postbacks return ControlNotFound exceptions. Se code below (which should look familar as it is taken more or less directly from your examples):
Code:

			                        <td>
					                    <input id="ButtonCrop" onclick="Crop();" type="image" src="Images\ImageEditor\crop.jpg" /> &nbsp;
					                    <input id="ButtonRotateRight" onclick="RotateRight();" type="image" src="Images\ImageEditor\right.jpg" /> &nbsp;
					                    <input id="ButtonRotateLeft" onclick="RotateLeft();" type="image" src="Images\ImageEditor\left.jpg" /> &nbsp;
					                    <input id="ButtonBrightnessUp" onclick="BrightnessUp();" type="image" src="Images\ImageEditor\light.jpg" /> &nbsp;
					                    <input id="ButtonBrightnessDown" onclick="BrightnessDown();" type="image" src="Images\ImageEditor\dark.jpg" />
			                        </td>
		                        </tr>
			                    <tr>
				                    <td valign="top">
					                    <aur:BitmapViewer ID="viewer" runat="server" Width="344px" Height="270px" ImageLoadMode="AdaptiveTile" Rubberband="RectangleRubberband1"
						                    ZoomMode="BestFitShrinkOnly" ViewportAlignment="CenterCenter" BorderWidth="2" BorderStyle="Inset" ScrollBarsStyle="Auto" BackColor="White"> 
					                    </aur:BitmapViewer>
				                    </td>
				                    <td>
					                    &nbsp;
				                    </td>
				                    <td valign="top" width="100">
					                    <span id="SpanWarning" style="display: none; font-weight: bold; color: red">Selected
						                    area is too small to get good quality of prints. </span>
					                    <asp:CustomValidator ID="imageValidation" runat="server"></asp:CustomValidator>
				                    </td>
				                    <td>
				                        <asp:Button ID="OK" runat="server" OnCommand="UploadImage" Text="Gem" />
				                    </td>
			                    </tr>
		                    </table>
		                    <aur:RectangleRubberband ID="RectangleRubberband1" runat="server" ResizeMode="Proportional" GripsVisible="True" MaskVisible="True" />
		                    <script type="text/javascript">
			                    Sys.Application.add_load(Application_load);
		                    </script>


exception message is: Can't locate rubberband with ClientID equals 'RectangleRubberband1'.

The solution also contains other ajax components, can this be an issue?

Regards
<stefan>

Edited by user Monday, December 17, 2007 9:54:18 AM(UTC)  | Reason: Not specified

Stefan Haupt  
#2 Posted : Wednesday, October 24, 2007 6:18:50 PM(UTC)
Stefan Haupt

Rank: Member

Groups: Guest
Joined: 10/23/2007(UTC)
Posts: 12

More details: the problems seem to start in this javascript method Sys$WebForms$PageRequestManager$_onFormSubmit

In line 764, this call fails if (!this._postBackSettings.async) {, as postBackSettings is null.....
Stefan Haupt  
#3 Posted : Wednesday, October 24, 2007 6:20:43 PM(UTC)
Stefan Haupt

Rank: Member

Groups: Guest
Joined: 10/23/2007(UTC)
Posts: 12

Even though I pass 'viewer.invokeRemo....' in the javascript code shown below the .cs code is never reached

Code:
function Crop(){
	if (viewer.get_status() != GraphicsMill.UpdateStatus.busy) {
		//Process cropping via remote scripting
		var r = rectangleRubberband.get_rectangle();
		if (r.width < 1 || r.height < 1) {
			return;
		}
	
		viewer.invokeRemoteMethod("Crop", [r.x, r.y, r.width, r.height]);	

		updateRectangle=true;
	}
	else {
		alert("Please wait until previous operation will be completed.");
	}
}

Edited by user Monday, December 17, 2007 12:10:54 PM(UTC)  | Reason: Not specified

Sergey Peshekhonov  
#4 Posted : Thursday, October 25, 2007 4:09:17 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Guest
Joined: 6/5/2007(UTC)
Posts: 57

Hello, Stefan.

We confirm the problem. To get rid of this error you should move your BitmapViewer and RectangleRubberband to the root form tag of your page.

If this solution is not suitable for you please submit case.

Edited by user Thursday, May 22, 2008 3:12:41 PM(UTC)  | Reason: Not specified

Sincerely yours,
Sergey Peshekhonov.

Aurigma Technical Support Team.
Stefan Haupt  
#5 Posted : Thursday, October 25, 2007 5:06:09 PM(UTC)
Stefan Haupt

Rank: Member

Groups: Guest
Joined: 10/23/2007(UTC)
Posts: 12

Thank you, I have come to the same conclusion and this works just fine for me.

The funny part is that IE7 does not fail on ajax actions but FireFox 2 (and Safari 3) do.

Regards
Stefan Haupt  
#6 Posted : Monday, June 23, 2008 11:24:44 PM(UTC)
Stefan Haupt

Rank: Member

Groups: Guest
Joined: 10/23/2007(UTC)
Posts: 12

Hi

I have the same problem again.

We have av new framework that creates most of a page during preinit adding controls programatically. There is nothing in the .aspx file itself.

Again I get "Can't locate rubberband with ClientID equals 'rectangleRubberband'." during postbacks or ajax interactions....

Preinit occurs before the exceptions is thrown so the page structure should be present. Looking at the html confirms a control with that name is indeed present on the page.....

Please advise ;->

Stack trace is this:

[ControlNotFoundException: Can't locate rubberband with ClientID equals 'rectangleRubberband'.]
Aurigma.GraphicsMill.AjaxControls.BaseViewer.LoadPostData(String postDataKey, NameValueCollection postCollection) +855
Aurigma.GraphicsMill.AjaxControls.BitmapViewer.LoadPostData(String postDataKey, NameValueCollection postCollection) +67
Aurigma.GraphicsMill.AjaxControls.BaseViewer.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +36
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +661
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1194

Best regards
<stefan>

Edited by user Monday, June 23, 2008 11:25:56 PM(UTC)  | Reason: Not specified

Alex Kon  
#7 Posted : Wednesday, June 25, 2008 2:27:18 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Guest
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello Stefan,

Please, could you create support case for this issue and attach small code sample to reproduce the issue?
Users browsing this topic
Guest
Forum Jump  
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.