Skip to main content
Tweeted twitter.com/StackSalesforce/status/880562638362746880
added 138 characters in body
Source Link
Eswar
  • 43
  • 4

I am having problem to print table in VF page using JS array. my code.

<apex:page controller="customController" >
    <script>
        var json = new Array();
        <apex:repeat value="{!appointmentList}" var="r">
            json.push('{!r}');
        </apex:repeat>
    </script>
</apex:page>

I tried console.log(), it didn't work. I went through lot of blogs but no luck.

I want something like below, need to do some format data using JS. In java script After data formatting, final list want to print on VF page. I am not good with JS things. Please help on this.

<apex:page controller="customController" >
<script>
    var json = new Array();
    <apex:repeat value="{!appointmentList}" var="r">
        json.push('{!r});

     <table width="100%" style="font-size:13px;">
         <tr>
            <td>
               <apex:outputText value="{0,date,EEEE - MMMM d, yyyy}" style="font-weight:bold;margin-bottom:2px;"> 
                   <apex:param value="{!s.startDateTime}" /> 
                </apex:outputText>&nbsp;
                <apex:outputText value="{0,date,h:mm a}">   
                    <apex:param value="{!s.startDateTime}" />
                 </apex:outputText> -&nbsp; 
                  <apex:outputText value="{0,date,h:mm a}">   
                      <apex:param value="{!s.endDateTime}" />
                  </apex:outputText><b>&nbsp;&nbsp;({!calendarProfile.userTimezone})</b>  
            </td>
         </tr>
      </table>
  </apex:repeat>
  </script>
  </apex:page>

</apex:page>end....

I am having problem to print table in VF page using JS array. my code.

<apex:page controller="customController" >
    <script>
        var json = new Array();
        <apex:repeat value="{!appointmentList}" var="r">
            json.push('{!r}');
        </apex:repeat>
    </script>
</apex:page>

I tried console.log(), it didn't work. I went through lot of blogs but no luck.

I want something like below, need to do some format data using JS. In java script After data formatting, final list want to print on VF page. I am not good with JS things. Please help on this.

<apex:page controller="customController" >
<script>
    var json = new Array();
    <apex:repeat value="{!appointmentList}" var="r">
        json.push('{!r});

     <table width="100%" style="font-size:13px;">
         <tr>
            <td>
               <apex:outputText value="{0,date,EEEE - MMMM d, yyyy}" style="font-weight:bold;margin-bottom:2px;"> 
                   <apex:param value="{!s.startDateTime}" /> 
                </apex:outputText>&nbsp;
                <apex:outputText value="{0,date,h:mm a}">   
                    <apex:param value="{!s.startDateTime}" />
                 </apex:outputText> -&nbsp; 
                  <apex:outputText value="{0,date,h:mm a}">   
                      <apex:param value="{!s.endDateTime}" />
                  </apex:outputText><b>&nbsp;&nbsp;({!calendarProfile.userTimezone})</b>  
            </td>
         </tr>
      </table>
  </apex:repeat>
  </script>

</apex:page>

I am having problem to print table in VF page using JS array. my code.

<apex:page controller="customController" >
    <script>
        var json = new Array();
        <apex:repeat value="{!appointmentList}" var="r">
            json.push('{!r}');
        </apex:repeat>
    </script>
</apex:page>

I tried console.log(), it didn't work. I went through lot of blogs but no luck.

I want something like below, need to do some format data using JS. In java script After data formatting, final list want to print on VF page. I am not good with JS things. Please help on this.

<apex:page controller="customController" >
<script>
    var json = new Array();
    <apex:repeat value="{!appointmentList}" var="r">
        json.push('{!r});

     <table width="100%" style="font-size:13px;">
         <tr>
            <td>
               <apex:outputText value="{0,date,EEEE - MMMM d, yyyy}" style="font-weight:bold;margin-bottom:2px;"> 
                   <apex:param value="{!s.startDateTime}" /> 
                </apex:outputText>&nbsp;
                <apex:outputText value="{0,date,h:mm a}">   
                    <apex:param value="{!s.startDateTime}" />
                 </apex:outputText> -&nbsp; 
                  <apex:outputText value="{0,date,h:mm a}">   
                      <apex:param value="{!s.endDateTime}" />
                  </apex:outputText><b>&nbsp;&nbsp;({!calendarProfile.userTimezone})</b>  
            </td>
         </tr>
      </table>
  </apex:repeat>
  </script>
  </apex:page>

end....

added 138 characters in body
Source Link
Eswar
  • 43
  • 4

I am having problem to print table in VF page using JS array. my code.

<apex:page controller="customController" >
    <script>
        var json = new Array();
        <apex:repeat value="{!appointmentList}" var="r">
            json.push('{!r}');
        </apex:repeat>
    </script>
</apex:page>

I tried console.log(), it didn't work. I went through lot of blogs but no luck.

I want something like below, need to do some format data using JS. In java script After data formatting, final list want to print on VF page. I am not good with JS things. Please help on this.

<apex:repeatpage controller="customController" >
<script>
    var json = new Array();
    <apex:repeat value="{!appointmentList}" var="appt"var="r">
 >       json.push('{!r});

     <table width="100%" style="font-size:13px;">
         <tr>
            <td>
               <apex:outputText value="{0,date,EEEE - MMMM d, yyyy}" style="font-weight:bold;margin-bottom:2px;"> 
                   <apex:param id="displayDay" value="{!appts.startDateTime}" /> 
                </apex:outputText>&nbsp;
                <apex:outputText value="{0,date,h:mm a}">   
                    <apex:param id="displayStTime" value=""value="{!s.startDateTime}" />
                 </apex:outputText> -&nbsp; 
                  <apex:outputText value="{0,date,h:mm a}">   
                      <apex:param id="displayEnTime" value=""value="{!s.endDateTime}" />
                  </apex:outputText><b>&nbsp;&nbsp;({!calendarProfile.userTimezone})</b>  
            </td>
         </tr>
      </table>
  </apex:repeat>
  </script>

</apex:page>

I am having problem to print table in VF page using JS array. my code.

<apex:page controller="customController" >
    <script>
        var json = new Array();
        <apex:repeat value="{!appointmentList}" var="r">
            json.push('{!r}');
        </apex:repeat>
    </script>
</apex:page>

I tried console.log(), it didn't work. I went through lot of blogs but no luck.

I want something like below, need to do some format data using JS. In java script After data formatting, final list want to print on VF page. I am not good with JS things. Please help on this.

<apex:repeat  value="{!appointmentList}" var="appt" >
     <table width="100%" style="font-size:13px;">
         <tr>
            <td>
               <apex:outputText value="{0,date,EEEE - MMMM d, yyyy}" style="font-weight:bold;margin-bottom:2px;"> 
                   <apex:param id="displayDay" value="{!appt.startDateTime}" /> 
                </apex:outputText>&nbsp;
                <apex:outputText value="{0,date,h:mm a}">   
                    <apex:param id="displayStTime" value="" />
                 </apex:outputText> -&nbsp; 
                  <apex:outputText value="{0,date,h:mm a}">   
                      <apex:param id="displayEnTime" value="" />
                  </apex:outputText><b>&nbsp;&nbsp;({!calendarProfile.userTimezone})</b>  
            </td>
         </tr>
      </table>
  </apex:repeat>

I am having problem to print table in VF page using JS array. my code.

<apex:page controller="customController" >
    <script>
        var json = new Array();
        <apex:repeat value="{!appointmentList}" var="r">
            json.push('{!r}');
        </apex:repeat>
    </script>
</apex:page>

I tried console.log(), it didn't work. I went through lot of blogs but no luck.

I want something like below, need to do some format data using JS. In java script After data formatting, final list want to print on VF page. I am not good with JS things. Please help on this.

<apex:page controller="customController" >
<script>
    var json = new Array();
    <apex:repeat value="{!appointmentList}" var="r">
        json.push('{!r});

     <table width="100%" style="font-size:13px;">
         <tr>
            <td>
               <apex:outputText value="{0,date,EEEE - MMMM d, yyyy}" style="font-weight:bold;margin-bottom:2px;"> 
                   <apex:param value="{!s.startDateTime}" /> 
                </apex:outputText>&nbsp;
                <apex:outputText value="{0,date,h:mm a}">   
                    <apex:param value="{!s.startDateTime}" />
                 </apex:outputText> -&nbsp; 
                  <apex:outputText value="{0,date,h:mm a}">   
                      <apex:param value="{!s.endDateTime}" />
                  </apex:outputText><b>&nbsp;&nbsp;({!calendarProfile.userTimezone})</b>  
            </td>
         </tr>
      </table>
  </apex:repeat>
  </script>

</apex:page>

Source Link
Eswar
  • 43
  • 4

Create HTML view for JavaScript Array in VisualForce page

I am having problem to print table in VF page using JS array. my code.

<apex:page controller="customController" >
    <script>
        var json = new Array();
        <apex:repeat value="{!appointmentList}" var="r">
            json.push('{!r}');
        </apex:repeat>
    </script>
</apex:page>

I tried console.log(), it didn't work. I went through lot of blogs but no luck.

I want something like below, need to do some format data using JS. In java script After data formatting, final list want to print on VF page. I am not good with JS things. Please help on this.

<apex:repeat  value="{!appointmentList}" var="appt" >
     <table width="100%" style="font-size:13px;">
         <tr>
            <td>
               <apex:outputText value="{0,date,EEEE - MMMM d, yyyy}" style="font-weight:bold;margin-bottom:2px;"> 
                   <apex:param id="displayDay" value="{!appt.startDateTime}" /> 
                </apex:outputText>&nbsp;
                <apex:outputText value="{0,date,h:mm a}">   
                    <apex:param id="displayStTime" value="" />
                 </apex:outputText> -&nbsp; 
                  <apex:outputText value="{0,date,h:mm a}">   
                      <apex:param id="displayEnTime" value="" />
                  </apex:outputText><b>&nbsp;&nbsp;({!calendarProfile.userTimezone})</b>  
            </td>
         </tr>
      </table>
  </apex:repeat>