View unanswered posts | View active topics It is currently Sat May 27, 2017 9:04 am



Reply to topic  [ 4 posts ] 
 Adding an activity 
Author Message

Joined: Tue Apr 14, 2009 6:34 pm
Posts: 1
Post Adding an activity
I am trying to create my own activity using the code below. But it does not get displayed even though it is added to the activity list. When the user creates an activity through gui, everything is fine, because the code was borrowed from the tutorial. Any advice?

d = new com.miginfocom.util.dates.DateRange();
//set d to valid dates

Activity a = new DefaultActivity(d.getImmutable(),new Long(new Random().nextLong())); a.setSummary("ON");
a.addCategoryID(Plug4ID, 0);
a.setBaseDateRange(d.getImmutable());
ActivityDepository.getInstance().addBrokedActivity(a,AppFrame.class,
TimeSpanListEvent.ADDED_CREATED);


Tue Apr 14, 2009 6:37 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Adding an activity
Hello,

Please submit a support ticket from our site.


Tue Apr 14, 2009 6:39 pm
Profile WWW

Joined: Mon Apr 27, 2009 1:15 pm
Posts: 1
Post Re: Adding an activity
i'm curious to know if you could fix this problem, coz i'm facing the same one. While adding a category and an activity, the category shows up but the activity doesn't. Hier is the code:
Code:
long startMillis = new GregorianCalendar(2009, 4, 27, 14, 0).getTimeInMillis();
long endMillis = new GregorianCalendar(2009, 4, 27, 16, 0).getTimeInMillis();
ImmutableDateRange irange = new ImmutableDateRange(startMillis, endMillis, true, null, null);

//Create my new Category
private static final Object catID = new Integer(17);
Category aCat =  new Category(catID, "Employees", calendarsID);
CategoryDepository.addBrokedCategory(aCat, AppFrame.class, CategoryStructureEvent.ADDED_CREATED);
setCategoryOverride(catID, new Color(75, 103, 50));
CategoryDepository.getCategory(catID).setPropertySilent(CategoryTreeBean.CHECK_SELECTED_KEY, Boolean.TRUE, null);

//Create my new activity
Activity act = new DefaultActivity(irange, "newAppointment");
act.setSummary("team briefing");
act.addCategoryID(catID, 0);
ActivityDepository.getInstance().addBrokedActivity(act, AppFrame.class, TimeSpanListEvent.ADDED_CREATED);


greets F..


Mon Apr 27, 2009 1:47 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Adding an activity
Hello,

You can also post a support ticket from our site.


Mon Apr 27, 2009 9:26 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.