ExtJS Create new panel programatically

Good morning,
I am trying to create a widget in a TabPanel extending Multifield Widget, when a field in the multifield is created this one creates a new Tabpanel in the Dialog. But the Tabpanel created, its content is not looking like if the tabpanel is created in the dialog. Someone knows how create tabpanel programatically and dynamically?
    var myPanel = new CQ.MyPanel({ });
    dialog.insert(positionPreCalculated, myPanel);
    dialog.doLayout(true, true);
This code below is that I am trying to do.
Any idea would be most appreciate.
Miguel.

Hi,
There are various examples available on the internet on how to do this. Hopefully the snippet at the end should give you some push. Let us know if you face any specific issue with your implementation.
//using SPSite
//using SPWeb web
string hive = SPUtility.GetGenericSetupPath("TEMPLATE\\1033\\STS\\DOCTEMP\\SMARTPGS\\");//you can also use your application path etc.,
web.AllowUnsafeUpdates = true;
//template file name can be one of the pre-existing templates or a copy of your own
using (FileStream stream = new FileStream(hive + templateFilename, FileMode.Open))
//The webpart page will be created in the Site Pages library
SPFolder libraryFolder = web.GetFolder("SitePages");
SPFileCollection files = libraryFolder.Files;
//filename is the name of the webpart page
SPFile newFile = files.Add(fileName, stream);
SPLimitedWebPartManager wpmngr = newFile.Web.GetLimitedWebPartManager(newFile.ServerRelativeUrl, PersonalizationScope.Shared);
//use your own webpart instance here
XsltListViewWebPart webpart = new XsltListViewWebPart();
webpart.Title = web.Title;
wpmngr.AddWebPart(webpart, "FullPage", 0);
wpmngr.SaveChanges(webpart);
-Sangeetha

Similar Messages

  • I've created new User account on my PC for separate itunes library/account. Have had to change apple id to do this. When I connect to pc, itunes opens with CDs I've already loaded, but it doesn't recognise ipod. No left panel opens with devices. Help!

    Can anyone help? Two ipods with originally one itunes library and (I think) same Apple id). Now need 2 Libraries with separate account for separate buying etc. Recommended I create new library on separate PC User account which I have done together with new apple id. I have added this apple id to the ipod needing separate account. When I hook up, I can't sync. No 'Devices' left panel appears at all. I'm at a loss here so any help woudl be great. Thanks.

    If you  have iTunes 11 turn on the Sidebar. Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
    If necessary:
    iOS: Device not recognized in iTunes for Windows
    or
    iOS: Device not recognized in iTunes for Mac OS X

  • How to drag transparent swatch when creating new custom tool panel in CC 2014

    Hi guys. I'm having trouble dragging the transparent swatch over to a new panel I'm trying to create. Love the new feature, but not sure how to get this last crucial item on my toolbar:
    Thanks for helping out!

    thesergie wrote:
    Or is the main toolbar not customizable (ie I can only create custom toolbars)?
    Exactly.
    Would be nice if it were ...

  • Programatically create new mail item and open - body text lost on subsequent saves

    Hi,
    I have a problem with trying to create new GroupWise mail item from a
    button in a C3PO. I require programmatic access to this via the Object
    API, so it must be a saved draft. This is relativley straight forward to
    do - just create a mail item using the object API, and then use the Token
    API to open this item.
    This worked fine in 6.5.0, however in 6.5.1 and 6.5.2 I have noticed that
    when the user does a subsequent save, the body text of the message
    dissappears in the GUI (it is updated correctly in the draft however) -
    and all subsequent saves cause the body text to dissappear. If you close
    the mail item and open the draft manually you can continue as normal.
    As a test, I also tried to use the Token API to create a new mail item,
    and then again to save the item in the work in progress folder. This
    seems to work fine the very first time you do this, but each subsequent
    time the same behaviour is seen - i.e. the body text of the email is
    deleted from the GUI. Also, another observation here, event though the
    mail item was saved in the WIP folder via the token API command
    ItemSaveMessageDraft, it moves into the users MailBox when the user saves
    it manually.
    I have posted the two snippets of code from my test C3PO project at then
    end.
    This is a major problem, as we need to be able to reliably create new mail
    items from a toolbar button, so any help very much appreciated.
    Regards
    Greg
    Test case 1: Create a new message object in the WIP folder, and then open
    it using Token API...
    Dim sRetString As String
    Dim DraftMail As Object
    Set DraftMail =
    g_C3POManager.ClientState.CurrentAccount.WorkFolde r.Messages.Add
    ("GW.MESSAGE.MAIL", egwDraft)
    g_Commander.Execute "ItemOpen(""" & DraftMail.MessageId & """)", sRetString
    Test case 2: Create a new mail via token API, then use token API to save
    the item in the WIP folder...
    Dim sRetString As String
    ' create the new mail item...
    g_Commander.Execute "NewMail()", sRetString
    ' Get the folder path as a string..
    Dim GWFolder As Object
    Dim sAccount As String
    Dim sFolderPath As String
    sAccount = g_C3POManager.ClientState.CurrentAccount.RootFolde r.Name
    Set GWFolder = g_C3POManager.ClientState.CurrentAccount.WorkFolde r
    sFolderPath = sAccount & "\" & GWFolder.Name
    ' dirty the message so save works...
    g_Commander.Execute "ItemSetText(""X00"";Subject!;"" "")", sRetString
    g_Commander.Execute "ItemSetText(""X00"";Subject!;"""")", sRetString
    ' do the save...
    g_Commander.Execute "ItemSaveMessageDraft(""" & sFolderPath & """)",
    sRetString

    Hi,
    I have a problem with trying to create new GroupWise mail item from a
    button in a C3PO. I require programmatic access to this via the Object
    API, so it must be a saved draft. This is relativley straight forward to
    do - just create a mail item using the object API, and then use the Token
    API to open this item.
    This worked fine in 6.5.0, however in 6.5.1 and 6.5.2 I have noticed that
    when the user does a subsequent save, the body text of the message
    dissappears in the GUI (it is updated correctly in the draft however) -
    and all subsequent saves cause the body text to dissappear. If you close
    the mail item and open the draft manually you can continue as normal.
    As a test, I also tried to use the Token API to create a new mail item,
    and then again to save the item in the work in progress folder. This
    seems to work fine the very first time you do this, but each subsequent
    time the same behaviour is seen - i.e. the body text of the email is
    deleted from the GUI. Also, another observation here, event though the
    mail item was saved in the WIP folder via the token API command
    ItemSaveMessageDraft, it moves into the users MailBox when the user saves
    it manually.
    I have posted the two snippets of code from my test C3PO project at then
    end.
    This is a major problem, as we need to be able to reliably create new mail
    items from a toolbar button, so any help very much appreciated.
    Regards
    Greg
    Test case 1: Create a new message object in the WIP folder, and then open
    it using Token API...
    Dim sRetString As String
    Dim DraftMail As Object
    Set DraftMail =
    g_C3POManager.ClientState.CurrentAccount.WorkFolde r.Messages.Add
    ("GW.MESSAGE.MAIL", egwDraft)
    g_Commander.Execute "ItemOpen(""" & DraftMail.MessageId & """)", sRetString
    Test case 2: Create a new mail via token API, then use token API to save
    the item in the WIP folder...
    Dim sRetString As String
    ' create the new mail item...
    g_Commander.Execute "NewMail()", sRetString
    ' Get the folder path as a string..
    Dim GWFolder As Object
    Dim sAccount As String
    Dim sFolderPath As String
    sAccount = g_C3POManager.ClientState.CurrentAccount.RootFolde r.Name
    Set GWFolder = g_C3POManager.ClientState.CurrentAccount.WorkFolde r
    sFolderPath = sAccount & "\" & GWFolder.Name
    ' dirty the message so save works...
    g_Commander.Execute "ItemSetText(""X00"";Subject!;"" "")", sRetString
    g_Commander.Execute "ItemSetText(""X00"";Subject!;"""")", sRetString
    ' do the save...
    g_Commander.Execute "ItemSaveMessageDraft(""" & sFolderPath & """)",
    sRetString

  • Excel as a data source - Error when trying to create new univerise

    Hello,
    Running BO 4 Server (On Server Machine) and Client tools 4 (on my local laptop) . I have tried the following..
    Succesfully
    1. With the information tool  Created a project
    2.  Created a connection to  a excel file on a network drive as a source
    2. Published connection, created short cuts
    3. Created data foundation
    4. Creeated Business layers
    5. Linked all tables inserted summary etc (data can be viewed in the viewer)
    I publish everything above to the repository and everthing works perfectly.
    I have created the ODBC links to the excel file both on my local laptop and server using the 32 bit admin tool (ODBC) in windows.
    Current Issue
    When i log into the BI Launch pad and open web intellgence, i try to create new and use the univerise i have published. I receieve the following error.
    The dataSource cannot be generated for the specified dataSource name "zEmptyBusiness_Layer". (WIS 00000)
    com.businessobjects.sdk.core.server.CommunicationException$UnexpectedServerException: The dataSource cannot be generated for the specified dataSource name "zEmptyBusiness_Layer".
         at com.businessobjects.sdk.core.exception.ExceptionBuilder.make(ExceptionBuilder.java:144)
         at com.businessobjects.sdk.core.exception.ExceptionBuilder.make(ExceptionBuilder.java:101)
         at com.businessobjects.sdk.core.server.common.CommonRequestHandler.afterProcessing(CommonRequestHandler.java:127)
         at com.businessobjects.sdk.core.server.internal.AbstractServer.processIt(AbstractServer.java:178)
         at com.businessobjects.sdk.core.server.internal.AbstractServer.process(AbstractServer.java:133)
         at com.businessobjects.sdk.core.server.internal.InstanceServer.process(InstanceServer.java:94)
         at com.sap.sl.sdk.services.util.ServerRequestProcessor.processServerRequest(ServerRequestProcessor.java:49)
         at com.sap.sl.sdk.datasource.strategy.BuiltInDataSourceStrategyImpl.addDataProvider(BuiltInDataSourceStrategyImpl.java:99)
         at com.sap.sl.sdk.workspace.service.WorkspaceServiceImpl.addDataProvider(WorkspaceServiceImpl.java:77)
         at com.sap.sl.sdk.workspace.service.WorkspaceServiceImpl.addDataProvider(WorkspaceServiceImpl.java:60)
         at com.sap.webi.ui.context.managers.DataManager.addDataProviderFromDataSourceInfo(DataManager.java:382)
         at com.sap.webi.ui.tasks.workflows.AddDataProviderUITask.doIt(AddDataProviderUITask.java:106)
         at com.sap.webi.ui.tasks.workflows.AddDataProviderUITask.doIt(AddDataProviderUITask.java:19)
         at com.sap.webi.toolkit.ui.tasks.WebITask.doInBackground(WebITask.java:113)
         at javax.swing.SwingWorker$1.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at javax.swing.SwingWorker.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: com.businessobjects.sdk.core.server.ServerException: The dataSource cannot be generated for the specified dataSource name "zEmptyBusiness_Layer".
         at com.businessobjects.sdk.core.server.common.CommonRequestHandler.newServerException(CommonRequestHandler.java:260)
         at com.businessobjects.sdk.core.server.common.CommonRequestHandler.createAllServerExceptions(CommonRequestHandler.java:238)
         at com.businessobjects.sdk.core.server.common.CommonRequestHandler.afterProcessing(CommonRequestHandler.java:121)
         ... 18 more
    any help at all would be much appreciated

    Hi ,
    Go to : Control Panel - > Add / Remove Programs (or "Programs and Features" on win7) 
    looks for : SAP BusinessObjects BI Platform 4.0 Client Tool   <- that's the base install
    now look for an entry called   SAP BusinessObjects BI Platform 4.0 Client Tools  SP2  Patch2.8
    these are not automatic updates, it would require an installer be launched on your PC.
    Regards,
    H

  • How can I mass move symbols with their motion paths without creating new keyframes?

    I want to move a lot of symbols all at once if they are off centered or just need to be moved around to see differenr styles across the document, but I can't seem to move a lot of the symbols at once, only one at a time slexting their motion paths. It's rather annoying when I have items coming in at different times and have to re line everything up one by one if I want to move things even over by 1 px. Every time I slecect all my symbols and try to move them it just creates a new keyframe that they follow. Is there any tool or certian way to select the symbols and/or thier motion paths and move them without creating new key frames?

    Hi,
    There's no direct way of moving all the symbols/ motion tweens begining at different frames altogether, but the following steps should help you do it -
    1. Select a motion path on stage, goto Properties panel > Options menu (top left corner) and enable - Always show Motion Paths.
    2. Enable - Edit Multiple Frames option in the Timeline.
    3. Adjust the frame-markers in Timeline to show all your symbols, motion paths etc.
    4. Now that you see all your symbols and motion paths together, Select-all and Move them together. Or, use Shift + click to selectively select the Motion paths/objects and move them.
    Let me know if you have any doubts..
    Regards,
    Nipun

  • Aperture creating new version of image for each adjustment applied!

    To anyone out there who can sort this one out, I will be forever grateful!
    Here's the problem. I'll be jamming away in Aperture, adjusting photos like a madman. After adjusting a random number of photos (it usually varies between 5-30 photos or so after starting Aperture each time), the adjustments panel will no longer update when I click on a new image (i.e. it holds the info from the last image I adjusted and will continue to apply new adjustments to that last image even if another image is highlighted). If I switch to the metadata panel and then back to adjustments it will refresh itself and recognize the currently selected image (although I have to do this for EACH image I want to adjust once it starts acting up like this). The BIG problem is that even if I get the adjustments panel to recognize the selected image at this point, for EACH adjustment I apply it makes a new version of the image. For example, if I first change the contrast, it will make Version 2 of the image and select it (which is what it's supposed to do for the first adjustment, because I have "create new versions when making adjustments" checked in my preferences), but if I then make another adjustment like changing the saturation, it makes Version 3 of the image (from the master, so that only the saturation adjustment is applied and not the contrast adjustment). As you can imagine, this utterly destroys my once incredibly efficient Aperture workflow and makes it pretty much impossible to use Aperture for adjustments unless I turn off "create new versions when making adjustments" in the preferences, at which point it does seem to work again (although I've only tried it on a few images, so not 100% sure it will work properly even then). If I restart Aperture (or my computer), it will work normally again for a few pictures and then will start acting up again with the same problem.
    Originally I was running into this problem on my PowerBook G4, and so I figured it was just because Aperture didn't like my wussy G4 processor and was acting up when the load got too heavy (after all, the adjustments would work fine for up to 30 images or so). However I recently purchased a sexy iMac 24" 2.8 GHz and maxed out the RAM to 4GB, but I'm still getting the same darned problem with Aperture on my iMac. Yes, I'm using the same library of photos I was using on my PowerBook G4.
    This problem has been plaguing me for about 3 months now (everything else in Aperture works fine so I'm still using it to import and organize my photos, I just haven't been able to make adjustments on large groups of pictures for a while), and I've searched and searched these forums countless times to see if anyone has run into similar problems, but I've not seen a single mention of it. I've also tried EVERYTHING mentioned for similar problems (rebuilding library, vacuuming database, erasing com.apple.aperture.plist preference file, repairing permissions, reinstalling Aperture, making burnt offerings to Steve Jobs), and NOTHING is working. ARRGH!!
    For those who might have some words of wisdom to offer this delighted-***-miserably frustrated Aperture user, here are a few more details about my setup:
    I have a library of about 37,000 photos, the vast majority of them being RAW .CRW files from a Canon 10D. The 25GB library file is stored on my internal hard drive, and all photos are referenced from an external LaCie 500GB FireWire 400 hard drive. I have a LOT of export plug-ins installed in Aperture, but no image adjustment plugins. I have generated previews turned off for all projects. I've had the same problem on both my PowerBook G4 and new iMac 24" 2.8 GHz. One other thing worth mentioning is that instead of upgrading from 2.1 (which was already giving me this problem) to 2.1.2, I downloaded the full version of 2.1.2 and installed it. I noticed that my 2.1 Aperture.app file was less than 100MB, whereas the 2.1.2 Aperture.app file is over 300MB. Don't know if that's normal or not.
    The only other thing I can think of to try at this point is to load a new library into Aperture and import a large group of pictures and make adjustments to them to potentially see if my problem is being caused by Aperture or by the library. Will probably try that tomorrow.
    I would appreciate any advice or feedback anyone can offer about this nasty little problem, as it's giving me a serious hormonal imbalance.
    THANKS!

    Thanks for the reply RB, but my current workflow depends on me creating new versions when I make adjustments. I suppose as a temporary solution I will probably have to either turn this preference off or just be willing to constantly restart Aperture. At least I finally found another thread with the same problem, so finally I don't feel completely alone in the far reaches of the Aperture universe. For anyone who is interested, here is the link to that thread:
    http://discussions.apple.com/thread.jspa?messageID=8555067
    It appears this problem is closely related to the ubiquitous black viewer problem that seems to be plaguing far more users than my issue (although I've run into the black viewer problem a few times myself), as both problems force Aperture to output the following message to Console:
    Main Thread Exception in Aperture: * -NSCFArray objectAtIndex:: index (1) beyond bounds (1)
    It seems that both of these problems existed in Aperture 1 and 1.5 up until the 1.5.6 upgrade which seems to have fixed it, but then with Aperture 2 the problem seems to have returned. At least that's the gist of what I've been reading on a number of threads. Whatever the case, I hope Apple gets this sorted out in their next update!
    As it appears there is no proper answer to this problem at the moment, I'm gonna go ahead and mark this thread answered (and since you were kind enough to at least take the time to reply RB, you can be credited with the answer... thanks!).

  • Issue while creating ADF Table programatically

    Hi,
    I am trying to create a table programatically...And i implemented like below:
                RichTable phoneTable = new RichTable();
                phoneTable.setEmptyText("No Phone Details yet");
                getContactPhone(contactObj.getPhone());
                phoneTable.setValue(contactObj.getPhone());
    // contactObj.getPhone() is a ArrayList<TelephoneBOD> in pojo Object...
    // Which is taken from a Object returned from DataControl Method (Captured in pageFlowScope)
                phoneTable.setVar("row");
                // Add Columns
                RichColumn column = new RichColumn();
                column.setHeaderText("Type");
                column.setId("phoneType");
                column.setAlign("right");
                column.setWidth("100");
                // Set output.
                RichOutputText output = new RichOutputText();
                output.setValue("#{row.phoneType}");
                // Add output into column.
                column.getChildren().add(output);
                // Add column into table.
                phoneTable.getChildren().add(column);When i try to implement like this i am getting fllowing error:
    popup:
    ZIP_STATE_FAILED
    ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #2log:
    Caused By: java.io.NotSerializableException: org.ieee.internal.ws.proxy.conf.types.TelephoneBOD
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at java.util.ArrayList.writeObject(ArrayList.java:570)
         at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:239)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:241)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)I think this is happening because i am not serializing the object passing to Table. If this is the Reason.. How to serialize the object?
    Or i am missing something in the code?
    Thanks
    Thoom
    Edited by: User007 on Aug 31, 2011 1:47 PM
    Edited by: User007 on Aug 31, 2011 1:47 PM

    Thanks Timo.. for simple solution.
    Actually.. TelephoneBOD is auto-generated on creation of web service proxy from web service.
    I don't think.. updating those Java files directly is a best practice. Because they will be changing if there is any change in web service schema..
    You think there is any other way to do so?
    Thanks
    Thoom

  • Can't create new files after moving to ext drive, LR4

    I moved all photos to a new ext drive (they used to be on the c drive); reformatted my desktop computer; reinstalled LR4. 
    Now there is no parent file under the name of the ext drive on which I can right click and "create a folder inside....".  I am able to create new folders in the existing subfolders.
    There is also no way to sync the drive to find a new folder I created via Windows explorer.
    My filing system is by month and year so now with each passing month I am not able to set up a new file.
    Help!

    Can you right-click on a folder name in the Lightroom Folder Panel and select "Show Parent Folder"?
    Can you import new photos directly to the desired folder in the desired location?

  • How to create collapsible panel in flex3

    I
    How to create Collapsible panel in flex.
    If you observer above image. There are three panels.For ffirst and last panel i have provided one button where it contains open/close button.When user selects close button left panel should collapse to left hand side and the same should come to its original postion. In case of right panel is the same process except it should collapse to right side.
    Below is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()" >
    <mx:Script>
      <![CDATA[
      import flash.net.FileReference;
      import mx.controls.Menu;
      import flash.display.Stage; 
      import mx.events.MenuEvent;
      import mx.controls.Alert;
      import mx.events.ListEvent;
      import mx.managers.DragManager;
            import mx.core.DragSource;
            import mx.events.DragEvent;
      import DrawingClasses.Designer;
      [Bindable]
      [Embed(source="/images2/line.png")]
      public var linePicture:Class;
      [Bindable]
      [Embed(source="/images2/box.png")]
      public var boxPicture:Class;
      [Bindable]
      public var xm:XML =
      <AbstractComponentTemplate></AbstractComponentTemplate>;
      public var compType:XML =
       <ComponentTemplateDescriptor>
        <Owner>BackTesting</Owner>
        <Name>Component</Name>
        <Version>1</Version>
       </ComponentTemplateDescriptor>;
      [Bindable]
            private var cm:ContextMenu; 
      public var xm1:XML;
      public var loopparent:Array = new Array();
      private var mouseTarget:DisplayObject;
      private var xOff:Number;
      private var yOff:Number;
      private var designer:Designer = new Designer();  
      private var i:int;
      private var j:int;
      private function init():void
       designer.setDesignArea(designArea);
       var cmi1:ContextMenuItem = new ContextMenuItem("Properties", true);
                cmi1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_propertiesSelect);
       var cmi2:ContextMenuItem = new ContextMenuItem("View XML", true);
       cmi2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_viewXMLSelect);
       var cmi3:ContextMenuItem = new ContextMenuItem("Saved Components", true);
       cmi3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_savedListSelect);  
       cm = new ContextMenu();
       cm.hideBuiltInItems();
       cm.customItems = [cmi1, cmi2, cmi3];
       cm.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenu_menuSelect);
      private function contextMenu_menuSelect(evt:ContextMenuEvent):void {
      private function contextMenuItem_propertiesSelect(evt:ContextMenuEvent):void {
        accrCon2.label = "Two Way Split - Properties";   
        accrWin.selectedIndex = 1;
      private function contextMenuItem_viewXMLSelect(evt:ContextMenuEvent):void {               
        viewstack1.selectedIndex = 1;
      private function contextMenuItem_savedListSelect(evt:ContextMenuEvent):void {               
        accrWin.selectedIndex = 0;
      [Bindable]
      private var propValue:String = "Component";
            private function itemClickEvent(event:ListEvent):void {
       var propKey:String = dgProp.selectedItem.@key;
       if (propKey == "name") {
        propValue = dgProp.selectedItem.propvalue;   
      [Bindable]
      private var sourceXML:XML =
      <order>
       <!--This is a comment. -->
       <?PROC_INSTR sample ?>
       <item id='1'>
        <menuName>burger</menuName>
        <price>3.95</price>
       </item>
       <item id='2'>
        <menuName>fries</menuName>
        <price>1.45</price>
       </item>
      </order>;
      [Bindable]
      private var savedComp:Array=['ComponentTemplate',
      'iv85341.EquityCash.v1',
      'ra92724.ThreeWaySplit.EU.US.OTHERS.v1',
      'ra92724.TwoWaySplit.EU.OTHERS.v1',
      'ra92724.TwoWaySplit.US.OTHERS.v1',
      'iv85341.VanillaNode.v1',
      'iv85341.ReadGmrFs.v1'
         [Bindable]
         private var propData:XML =
          <properties>
           <prop key="name">
            <propvalue>Component</propvalue>
         <itemRenderer>mx.controls.NumericStepper</itemRenderer>
           </prop>
           <prop key="Version">
            <propvalue>1.0</propvalue>
         <itemRenderer>mx.controls.NumericStepper</itemRenderer>
           </prop>
           <prop key="Owner">
            <propvalue>iv85341</propvalue>
         <itemRenderer>mx.controls.NumericStepper</itemRenderer>
           </prop>
           <prop key="width">
            <propvalue>250</propvalue>
         <itemRenderer>mx.controls.NumericStepper</itemRenderer>
           </prop>
           <prop key="height">
            <propvalue>300</propvalue>
         <itemRenderer>mx.controls.NumericStepper</itemRenderer>
           </prop>      
           <prop key="X-Pos">
            <propvalue>40</propvalue>
         <itemRenderer>mx.controls.NumericStepper</itemRenderer>
           </prop>
           <prop key="Y-Pos">
            <propvalue>20</propvalue>
         <itemRenderer>mx.controls.NumericStepper</itemRenderer>
           </prop>
          </properties>;
       private function rightClick(event:MouseEvent):void
        Alert.show("Properties ..." + event.currentTarget, "Open");
       // Draging Code Starts Here
       private var curDate:Date = new Date();
       private var dateList:XMLList = null;
       public function pictureDragDrop(event:DragEvent):void { 
        //Alert.show (" com = " + event.dragSource.dataForFormat("key"));
        var nodeName:String = event.dragSource.dataForFormat("key").toString(); //txtInput1.text;
        var nodeValue:String = "";
        if (nodeValue == "")
         if (xm == <AbstractComponentTemplate></AbstractComponentTemplate>)
          xm.appendChild(compType);
          dateList = new XMLList("<DateCreated>" + curDate + "</DateCreated>");
          xm.appendChild(dateList);     
          dateList = new XMLList("<DateModified>" + curDate + "</DateModified>");
          xm.appendChild(dateList);
          xm1 = XML("<" + nodeName + "></" + nodeName + ">");
          xm.appendChild(xm1);
         else
          i++;
          xm1 = XML("<" + nodeName + "></" + nodeName + ">");
          xm.appendChild(xm1);
          //loopparent.push(xmlarray:xm1);
          loopparent[i] = xm1;     
        else
         var xmlList:XMLList = new XMLList("<" + nodeName + ">" + nodeValue + "</" + nodeName + ">");
         if (xm1 == null)
          xm.appendChild(xmlList);
         else
          for (j = i; j>0; j--)
          (loopparent[j]).appendChild(xmlList);
          //Alert.show("alert");
        var x:int = event.currentTarget.mouseX - xOff;
        var y:int = event.currentTarget.mouseY - yOff; 
        if(event.dragSource.dataForFormat("key") == "box")
         designer.addBox(x, y); 
        else  if(event.dragSource.dataForFormat("key") == "circle")
         designer.addCircle(x, y);
        else
         designer.addRectangle(x, y);
        //txtInput1.text = "";
        //txtInput2.text = "";
       // this method gets x and y coordinate of template box image
       private function myoffset(img:Image):void {
        xOff = img.mouseX;
        yOff = img.mouseY;
       // this method does acceptable draging box image
       public function pictureDragEnter(event:DragEvent):void{
        DragManager.acceptDragDrop(Canvas(event.target));       
       // this method supply drag box when mouse move on the design area
       private function dragPicture1(event:MouseEvent, img1:Image,format:String):void{
        var dragInitiator:Image=Image(event.currentTarget);
        var ds:DragSource = new DragSource();
        var imageProxy:Image = new Image();
        imageProxy.source = img1.source;    
        imageProxy.height= 150;
        imageProxy.width= 150;
        ds.addData(format,"key");
        DragManager.doDrag(dragInitiator, ds, event,imageProxy, 0, 0, 1.00);
       // this method works when click on the line button
       // it is make enable to draw line
       public function doDrawEnable():void {
        designer.setIsDrawEnable(true);  
       private var fileRef:FileReference;
       public function createXML():void {
        var fileName:String = "component.xml";
                    fileRef = new FileReference();
        fileRef.browse();
       // Draging code ends here
      ]]>
    </mx:Script>
    <mx:Fade id="theEffect"/>
    <mx:HDividedBox width="100%" height="100%">
      <mx:VDividedBox height="100%" width="20%">  
        <mx:Panel title="Drawing Components" width="100%" height="100%" layout="vertical" >
            <mx:Panel title="Nodes" width="100%" height="100%" layout="vertical">
             <mx:Image id="box" toolTip="TwoWay Split" useHandCursor="true" buttonMode="true" source="@Embed(source='images2/box.png')" mouseMove="dragPicture1(event, box, 'box');myoffset(box);" width="28" height="28" x="84" y="6"></mx:Image>
             <mx:Image id="rectangle" toolTip="MultiWay Split" useHandCursor="true" buttonMode="true" source="@Embed(source='images2/rectangle.png')" mouseMove="dragPicture1(event, rectangle, 'rectangle');myoffset(rectangle);" width="28" height="28" x="160" y="10"></mx:Image>
             <mx:Image id="circle" toolTip="Reader" useHandCursor="true" buttonMode="true"  source="@Embed(source='images2/circle.png')" mouseMove="dragPicture1(event, circle, 'circle');myoffset(circle);" width="28" height="28" x="120" y="8"></mx:Image>
             <mx:Image id="line" toolTip="Line" useHandCursor="true" buttonMode="true" source="@Embed(source='images2/line.png')" click="doDrawEnable()" width="28" height="28"  x="279" y="10"></mx:Image>
             <!--<mx:Image id="dottedline" source="@Embed(source='images2/dottedline.png')" click="doDrawEnable()" width="28" height="35"  x="279" y="10"></mx:Image>
             <mx:Label text="Name" x="350" y="10"/>
             <mx:TextInput id="txtInput1" width="50" height="28" x="400" y="10"/>
             <mx:Label text="Value" x="470" y="10"/>
             <mx:TextInput id="txtInput2" width="50" height="28" x="510" y="10"/>-->
            </mx:Panel>
        </mx:Panel>
      </mx:VDividedBox>
      <mx:VDividedBox height="100%" width="60%">
        <mx:HDividedBox width="100%" height="100%">   
         <mx:Canvas width="100%" height="100%" >
          <mx:TabBar x="0" y="10" dataProvider="viewstack1" />
          <mx:ViewStack id="viewstack1" width="100%" height="100%" y="32">
           <mx:Canvas backgroundColor="#ffffff" borderColor="0xB7BABC" borderStyle="solid" borderThickness="7" label="{propValue}" id="designArea" contextMenu="{cm}" dragEnter="pictureDragEnter(event)" dragDrop="pictureDragDrop(event)" width="100%" height="100%" >
           </mx:Canvas>
           <mx:Panel id="pnlXML" label="XML" width="100%" height="100%" showEffect="{theEffect}" >
            <mx:ControlBar width="100%" barColor="#FF22CC">
             <mx:Spacer width="100%"/>
             <mx:Button id="btnSave" label="Save" useHandCursor="true" buttonMode="true" mouseChildren="false" click="createXML()" />    
            </mx:ControlBar>
            <mx:TextArea fontSize="12" wordWrap="false" textIndent="8" id="txtAreaXML" text="{xm}" width="100%" height="100%" editable="false" />       
           </mx:Panel>
          </mx:ViewStack>
         </mx:Canvas>
        </mx:HDividedBox> 
      </mx:VDividedBox>
      <mx:VDividedBox height="100%" width="20%">
       <mx:Panel title="Saved Components and Properties" width="100%" height="100%" layout="vertical" >
        <mx:Accordion id="accrWin" x="51" y="35" width="100%" height="100%">
            <mx:Canvas label="Saved Components" width="100%" height="100%">
             <mx:List height="100%" width="100%" dataProvider="{savedComp}" />        
            </mx:Canvas>
            <mx:Canvas id="accrCon2" label="Properties" width="100%" height="100%">
             <mx:DataGrid id="dgProp" dataProvider="{propData.prop}" height="100%" width="100%" editable="true" itemClick="itemClickEvent(event);">
              <mx:columns>
               <mx:DataGridColumn dataField="@key" headerText="Property" editable="false" />
               <mx:DataGridColumn dataField="propvalue" headerText="Value" editable="true" />                 
              </mx:columns>
             </mx:DataGrid>
            </mx:Canvas>
         </mx:Accordion>
       </mx:Panel>
      </mx:VDividedBox>
    </mx:HDividedBox>
    <mx:ApplicationControlBar dock="true"> 
      <mx:Image source="images/Openfile.gif" toolTip="Open" useHandCursor="true" buttonMode="true" mouseChildren="false" click="createXML()" />
      <mx:Image source="images/Savefile.gif" toolTip="Save" useHandCursor="true" buttonMode="true" mouseChildren="false" click="createXML()" />
      <mx:Image source="images/Undo.gif" toolTip="Undo" useHandCursor="true" buttonMode="true" mouseChildren="false" />
      <mx:Image source="images/Redo.gif" toolTip="Redo" useHandCursor="true" buttonMode="true" mouseChildren="false" />
      <mx:Image source="images/Delete.gif" toolTip="Delete" useHandCursor="true" buttonMode="true" mouseChildren="false" />
      <mx:Image source="images/Print.gif" toolTip="Print" useHandCursor="true" buttonMode="true" mouseChildren="false" />
      <mx:Spacer width="100%" />
      <mx:Label text="BackTesting" fontWeight="bold" fontSize="16" />
    </mx:ApplicationControlBar>
    </mx:Application>
    Plz change my code according to the requirement.
    Thanks

    Could you give us the full source code?
    Thanks!!

  • Is it possible to create a panel with JavaScript?

    Hi friends
    As I´m studying JavaScript and the user interface creation...would like to ask (more for curiosity):
    Is it possible to create a new panel for Illustrator using JavaScript? Or this is only possible using C++?
    (in the Window Class UI we have the "palette" creation method..so wondering the result of it too)
    Thank you a lot
    Gustavo

    Hi Larry
    Thank you a lot for sharing this reference. This has alternative explanations from the JavaScript Tools Guide that already come with the Extended Script Toolkit SDK (I´m reading this and finding very very useful).
    My question, however, is not covered in any of the manuals.
    I´d like to confirm if a panel (like Brushes, Swatches, Appearance and Layer Illustrator panels) can be made only via C++??? (and not via JavaScript).
    Can I assume the Script UI capabilites in JavaScript can resume itself on creating dialog boxes only (not panels that persist, keep opened in the software, also could be docked in the side of app)?
    Thank you
    Gustavo.

  • Can I create new TeamProjectCollection and TeamProject on TFS using Tfs API programmatically

    Hi,
    I want to ask that is there is any way to create new TeamProjectCollection and then new TeamProject on that collection using tfs api programmatically ?
    Thanks in advance.

    Hi Hassan,
    There is no API to create a team project, but you can script it using devenv. You can check the links below for more information:
    http://blogs.msdn.com/b/granth/archive/2009/09/25/scripting-team-project-creation-in-tfs2010.aspx
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/99184c0e-31b4-43aa-8f36-52545bb48e33/create-a-team-project-programatically?forum=tfsprocess
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Create a ThreadQueue programatically

    Is there any way to create ExecuteQueue in weblogic 8.1 programatically.
    As we know weblogic create ExecuteQueue for us on the basis of config.xml, I want to create ThreadQueue thru my program and use it in my program which runs inside app server.
    This requirment is coming from the fact that inside app server its not recommended to create new thread/threadPool. So i was looking for some ways to create ExecuteQueue in weblogic thru my program.
    Appreciate your time.

    Matt,
    I'm the type of guy that voids the warrenty on everything i buy .  I'm also completely an amature so even if I lost my catalog, it would just be some frustration and swearing on my end.  That being said, I do go backup crazy with daily backups through Acronis True Image, and weekly backups through lightroom.  Oh and did I mention these backups are copied across 3 different computers?
    Rob,
    I did write another plugin that used sql to query the catalog so I did know that you can't use it while Lightroom has the catalog open.  In my previous plugin i got around the issue by having it use the latest backup catalog to do the query on (it's only SELECT statements). In this case I think I'll turn it into a launcher so it runs before every time you start lightroom.  I'm really working on this just for me, if I end up with something that at least half works and others are interested I would certainly share with the community
    Thanks!

  • Create new document from current state not working

    Hey, everyone. I'm using Photoshop CS6 (ccloud) on Windows 7 and I just noticed something weird. Often when I'm working on an image that I want to duplicate, I'll click on the create new document from current state icon at the bottom of the history panel and a new image identical to it will open up as expected.
    Lately, though, every once in a while, when I click it, I'll get a new image that's not identical. It'll be a few states behind and I don't know why. It's never happened before and I'm not doing anything differently when it happens. I recently ran the CS6 update via ccloud, but I can't recall now if this started happening right before that or exclusively afterward.
    In case my issue's not clear, let's say I create a blank image, add a background color, add a layer of text, add a drop shadow to the text, then mask it. When I click the create new document from current state icon, instead of creating a new image that's a duplicate of that one, it will create new one where all that's there is the background color and text and all the other steps of adding a drop shadow and mask aren't there as if I hadn't done it yet.
    I make sure that I'm not clicking anywhere else in the history panel and like I said, this just happens at what seems like random times with random images. I've even tried saving an image, closing it, opening it again and immediately clicking that icon and it'll still create a new document that has missing states.
    Any idea what's going on?

    Yep, that existed in CS5 as well.
    We'll log a bug on it.

  • How do I edit and create new Spry2 menu items?

    I have manged to use adobe air to style and insert a spry2 menu - looks OK
    However,I do not undestand how to edit the menu items
    i.e. creating new menu items and adding new sub menu items
    On spry1 it was easy - just click the top of the menu and a wizard appeared at the bottom of the page
    The spry2 menu icon seems to be unclickable/greyed out?
    Can anyone help
    [email protected]

    Thanks for the reply - I already thought of that and I can edit the menu using code view (although I am not sure how you would 'see the sub menus in design view?) but I was wondering if spry2 has the same time saving wizard in the properties panel (as Spry1) that simplifies and speeds up the process?
    To restate the question: I can see a spry2 menu icon in the properties panel but it doesn't do anything as it's greyed out.
    Is there an option in dreamweaver (or adobe air which styles the menu) that makes a menu wizard work in the properties panel?
    If not then I guess I have to do it in code view - very tedious!?
    Jonathan
    [email protected]

Maybe you are looking for

  • Mac Mini versus other models of Mac

    Hi there - I've been looking into the Mac Mini because a friend is planning on buying one (for normal home use). I'm someone who's been stuck on a G4 for six years now, and although it still works very well, I do some recording/editing in ProTools an

  • App Store Filtering? Can I see list of Apps for Click Wheel Interface iPods

    It's very convenient that Apple has made it easier to find Click-Wheel Games for the iPod Nano and other models sporting the click-wheel interface. Does anyone know some way to filter Apps so one can determine what other (non-game) apps are compatibl

  • One question in measures table heading of a pivot table view when using 11g

    Hi experts, I have been working on OBIEE 10g for 2 years, and lately I started developing on OBIEE 11g. It is great to discover so many new features which make reporting so much easier and look better, meanwhile, I got confused by some detail changes

  • IMac G5 Airport Dead

    I have an iMac G5 that connects to the internet using an Airport Extreme (11G) router. this morning, the computer was showing that it was connected to our SSID, but I was unable to access the internet at all. Cycling the G5 airport on and off had no

  • Who has lost

    Miami Heat vs Brooklyn Nets Live Stream https://docs.google.com/spreadsheets/d/1tpxDoldCgBjfMnNoNVs6naSiYBG8FZz2pSMXA3rUBZ4/preview/sheet?gid=0 https://docs.google.com/spreadsheets/d/1TqDQgZjR2PXu6OTN6QM4yfgUFwNw9qcT3GCHneSTAdw/preview/sheet?gid=0 ht