School Curses Example

(XMLPF Advanced features)


              As time pases, users get the need of more and more complex projects using XMLPortletFactory, we are going to provide a more advanced example of use. To acomplish that we are going to propose a small but real looking project, and we are going to develp it. Here is the proposal:

               Suppose we have a School where we want to store some data, we will have Teacher, Subjects, and Classrooms as independent data, and we will have Courses, where we will have Students, Holidays, Course Subjects.

               Students will have asigned a unique Classroom, Course Subjects, will have a unique subject and teacher. And finally we will like to be able to add comments (none or many) to each student.  To make it more clear let me show you a diagram.

        As you can see, we tried to use most of field types possible, there will be generated stand alone portlets like Classrooms, Subjects and Teachers, there will be master-detail type portlet like Courses (master) - Students (detail), CourseSubjects (detail), Holidays (detail), Students (before detail, now master), Comments (detail), and finally we have three validations, the student classroom, the CourseSubjects teacher and subject.

      After creating the XML definitions (SchoolCoursesExample.xml) , and passing it throught the XMLPF, we obtain the .war file (coursesExample-portlet- ). We can now deploy to our Liferay. We will make 2 pages, one with stand alone portlets, and another with Courses and all it dependents. Like this:

Stand Alone:

And Courses and its dependants:


              Now is just, work as usual, insert data in stand alone portlets:

Insert data in Courses, CourseSubjects, Hollidays, Students:

Insert Comments to a Student:

and so on.


 Have Fun, Saludos, Jack.