• Zedroid
  • NEWBIE
  • 25 Points
  • Member since 2011
  • Sr Software Developer


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 9
    Replies
Hi All,

The below visualforce page throws this error while referencing wrapper class field. "Error: Unknown property 'IOLineHistoryController1.ioLinehistory.LineName'"

Visualforce page:

<apex:page controller="IOLineHistoryController1" action="{!getRecordsTodisplay}">
<apex:form >
<apex:pageBlock >
  <apex:pageblockTable value="{!display_list}" var="rec">
      <apex:column value="{!rec.LineName}" />
  </apex:pageblockTable>
</apex:pageBlock>
</apex:form>
</apex:page>


Controller class

public with sharing class IOLineHistoryController1 {
public string channelIOId{get;set;}
public List<ioLinehistory> display_list { get;set;}
public PageReference getRecordsTodisplay()
{
   for (IO_Line__C line:iolineList)
         {
           for(IO_Line__History lhistory:line.Histories)
           {
               display_list.add(new ioLinehistory(line.id, line.name,lhistory ));
            }
         }
         return null;
}
public List<IO_Line__C>  iolineList{get;set;}
public class ioLinehistory
    {
        String LineId {get;set;}
        String LineName {get;set;}
        IO_Line__History lineHistory {get;set;}
        public ioLinehistory(String lid, String lName, IO_Line__History lineHistory1)
        {
            this.LineId = lid;
            this.LineName = lName;
            this.lineHistory =lineHistory1;
        }
    }
  



public IOLineHistoryController1() {
   
      display_list = new List<ioLinehistory>();
       channelIOId= ApexPages.CurrentPage().getParameters().get('chId');
       System.debug('channelIOId:'+channelIOId);
       iolineList= new List<IO_Line__C>([Select i.Name, i.Id, i.Channel_IO__c, (Select Id, IsDeleted, ParentId, CreatedBy.Name, CreatedDate, Field, OldValue, NewValue From Histories) From IO_Line__c i where i.Channel_IO__c=:channelIOId]);
       
       
    }
}
if I replace
<apex:column value="{!rec.LineName}" />
with
<apex:column value="{!rec}" />
I am able to see the complete record.
Please let me know if I missed something.

Thanks
Praveen
  • January 04, 2014
  • Like
  • 0

Hi All,

 

How to add Mobile SDK in existing project and I don't know how to play with delgate.m.
Could anybody help me out.

 

Thanks in advance.

Zubair.

  • September 17, 2012
  • Like
  • 0

Hi All,

 

I am using Mobile SDK in existing project a view based model. I would like to call a method to give action for OAuth.
Is there a way we can achieve this or I need to use Delegate for this.

 

Any thoughts will be appreciated.

 

Regards,

Zubair

 

  • September 17, 2012
  • Like
  • 0

Hi All,

 

I have a included a script in vf page performs an event onclick, when I tried to scan this on runner I got error.
It would be appreciative  if any one rectify where I am getting stuck, here is my code:

 

<td onmouseover="selectCursor(this,'{!var.ValueBool}')" width="292" align="center" 

onClick="selectPopup('{!var.Value1}','{!mySelect}','{!Name}','{!var.ValueBool}');" >


Regards,

Syed Zubair.

Hi All,

 

I'm trying to create a record in salesforce, but I'm getting an exception as System.NullException.

 

using System;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Text;
using System.Net;
using System.IO;
using System.Xml;
using System.Data;
using sforce;

public partial class Example : System.Web.UI.Page
{
    private SforceService binding;
  
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    protected void btnClick(object sender, EventArgs e)
    {
        CreateAccountSample();
    }

    /// Demonstrates how to create one or more Account records via the API 

    public void CreateAccountSample()
    {
        Account account1 = new Account();
        Account account2 = new Account();

        account1.BillingCity = "Wichita";
        account1.BillingCountry = "US";
        account1.BillingState = "KA";
        account1.BillingStreet = "4322 Haystack Boulevard";
        account1.BillingPostalCode = "87901";

        account2.Name = textName.Text;
        account2.BillingCity = TextBox1.Text;
        account2.BillingCountry = TextBox2.Text;
        account2.BillingState = TextBox3.Text;
       
        sObject[] accounts = new sObject[2];
        accounts[0] = account1;
        accounts[1] = account2;
        
        try
        {
            SaveResult[] saveResults = binding.create(accounts);

            for (int i = 0; i < saveResults.Length; i++)
            {
               if (saveResults[i].success)
                {                   
                    Console.WriteLine("An Account was created with Id: {0}",
                        saveResults[i].id);
                }
                else
                {
                    Console.WriteLine("Item {0} had an error updating", i);
                   
                    foreach (Error error in saveResults[i].errors)
                    {
                        Console.WriteLine("Error code is: {0}",
                            error.statusCode.ToString());
                        Console.WriteLine("Error message: {0}", error.message);
                    }
                }
            }
        }
        catch (System.Web.Services.Protocols.SoapException e)
        {
            Console.WriteLine(e.Code);
            Console.WriteLine(e.Message);
        }
    } 

}

 

 

It would be appriciative if any one rectifies me where I'm going wrong.

 

thanks in advance.

Zubair

Hi All,

 

I'm new to salesforce and trying to learn apex. In apex it does not support byte and Bitbuffer so how could we implement this, for instance I have a java snippet

/* BitBuffer */
public void write(BitBuffer buffer) {

        char[] c = getData().toCharArray();

        int i = 0;

        while (i + 1 < c.length) {
            buffer.put(getCode(c[i]) * 12 + getCode(c[i + 5]), 41);
            i += 5;
        }
        
        if (i < c.length) {
            buffer.put(getCode(c[i]), 6);
        }
    }

 Could any one tell me how can I implement in Apex.

 

Regards,

Zubair.

Hi All,

 

I am trying to implement the three dimension array in apex, could any one let me know where I am getting struck.

/* Here goes my java snippet */
private static int[][][] MAX_LENGTH = {
        { {41,  25,  17,  10},  {34,  20,  14,  8},   {27,  16,  11,  7},  {17,  10,  7,   4} },
        { {77,  47,  32,  20},  {63,  38,  26,  16},  {48,  29,  20,  12}, {34,  20,  14,  8} },        
        { {461, 279, 192, 118}, {365, 221, 152, 93},  {259, 157, 108, 66}, {202, 122, 84,  52} },
        { {552, 335, 230, 141}, {432, 262, 180, 111}, {312, 189, 130, 80}, {235, 143, 98,  60} }};
/* Apex Snippet */
private static List<List<List<Integer>>> MAX_LENGTH = {
       List<Integer> { List<Integer>{41,  25,  17,  10}, List<Integer> {34,  20,  14,  8},  List<Integer> {27,  16,  11,  7},  List<Integer>{17,  10,  7,   4} },
       List<Integer> { {77,  47,  32,  20},  List<Integer>{63,  38,  26,  16},  List<Integer>{48,  29,  20,  12}, List<Integer>{34,  20,  14,  8} }, 
       List<Integer> { List<Integer>{461, 279, 192, 118}, List<Integer>{365, 221, 152, 93},  List<Integer>{259, 157, 108, 66}, List<Integer>{202, 122, 84,  52} },
      List<Integer>  { List<Integer>{552, 335, 230, 141}, List<Integer>{432, 262, 180, 111}, List<Integer>{312, 189, 130, 80}, List<Integer>{235, 143, 98,  60} }
};

 It would be appreciative if any one could give there ideas or solution. Thanks in advance.

Regards ,

Zubair Haris.

Hi All,

 

I wanted to write a test method for my Javascript Remoting controller.

global class remoteTest {
@RemoteAction
global static Contact[] findContacts(string Name) {
Name = '%'+Name+'%';
Contact[] c = [SELECT ID, Name, Phone, Email from Contact where NAME LIKE :Name ];
return c;
}
}

 It would be appreciative if any one could assist regarding this, thanks in advance.

 

Regards,

Zubair.

Hello All,

I have a custom object with the following fields F1,F2 and F3.

I have a requirement to ensure that F1,F2 does not get updated if F3's value is "Processing".

Without using Apex, can we achieve this via validation rules ?
Consider 2 picklists

<apex:inputfield value="controller.picklist1__c"/>
and the second picklist, 'picklist2__c' has some values in it, Is there any way to check if selected value in picklist1__c is in picklist2__c. Thanks.

Like, IF(Selectedvalue(picklist1) is one of the field values of (picklist2))
  • January 04, 2014
  • Like
  • 0
Hi All,

   what is user interface in Salesforce?

Thanks,
Allways Cool
Hi All,

The below visualforce page throws this error while referencing wrapper class field. "Error: Unknown property 'IOLineHistoryController1.ioLinehistory.LineName'"

Visualforce page:

<apex:page controller="IOLineHistoryController1" action="{!getRecordsTodisplay}">
<apex:form >
<apex:pageBlock >
  <apex:pageblockTable value="{!display_list}" var="rec">
      <apex:column value="{!rec.LineName}" />
  </apex:pageblockTable>
</apex:pageBlock>
</apex:form>
</apex:page>


Controller class

public with sharing class IOLineHistoryController1 {
public string channelIOId{get;set;}
public List<ioLinehistory> display_list { get;set;}
public PageReference getRecordsTodisplay()
{
   for (IO_Line__C line:iolineList)
         {
           for(IO_Line__History lhistory:line.Histories)
           {
               display_list.add(new ioLinehistory(line.id, line.name,lhistory ));
            }
         }
         return null;
}
public List<IO_Line__C>  iolineList{get;set;}
public class ioLinehistory
    {
        String LineId {get;set;}
        String LineName {get;set;}
        IO_Line__History lineHistory {get;set;}
        public ioLinehistory(String lid, String lName, IO_Line__History lineHistory1)
        {
            this.LineId = lid;
            this.LineName = lName;
            this.lineHistory =lineHistory1;
        }
    }
  



public IOLineHistoryController1() {
   
      display_list = new List<ioLinehistory>();
       channelIOId= ApexPages.CurrentPage().getParameters().get('chId');
       System.debug('channelIOId:'+channelIOId);
       iolineList= new List<IO_Line__C>([Select i.Name, i.Id, i.Channel_IO__c, (Select Id, IsDeleted, ParentId, CreatedBy.Name, CreatedDate, Field, OldValue, NewValue From Histories) From IO_Line__c i where i.Channel_IO__c=:channelIOId]);
       
       
    }
}
if I replace
<apex:column value="{!rec.LineName}" />
with
<apex:column value="{!rec}" />
I am able to see the complete record.
Please let me know if I missed something.

Thanks
Praveen
  • January 04, 2014
  • Like
  • 0

Hello,

 

Could use your help:

 

I'm trying to use JQuery Mobile within Salesforce. I've run into a problem where CommandButtons don't work. I've put together a basic example of this below. If you simply remove the jquery.mobile-1.3.2.min.js reference, it starts working properly again.

 

Has anyone resolved this issue, can anyone provide me an alternate solution for changing pages? Any recent JQuery library version has the same results.

 

FYI: Also I tried CommandLink, it also has issues where the first time you click it just refreshes the page.

 

CustomPage1:

<apex:page standardStylesheets="false" showHeader="false" sidebar="false" controller="CustomController1">
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <apex:stylesheet value="{!URLFOR($Resource.styles, 'bootstrap.css')}"/>
        <apex:stylesheet value="{!URLFOR($Resource.styles, 'jquery.mobile-1.3.2.min.css')}"/>
        <apex:includeScript value="{!URLFOR($Resource.styles, 'jquery-1.9.1.min.js')}" />
        <apex:includeScript value="{!URLFOR($Resource.styles, 'jquery.mobile-1.3.2.min.js')}" /> 
    </head>
    <body>
        <apex:form>
            <apex:commandButton styleClass="btn btn-success" action="{!next}" value="Next"/>
        </apex:form>
    </body>
</html>

 

 

 

CustomPage2:

<apex:page standardStylesheets="false" showHeader="false" sidebar="false" controller="CustomController1">
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <apex:stylesheet value="{!URLFOR($Resource.styles, 'bootstrap.css')}"/>
        <apex:stylesheet value="{!URLFOR($Resource.styles, 'jquery.mobile-1.3.2.min.css')}"/>
        <apex:includeScript value="{!URLFOR($Resource.styles, 'jquery-1.9.1.min.js')}" />
        <apex:includeScript value="{!URLFOR($Resource.styles, 'jquery.mobile-1.3.2.min.js')}" /> 
    </head>
    <body>
        <apex:form>
            <apex:commandButton styleClass="btn btn-success" action="{!previous}" value="Previous"/>
        </apex:form>
    </body>
</html>

 

CONTROLLER:

public class CustomController1 
{
    public PageReference next()
    {
        return Page.CustomPage2;
    }
    public PageReference previous()
    {
        return Page.CustomPage1;
    }
}

 

Thanks for your help with this.

Hi All,

 

How to add Mobile SDK in existing project and I don't know how to play with delgate.m.
Could anybody help me out.

 

Thanks in advance.

Zubair.

  • September 17, 2012
  • Like
  • 0

Hi

Tell me how to get only date from a value or how to delete time from this format.

2011-09-20 00:00:00

 

thanks

Anuraj

  • October 12, 2011
  • Like
  • 0

Hi All,

 

I am trying to implement the three dimension array in apex, could any one let me know where I am getting struck.

/* Here goes my java snippet */
private static int[][][] MAX_LENGTH = {
        { {41,  25,  17,  10},  {34,  20,  14,  8},   {27,  16,  11,  7},  {17,  10,  7,   4} },
        { {77,  47,  32,  20},  {63,  38,  26,  16},  {48,  29,  20,  12}, {34,  20,  14,  8} },        
        { {461, 279, 192, 118}, {365, 221, 152, 93},  {259, 157, 108, 66}, {202, 122, 84,  52} },
        { {552, 335, 230, 141}, {432, 262, 180, 111}, {312, 189, 130, 80}, {235, 143, 98,  60} }};
/* Apex Snippet */
private static List<List<List<Integer>>> MAX_LENGTH = {
       List<Integer> { List<Integer>{41,  25,  17,  10}, List<Integer> {34,  20,  14,  8},  List<Integer> {27,  16,  11,  7},  List<Integer>{17,  10,  7,   4} },
       List<Integer> { {77,  47,  32,  20},  List<Integer>{63,  38,  26,  16},  List<Integer>{48,  29,  20,  12}, List<Integer>{34,  20,  14,  8} }, 
       List<Integer> { List<Integer>{461, 279, 192, 118}, List<Integer>{365, 221, 152, 93},  List<Integer>{259, 157, 108, 66}, List<Integer>{202, 122, 84,  52} },
      List<Integer>  { List<Integer>{552, 335, 230, 141}, List<Integer>{432, 262, 180, 111}, List<Integer>{312, 189, 130, 80}, List<Integer>{235, 143, 98,  60} }
};

 It would be appreciative if any one could give there ideas or solution. Thanks in advance.

Regards ,

Zubair Haris.