AnsweredAssumed Answered

How to call methods in Gel-Script

Question asked by JayaSantoshKumar on Jan 12, 2016
Latest reply on Mar 22, 2017 by urmas

Hi I have to Implement java code in terms of gel script shown below

 

Date date1 = df.parse("10/08/2013");

    Date date2 = df.parse("21/08/2013");

    Calendar cal1 = Calendar.getInstance();

    Calendar cal2 = Calendar.getInstance();

    cal1.setTime(date1);

    cal2.setTime(date2);

 

    while (cal1.before(cal2)) {

}//while ends

 

I have implemented till cal1.setTime(date1) in gel script like this

<core:if test="${i1==0}">   
<core:set var="d1" value="${row1[0]}" />   
<gel:parseDate dateVar="date1" format="yyyy-MM-dd">${d1}</gel:parseDate>    

<gel:out>${date1}</gel:out>

</core:if>

 

 

<core:if test="${i1!=0}">

<core:set var="d2" value="${row1[0]}" />

<gel:parseDate dateVar="date2" format="yyyy-MM-dd">${d2}</gel:parseDate>   

  

<gel:out>${date2}</gel:out>

  

<core:invoke method="setTime" on="${R1}">

<core:arg type="java.util.Date" value="${date1}"/>

</core:invoke>

      

<core:invoke method="setTime" on="${R2}">

<core:arg type="java.util.Date" value="${date2}"/>

</core:invoke>

 

How to turn while (cal1.before(cal2)) to Gel-script

Outcomes