Spicefactory Forum Index Spicefactory
Forum Archive
 
 SearchSearch    Log inLog in 

module is not working on popup

 
Post new topic   Reply to topic    Spicefactory Forum Index -> Spicefactory
View previous topic :: View next topic  
Author Message
micke



Joined: 26 Mar 2012
Posts: 10
Location: switzerland

PostPosted: Mon Mar 26, 2012 9:04 pm    Post subject: module is not working on popup Reply with quote

Hi All,
Popup is appearing when click data on parent class(myList) but Modules is not working inside the popup class (EditCommunicatiom class)

EditCommunicatiom (popup class)
<spicefactory:FastInject injectionComplete="injectionCompleteHandler();" >

spicefactory:Inject property="statusModel" type="{StatusModel}"/>

</spicefactory:FastInject>

[Bindable]
[Inject]
public var statusModel:StatusModel;


public function injectionCompleteHandler():void {
Alert.show("statusModel" );
statusModel.getAllList()


}

parentClass(myList)
public function editCommunication(evt:MouseEvent):void
{

pop1 = EditCommunication(PopUpManager.createPopUp(this, EditCommunication, true));

var a:Communication = Communication(licenseDataGrid.selectedItem);
pop1.editData = a;

PopUpManager.centerPopUp(pop1);

}
Back to top
View user's profile Send private message
Jens Halm
Site Admin


Joined: 21 Sep 2007
Posts: 2631
Location: Cologne, Germany

PostPosted: Mon Mar 26, 2012 9:39 pm    Post subject: Reply with quote

See section 9.8 in the manual for Parsley 3.
_________________
Jens Halm
Spicefactory
Back to top
View user's profile Send private message
micke



Joined: 26 Mar 2012
Posts: 10
Location: switzerland

PostPosted: Tue Mar 27, 2012 12:36 pm    Post subject: module is not working on popup Reply with quote

Thanks But No luck .

1) I hope, Libs are corrected
2) context.viewManager.addViewRoot(pop1); is added

Parent(class)
pop1 = EditCommunication(PopUpManager.createPopUp(this, EditCommunication, true));
context.viewManager.addViewRoot(pop1);
var a:Prospect = Prospect(licenseDataGrid.selectedItem);
pop1.editData = a;
PopUpManager.addPopUp(pop1,this);



Child(
<spicefactory:FastInject injectionComplete="injectionCompleteHandler();">

<spicefactory:Inject property="priorityModel" type="{PriorityModel}"/>
</spicefactory:FastInject>

public function init():void {
Alert.show("before inject priorityId");
priorityModel.getAllPriority();
Alert.show("inject priorityId id ==" + editProspect.priorityId.id);
}

Lib
cairngom-popup-flex4-1.7.swc
parsley-flex4-2-4.1.swc
parsley-popup-3.0.2.swc
spicelib-flash-2.40.swc
spicelib-flex-2.4.0.swc
spicelib-reflect-3.0.0.swc
spicelib-util-3.0.0.swc
Back to top
View user's profile Send private message
Jens Halm
Site Admin


Joined: 21 Sep 2007
Posts: 2631
Location: Cologne, Germany

PostPosted: Tue Mar 27, 2012 1:18 pm    Post subject: Reply with quote

Please look at the sample code in the docs and do it exactly in the same way.
_________________
Jens Halm
Spicefactory
Back to top
View user's profile Send private message
micke



Joined: 26 Mar 2012
Posts: 10
Location: switzerland

PostPosted: Wed Mar 28, 2012 8:56 am    Post subject: module is not working on popup Reply with quote

Hi Jens Halm,
Followed the sample and it is diplaying the popup but PriorityModel is not picking up data (the sample problem) and not show data in the popup.

parent ;
public function editComm(evt:MouseEvent):void
{

popup = EditComm(PopUpManager.createPopUp(this, EditComm, true));
context.viewManager.addViewRoot(popup);
PopUpManager.addPopUp(popup,this);

}


Child
<?xml version="1.0" encoding="utf-8"?>
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" width="100%" height="100%"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:spicefactory="http://www.spicefactory.org/parsley"
mouseDownOutside="PopUpManager.removePopUp(this)"
creationComplete="onCreationComplete()">
<fx:Declarations>
<spicefactory:Configure/>
</fx:Declarations>

[Bindable]
[Inject]
public var priorityModel:PriorityModel;

public function onCreationComplete():void {

priorityModel.createPriorityList();
priorityModel.getAllPriority();


}

Libs
Parsley-Flex4-2.4
parsley-popup-3.0.2
spicelib-commands-3.1.0
spicelib-flash-2.40
spicelib-reflect-3.0
spicelib-util-3.0
Back to top
View user's profile Send private message
Jens Halm
Site Admin


Joined: 21 Sep 2007
Posts: 2631
Location: Cologne, Germany

PostPosted: Wed Mar 28, 2012 9:36 am    Post subject: Reply with quote

No, you do not follow the example. Really, it's just copy-paste from the manual, you must see the significant differences from your code to the samples, no?
_________________
Jens Halm
Spicefactory
Back to top
View user's profile Send private message
micke



Joined: 26 Mar 2012
Posts: 10
Location: switzerland

PostPosted: Wed Mar 28, 2012 12:14 pm    Post subject: Reply with quote

parent

public var popup:EditProspect;

Inject]
public var context:Context;
public function editComm():void
{

popup = new EditComm();
context.viewManager.addViewRoot(popup);
PopUpManager.addPopUp(popup,this);

}
Now Even my popup is not appearing.

When click on data in the list and it donet show the popup
Back to top
View user's profile Send private message
Jens Halm
Site Admin


Joined: 21 Sep 2007
Posts: 2631
Location: Cologne, Germany

PostPosted: Wed Mar 28, 2012 12:20 pm    Post subject: Reply with quote

This might even be an error not related to Parsley. I don't know. You need to debug, turn on logging, set breakpoints, the usual stuff. The code you posted now does not have any obvious errors left. (And please wrap code inside [code] tags for better readability).
_________________
Jens Halm
Spicefactory
Back to top
View user's profile Send private message
micke



Joined: 26 Mar 2012
Posts: 10
Location: switzerland

PostPosted: Wed Mar 28, 2012 1:29 pm    Post subject: Reply with quote

popup is appearing if disable the //popup = new EditProspect() and add
popup = EditProspect(PopUpManager.createPopUp(this, EditProspect, true));

Even though,module is not getting the data in child class(EditComm.class) problem from begin.

MYList.mxml
Code:


public var popup:EditComm;
[Inject]
         public var context:Context;

public function editComm():void
      {         
            
            //popup = new EditComm();
            popup = EditComm(PopUpManager.createPopUp(this, EditComm, true));
            context.viewManager.addViewRoot(popup);               
            PopUpManager.addPopUp(popup,this);      
            
         }

mx:DataGrid id="licenseDataGrid" width="100%" showScrollTips="false" height="100%"               
                doubleClickEnabled="true" doubleClick="editComm();"

in child class (EditComm.mxml )

Code:
<?xml version="1.0" encoding="utf-8"?>
         <s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" width="100%" height="100%"
              xmlns:s="library://ns.adobe.com/flex/spark"
              xmlns:mx="library://ns.adobe.com/flex/mx"
              xmlns:spicefactory="http://www.spicefactory.org/parsley" >
   
      <fx:Declarations>
            <spicefactory:FastInject injectionComplete="injectionCompleteHandler();" >         
            <spicefactory:Inject property="priorityModel" type="{PriorityModel}"/>         
      </spicefactory:FastInject>
   </fx:Declarations>
   
   <fx:Script>
      <![CDATA[
         [Bindable]
         private var editComm:Comm;


         [Bindable]
         [Inject]
         public var priorityModel:PriorityModel;

         public function injectionCompleteHandler():void {            
            priorityModel.getAllPriority();
            Alert.show("inject priorityId id ==" + editComm.priorityId.id);
            
         }
Back to top
View user's profile Send private message
Jens Halm
Site Admin


Joined: 21 Sep 2007
Posts: 2631
Location: Cologne, Germany

PostPosted: Wed Mar 28, 2012 1:33 pm    Post subject: Reply with quote

You cannot use the createPopup method with Parsley. You need to find out why the other variant does not work.
_________________
Jens Halm
Spicefactory
Back to top
View user's profile Send private message
micke



Joined: 26 Mar 2012
Posts: 10
Location: switzerland

PostPosted: Wed Mar 28, 2012 3:24 pm    Post subject: Reply with quote

Jens Halm wrote:
You cannot use the createPopup method with Parsley. You need to find out why the other variant does not work.


I have posted all my code and libs here

Parent class

Code:
<?xml version="1.0" encoding="utf-8"?>
<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark" horizontalAlign="center"
        xmlns:mx="library://ns.adobe.com/flex/mx"      
        xmlns:spicefactory="http://www.spicefactory.org/parsley"       
        width="100%" height="100%" >
      
   
   <fx:Declarations>
   <spicefactory:FastInject injectionComplete="injectionCompleteHandler();" >
      <spicefactory:Inject property="model" type="{ProspectModel}"/>
      <spicefactory:Inject property="sessionPM" type="{SessionPM}"/>
      <spicefactory:Inject property="priorityModel" type="{PriorityModel}"/>
   </spicefactory:FastInject>

         [Bindable]
         public var model:ProspectModel;
         
         [Bindable]
         [Inject]
         public var priorityModel:PriorityModel;
         
         [Bindable]
         [Inject]
         public var popup:EditComm;
         
         [Bindable]
         [Inject]
         public var sessionPM : SessionPM;
         
         [MessageDispatcher]
         public var dispatcher:Function;
         
         [Inject]
         public var context:Context;
         
         private function injectionCompleteHandler():void
         {   
            model.getMyProspects();            
               //fire off to the server to get the complete list
         }
         public function editComm():void
         {         
            
            popup = new EditComm();            
            context.viewManager.addViewRoot(popup);               
            PopUpManager.addPopUp(popup,this);      
            
         }

<mx:DataGrid id="licenseDataGrid" width="100%" showScrollTips="false" height="100%"
                verticalScrollPolicy="auto" sortableColumns="false" dataProvider="{model.prospects}"            
                doubleClickEnabled="true" doubleClick="editComm();"


Child Class(EditComm.mxml)
Code:
<?xml version="1.0" encoding="utf-8"?>
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" width="100%" height="100%"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:spicefactory="http://www.spicefactory.org/parsley" >
   
   <fx:Declarations>
      <spicefactory:FastInject  >         
         <spicefactory:Inject property="priorityModel" type="{PriorityModel}"/>         
      </spicefactory:FastInject>
   </fx:Declarations>
[Bindable]
         private var editComm:Communication;
                        
         [MessageDispatcher]
         public var dispatcher:Function;
         
         
         
      ]]>
   </fx:Script>
   <!-- <s:TitleWindow width="100%" height="100%"> -->
      
   <mx:Accordion id="accordion1" height="344" width="100%" creationComplete="" creationPolicy="all">
      <mx:Form id="basicformation" label="Basic Information" width="100%">
         <s:HGroup width="100%" height="100%" >
            
            <s:HGroup width="40%" horizontalAlign="right" >               
               <s:VGroup >
                  <mx:FormItem label="Acquisition Date :" required="false" width="100%" textAlign="right" paddingTop="2">                     
                  </mx:FormItem>            
                  
               </s:VGroup>
               <s:VGroup>
                  <mx:DateField id="AquiDate"  text="Start Date" editable="false" width="90" yearNavigationEnabled="true" >                     
                  </mx:DateField>                  
                  
               </s:VGroup>               
            </s:HGroup>      
            <mx:Canvas width="10%">
               
            </mx:Canvas>
                  
         </s:HGroup>         
      </mx:Form>            
      
   </mx:Accordion>

Libs:
parsley-flex4-2.4.swc
parsly-popup3.0.2
speicelib-command-3.1
spicelib - flash 2-4.0
spicelib-refelct-3.0
spicelib-util-3.0
Back to top
View user's profile Send private message
Jens Halm
Site Admin


Joined: 21 Sep 2007
Posts: 2631
Location: Cologne, Germany

PostPosted: Wed Mar 28, 2012 3:35 pm    Post subject: Reply with quote

I can only repeat myself:
Quote:
This might even be an error not related to Parsley. I don't know. You need to debug, turn on logging, set breakpoints, the usual stuff.

If the popup does not even open, you have a pretty fundamental problem, that quite likely is not even related to Parsley. I don't have time to do standard debugging work for you.
_________________
Jens Halm
Spicefactory
Back to top
View user's profile Send private message
micke



Joined: 26 Mar 2012
Posts: 10
Location: switzerland

PostPosted: Fri Apr 06, 2012 4:31 pm    Post subject: module is not working on popup Reply with quote

Thanks It is working now
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Spicefactory Forum Index -> Spicefactory All times are GMT + 1 Hour
Page 1 of 1

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


Powered by phpBB © 2001, 2005 phpBB Group