2

外部(非アンブラコ)テーブルからツリーにデータを入力する2つのカスタムセクションを作成しました。ノードの作成と削除を処理するためにITaskReturnUrlの実装を作成しました-これは正常に機能します。メニューアクション:並べ替えと移動で機能させるにはどうすればよいですか?

ノードのメニューに適切なアクションを追加しましたが、アクションをクリックすると次のエラーが発生します。

No node exists with id '1'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: No node exists with id '1'

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[ArgumentException: No node exists with id '1']
   umbraco.cms.businesslogic.CMSNode.setupNode() +239
   umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id) +36
   umbraco.dialogs.moveOrCopy.Page_Load(Object sender, EventArgs e) +1241
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   umbraco.BasePages.BasePage.OnLoad(EventArgs e) +14
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
  • フレデリク
4

1 に答える 1

1

jquery-uiを使用して独自のSort-pageを実装することにしました。

新しいページにアクセスするために、IActionインターフェイス(フルバージョン)を実装する新しいクラスを作成しました。

public string JsFunctionName
{
   get
   {
      return "OpenSortWindow();";
   }
}

public string JsSource
{
   get { return "function OpenSortWindow(){ var node = UmbClientMgr.mainTree().getActionNode();UmbClientMgr.openModalWindow('/Umbraco/Dialogs/RaceNodeSort.aspx?id='+ node.nodeId, 'Sort items', true, 350, 380); }"; }
}

javascriptは、ユーザーが要素を並べ替えることができるaspx-sideで新しいダイアログを開きます。UmbClientMgr.mainTree()。​​getActionNode()を使用して現在のノードを取得し、ページのURLに挿入したnodeIdプロパティを読み取って、これをページに渡すことに注意してください。

このアクションクラスは、次の方法でコンテキストメニューに挿入されます。

courseNode.Menu.Add(new RaceSortAction());
于 2013-02-24T13:14:19.620 に答える