I did a llttle more testing it seems that activity is saving  
correctly. but the step is not. which leads me to think that the  
saveRealObject is probably not implemented correctly in the controllers.
-Tony



On Feb 22, 2008, at 12:28 AM, Anthony Perritano wrote:

> The changes i made to the bean are not  being written to the file.  
> in OtrunkCurnit I have this method:
>
>       public void saveCurnit(File file) throws FileNotFoundException,  
> Exception {
>               
>               if( otDb == null)
>                       throw new Exception("Curnit has not been initialized");
>               
>               otControllerService.saveRealObject(rootBean, otrunkRoot);
>               otViewerHelper.saveOTDatabase(otDb, new FileOutputStream(file));
>               
>       }
>
> i put a br point in it and checked out the rootBean. its got all the  
> changes i made to it.
>
> however the file that comes out is still the same as the original.  
> the question is; would this be a problem with the controllers or  
> another step i need to do before saving? i checked in my controllers  
> in pas-otrunk project. check them out.
>
> what i am going to do is write a test. but in the mean time off hand  
> any thoughts of the problem?
>
>
> -Tony
>
>
>
> On Feb 19, 2008, at 6:36 PM, Scott Cytacki wrote:
>
>>
>> Although it would be nice to keep this thread on a single list, it  
>> has
>> pieces that are useful to archive on both lists.
>>
>> I'll break this down into a few questions:
>>
>> 1. How do you write out an updated otml that reflects the changes  
>> made
>> to the OT objects?
>>
>> 2. How do you get changes made by the TELS/Pas authoring tool into  
>> the
>> OT objects?
>>
>> 3. How are steps ordered, added, and deleted?
>>
>> -----
>>
>> 1. How do you write out an updated otml that reflects the changes  
>> made
>> to the OT objects?
>>
>> You are probably using the following code to get the root object:
>> otCurnit = new OTrunkCurnit("my_url.otml");
>> otCurnit.getRootBean();
>>
>> To save the otml from this otCurnit you will have to add a method to
>> OTrunkCurnit class to do the following:
>> OTDatabase otDb = getOTDatabase();
>> otViewerHelper.saveOTDatabase(otDb, new
>> FileOutputStream("my_new_file.otml"));
>>
>> There are 4 saveOTDatabase* methods, one returns the xml as a String
>> when you call the method, another writes the xml to a OutputStream,
>> another "PUT"s the xml to a url, and the last sends the xml to url  
>> using
>> the http method you specify.  You might find the other three more  
>> useful
>> if you want to send the authored content directly to a server  
>> instead of
>> saving it locally.
>>
>> 2. How do you get changes made by the TELS/Pas authoring tool into  
>> the
>> OT objects?
>>
>> Right now the TELS/Pas authoring tool makes changes to the beans.  So
>> you need to get the changes made to the beans into the OT objects.
>> For each project, activity, and step class there is a OT*Controller
>> class.  This class has a method "saveRealObject".   This method  
>> should
>> copy all the properties from the bean into the OT object.
>> OTPasProjectController seems implement this method mostly correctly.
>> OTPasActivityController does not implement it.   So you need to
>> implement this method in OTPasActivityController and in each
>> OT*Controller class that you've created for the step beans.
>>
>> To be safe the following method should be called on each child  
>> object:
>> controllerService.saveRealObject(realObject, otObject).  For  
>> example in
>> OTPasProjectController after it calls:
>>            OTObject otActivity =  
>> controllerService.getOTObject(activity);
>> it should call:
>>            controllerService.saveRealObject(activity, otActivity);
>>
>> Then finally to be safe you should explicitly save the rootBean.   
>> So in
>> the code above for saving the otml you should first do:
>> otControllerService.saveRealObject(rootBean, otrunkRoot);
>>
>> 3. How are steps ordered, added, and deleted?
>>
>> If the first two steps are done correctly then this should happen
>> automatically.
>>
>>
>> Scott
>>
>> Anthony Perritano wrote:
>>> So, i am able to load up an otml file in the authoring tool and  
>>> create
>>> the object structure. Right now there are only browseWeb
>>> steps(evidences, display page, etc....) and soon i will be able to
>>> modify those. so here are my main questions.
>>>
>>>
>>> 1. when i modify a pas step how do i persist that to the otml and
>>> write that to a curnit? for instance i want to save the html to the
>>> otml like we do now in our non otrunk curnits. it a
>>> 2. in the authoring tool we are going to be able move steps around,
>>> add new ones and delete others. What mechanisms in otrunk would i  
>>> use
>>> to do this?
>>>
>>> -Tony
>>>
>>>
>>>
>>>
>>>>
>>>
>>
>>
>> >>
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SAIL-Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/SAIL-Dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to