|
|
Rank: Member Groups: Member
Joined: 10/24/2007 Posts: 12 Points: 6
|
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" /> <input id="ButtonRotateRight" onclick="RotateRight();" type="image" src="Images\ImageEditor\right.jpg" /> <input id="ButtonRotateLeft" onclick="RotateLeft();" type="image" src="Images\ImageEditor\left.jpg" /> <input id="ButtonBrightnessUp" onclick="BrightnessUp();" type="image" src="Images\ImageEditor\light.jpg" /> <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> </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>
|
|
Rank: Member Groups: Member
Joined: 10/24/2007 Posts: 12 Points: 6
|
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.....
|
|
Rank: Member Groups: Member
Joined: 10/24/2007 Posts: 12 Points: 6
|
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) {
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.");
}
}
|
|
Rank: Advanced Member Groups: Member
Joined: 6/6/2007 Posts: 57 Points: 45
|
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.
Sincerely yours, Sergey Peshekhonov. Aurigma Technical Support Team.
|
|
Rank: Member Groups: Member
Joined: 10/24/2007 Posts: 12 Points: 6
|
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
|
|
Rank: Member Groups: Member
Joined: 10/24/2007 Posts: 12 Points: 6
|
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>
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 388 Points: 409
|
Hello Stefan, Please, could you create support case for this issue and attach small code sample to reproduce the issue?
Best wishes, Alex.
|
|
|
Guest |