Foros de discusión

Presentation Layer

anand gopalan, modificado hace 11 años.

Presentation Layer

Expert Mensajes: 442 Fecha de incorporación: 2/03/12 Mensajes recientes
Hi,

I have records in the database like --> (Records.JPG)
I want to display like -->(Leaveapplication.JPG).How to do this.

Environment: Liferay6.1.0 CE

Table Desc:
desc emp_leave_dept_view
Name Null Type
------------ ---- ------------
EMPNAME VARCHAR2(30)
LEAVETYPE VARCHAR2(20)
NUMBEROFDAYS VARCHAR2(20)
LEAVEFROM DATE
LEAVETO DATE
MANAGER VARCHAR2(41)

My Requirements:

if employee put leave on particular date and I want to display the particular date has the Leave Type and remaining date should be " P " ( Means - Present)

Please see the LeaveApplication.JPG.

Please let me know how to Achieve this. I have written the code for the Month and date.

Now, how to display if employee take the leave in particular date and display the the leave type and remaining date will be " P "., Please Help Me.
anand gopalan, modificado hace 11 años.

RE: Presentation Layer

Expert Mensajes: 442 Fecha de incorporación: 2/03/12 Mensajes recientes
Hello Sir,

Hello Anand,

You can do this with the help of a Java method, which produce HTML with the help of database interaction.

You have to write a finder on the basis of Name returning collection, iterate on dates, mark their leave status on the basis of collection returned by finder.

Hope this will help...

Thanks and Regards,
Apoorva Prakash


I have done that, I have stuck in the below code.Please help me sir.

for example I want to check the condition like if leave type is "SL" and if employee take leave on 18-march-2013, put SL on 18-March-2012, remaining date will be "P", it will based on the database value.

Below code i can able to check the leave type but how can i check the condition on particular leave date.

<c:if test="${empLeaveDepView.leaveType=='SL' && empLeaveDepView.leaveFrom == ???? }">
<td Align = "Center"> <c:out value="SL"/> </td>
</c:if>