1
    <aui:select name="Event for">
     <%
    for (User usr : UserLocalServiceUtil.getRoleUsers(10163)) {
     %>           
         <aui:option label="<%=usr.getFullName()%>" />
    <%
        }
    %>
    </aui:select>



    I have created a new field in Add Event page of Calendar portlet. 

I want to create a new column in CalEvent table corresponding to the newly created field. Like wise i should get the value of that field by creating CalEvent instance.... So while clicking Save in Add Event page, the value of newly created field also should be saved in CalEvent table. The above pasted code is used to create new drop down field "Event for", which will give list of users under a role. This I done by creating Hook. So, While saving event the value of "Event for" also need to be saved in CalEvent table in "eventFor" column. How can i achive this? How to create new column and how to save it? Please help.....

Boat
  • 515
  • 2
  • 8
  • 28

1 Answers1

0

Your major concern is the database table used for CalEvent. If you can open a database browser, you can find it as the table named "calevent" with primary key "eventId".

Now, if you wanted to add a column in that table, you would need to make extended modifications to the Calendar Portlet's controller and Services, and besides needing so much work, you would lose compatibility with future updates.

So, what i propose, is to make another Portlet and with ServiceBuilder create a table that features the "eventFor" column and has the 'calevent.eventId' as foreign key. If you take the service.jar and copy it in /lib/ext/ you can even include the new service in your hooked add-event.jsp and create the new instances from there.

yannicuLar
  • 3,083
  • 3
  • 32
  • 50