• Yoshinori Mori
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 28
    Replies

When I tried Run-test on Eclipse, The above subject error message shows up.

This is a bit too vaqgue for me.

Could it be possible to teach me what this means more clearly for me.

Regards

 

Mori 

There's a problem of garbage charactor for downloaded file from URL.

By clicking the URL downloaded file can be viewed with the following URL address.

https://c.cs0.content.force.com/servlet/servlet.FileDownload?file=**********.

However, Japanese charactors can be seen as garbage charactors on the window.

I have to change to Unicode(UTF-8) evertime.

No shift-JIS or other code can not be used for Japanese?

I appreciate if anybody could provide me with some solution for this.

Thanks

Mori

 

 

I'd like to have same width of cell border lines in the table on a visual force page.

I appreciate if I could have some help.

 

I wrote in css definition as follows.

There may be some unnecessary lines involved,

But there was no error.

 

.sample {
         text-align:center;
         vertical-align: middle;
         background-color:#FFFFFF;         
         /*border-top-width:1px;
         border-bottom-width:1px;
         border-right-width:1px;
         border-left-width:1px;*/
         border-width:thin;
         /*border-width:1px 1px 1px 1px;
         border-color:black;padding: 0px;*/         
}

 

I wrote html tags for table  as follows.

(I'm not sure, but  there might be some missing or ineffective definitions) 

As to first table tag, cellspacing is set  as "0" and bgcolor is set to have black.

2nd inside table tag cellspacing is set as "1"

 

td tag which is to have actual data sets bgcolor as white.

 

and then have 2 ending table tags.

 

 

 

    <table border="1" cellpadding="0" cellspacing="0" bgcolor="#000000" style="border-width:1px;">  

      <tr>
      <td>
       <table cellspacing="1" style="border: 1px soild black">

 

       *********************************************************

 

       <td text-align="middle" border-width="0" cellspacing="1" bgcolor="#FFFFFF" id="cDataCell"><apex:outputText value="**********"/></td>

 

       *********************************************************

 

       </table>
       </td>
       </tr>
      </table>

 

I found out that if a next cell ( either top, bottom, left or right) which has data from object table, the border line becomes thinner.

If the next cell dosn't have data, the line gets thicker.

It seems like it depends on whether the next cell has data or not.

 

I would like to have same width line for all table data cells regardsless of the next cell data.

 

If there is any resolution for this, Please let me know

 

Thanks

Mori

 

 

Is there any apex tag or css style available for cell borders?

Cell border lines are not appearing when no data for the cell is stored in the object.

The lines are apprearing for the cells  where data is stored at the moment.

The cell borders need to appear even though the cell doesn't have data. 

 

Regards

Mori

I simply don't understand the idea of the difference between List and Non-List type(simple Object(DB) type).

List<ABCobject__c> abc and ABCobject__c

Names are the same.

Both are to be used.

 

Please correct what I understand about the List and Non-List(object(DB) type)

 

1.List type is to store data with index.

2.List type is needed to do something  if or while statement  while storing all data into List type object?

   Do something from the all data?

3. Non-List is simply needed to access single data from the Non-List object.

 

Thanks

Mori  

I'd like to try make font look bigger in the cell without changing the HTML tags nor CSS cell line definition.

I tried  <apex ......style = "margin:0px 0px 0px 0px" and <apex ...... font-size=: em,%, px and larger

However didn't work.

If I change font-size larger the cell line push below.

I would like to have 1 PDF page.

 

If there is a way out , please let me know.

 

Thanks

Mori

 

I would like to place colspan label indicating the categories in front of the some colums as below.

Do I need to change to HTML tags using like <tr><th>?

Is there a way only to add some simple apex tag for this?

 

<apex:column id="city" >
                    <apex:facet name="header">City Name</apex:facet>
                    <apex:outputField value="{cityname__c}" />
 </apex:column>

 <apex:column id="production"  >
                    <apex:facet name="header">Production Name</apex:facet>
                    <apex:outputField value="{product__c}" />
 </apex:column>

 

Thanks

Mori

 

I have a fundamental question regarding Mapping.

I would like to do objMap.put as below.

Within the for loop

I don't understand why I can't use "objMap.put" instead of obj.put

There is  no error if I use "obj.put (obj.somithing_r.relation__c, obj);"

 

for(Data__c obj : dataset) {
    objMap.put(obj.somithing_r.relation__c, obj);
 } 

(Example)

public List<CityNameMast__c>cityname =  new List<CityNameMast__c>();  
public List<Data__c> dataset = new List<Data__c> ();  
dataset = DBAccess.getdata(); 
 Map<String, List<Data__c>> objMap = new Map<String, List<Data__c>>();
 for(Data__c obj : dataset) {
    objMap.put(obj.somithing_r.relation__c, obj);
 } 
 for(CityNameMast__c x: cityname) { 
   if(objMap.containsKey(x.cityname__c)) { 
   objMap.add(x.MiddleAreaName__c);
 } else {
 }

 

Mori

I want to get same component of selectlist(multiselext) on visual force page.

Like selecting multiple items in the left box and press add button and they move to box on the right.

I know it is possible to get it by changing data type of object from text to select list(multiselect) and by writing inputfield in Vusual force and some additional code in Cotroller as well.

But I don't want to change data type of existing object.

I appreciate if you could provide some sample code for Controller and VF.

 

I already got check boxes section  on the page above.

I need to select items from there and need to show the items in the left box below.

Then I want what I described above.

 

Thanks

Mori

I want to arrange checkboxes as below.

Could it be possible to teach me  how to write codes for the case below?

 

------------------------------pageblock ------------------------------------------------------------

 

------------------------------pageblocksection1(parent)------------------------------------------

 

 --------pageblocksection11(child1)---------- -----------pageblocksection12(child2)---------------

a1                                                                             b1

a2                                                                             b2      

a3                                                                             b3      

 

 

Mori

Could anyone tell me what kind of tag I should use to make some charactors appear on the page?

Not need for data.

 

I tried "text-align:vertical"

But didn't work.

 

<apex:column id="something" style="text-align:vertical">

<apex:facet><br/>&nbsp;あいうえお&nbsp;</apex:facet>                
         <apex:outputField value="{!x.things_c}"/>
</apex:column>

 

Mori

Is there any method to execute SOQL with selected date on the calender?

As far as I understand, I should use action support tag and "on onclick" or "on chage" for event on visual force page.

 

I appreciate if you could help me with Apex code either..

 

Thanks

Mori 

I'd like to obtain sample codes for Salesforce to select Year,Month,Day all by using combobox.

I'd like to select Year,Month then Day.

When selecting after Month, The number of Day needs be retrieved according to the number of actual days for the month. For example, Jan should have 31 days, on the other hand, Feb should have 28 days.

I appreciate if any member of the discussion boards provide me with the sample codes and also give me an idea of how the YMD object also needs to be prepared and configured.

 

Thanks

 

Mori

I would like to retrieve data selected using  the calender.

I still can't get the stored data.

I appreciate if anyone could help with this issue. 

There was no error either with Visual force, Classes( 2 Classes)

 

(Visual Force is as follows)

Other parts except the following are abbreviated.

-----------------abbreviation------------------

<apex:inputfield value="{!task.POP_UPReceiptDateTime__c}">                        
   <apex:actionSupport event="onchange" action="{!intervalCounter}" rerender="renderPanel" />
</apex:inputfield>

----------------abbreviation------------------

 

(1st one of  the Classes is as below)

public with sharing class AAA {

        public List<ABC_T_PopUpReceipt__c> popupreceipt { get; set; }
        public ABC_T_PopUpReceipt__c createtime { get; set; }
        public datetime mstDatetime { get; set; }
        Integer count = 0;
     /////Default Constructor   
      public AAA() {
   mstDatetime = Datetime.now();
          createtime = new ABC_T_PopUpReceipt__c();
      }
      public void init(){
         initObjects();           
      }        
      public void initObjects(){  
           popupreceipt = new List<ABC_T_PopUpReceipt__c>();
           setobject();
      }       
      public void setObject(){       
        popupreceipt = AAADBAccess.getDatafromDBAccess();
      }             
      public ABC_T_PopUpReceipt__c getTask() {
  return createtime;
      }
      public void setTask(ABC_T_PopUpReceipt__c a) {
          
             mstDatetime = a.POP_UPReceiptDateTime__c;
      }
      public void reload() {
  init(); 
      }
      public PageReference intervalCounter() {
      count++;
      reload();
      return null;
      }
      public Integer getCount() {
     return count;
      }
}

 

(2nd one of the Classes is as below)

*This is to be called by the first one

 

public with sharing class AAADBAccess {
    public static List<ABC_T_PopUpReceipt__c__c> getDatafromDBAccess()
    {     
        Datetime kakuninbi = Datetime.now();
        List<ABC_T_PopUpReceipt__c__c> jyuryoukakunin = new List<ABC_T_PopUpReceipt__c__c>();
        jyuryoukakunin = [select Id, OwnerId, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp,
                          POP_UPReceiptDateTime__c,kisyou_id__c,kisyou_id__r.Title__c,user_id__c                       
                    from ABC_T_PopUpReceipt__c__c
                    where POP_UPReceiptDateTime__c = : kakuninbi
                    order by POP_UPReceiptDateTime__c desc];        
      if (kisyoukeihou.size()==1)
         return jyuryoukakunin;
      else
         return null;
    }
}

 

 

  

System.NullPointerException: Attempt to de-reference a null object 
Class.AAA.: line 44, column 3 External entry point

 

I got a error message when I open the page on the Salesforce.

 

I create a class as below.

The message is somehow indicating 3rd line "hasseijikoku.kisyou_id__r.ReportDateTime__c = mstDatetime;"

 

public with sharing class  AAA {

 

--------- abbreviation----------------

 

//Constructor

public AAA() {

 

  mstDatetime = Datetime.now();
  hasseijikoku = new WXS_T_PopUpReceipt__c();
  hasseijikoku.kisyou_id__r.ReportDateTime__c = mstDatetime;
       
         }   

 

--------- abbreviation----------------

 

There was no error neither class nor visal force on Eclipse side.

 

I appreciate if anyone could help me find the problem

 

Regards

 

Mori

 

I would like to retreive the username in the UserObject.

What is the column name of the username in the UserObject?

Sorry, but I'm new to Apex, and a beginner in programming.

I appreciate if anyone could teach me.

 

What I want to do is retrieve the username in UserObject  referenced from other object.

 

Reagards

 

Mori

 

I would like to know if 'yourObject' is used within Apex as defalt?

 

Thanks

Mori

I've been trying Run-testing using test class as below.

However, one part of program code after "catch" was not tested.

I would like to know how I should write the program in the test class. 

 

@isTest
private class WXS_TEST_ClassA {

    static testMethod void myUnitTest( ) {

*************************************************

*************************************************

WXS_CL_ClassA controller = new WXS_CL_ClassA( );

*************************************************

*************************************************

controller.save( )

*************************************************

*************************************************

}

 

class to be tested is as follows.

Will it  be about how an error is given to the "controller.save( );"?

 

public with sharing class WXS_CL_ClassA {

*************************************************

*************************************************

 public PageReference save()
    {
        try {
            upsert object name;
            init();
            inputflg = false;
        } catch (DmlException de) {
            System.debug(de.getMessage());
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error, de.getMessage()));
        }
        return null;
    }

 

 

I'm now testing by running 'Runtests' of  the test class I created.

However, I'm now facing an error explained as follows.

I would like to know  the reason of the error.

I appreciate if  somebody could  help me with the issue

 

(******** is an indication of abbreviation)

 

I wrote in the test class as follows;

 

@isTest
private class (test class name) {

  static testMethod void myUnitTest() {

**************************************

**************************************

(class name) controller = new (classname) ();

 

controller.setIntervalFlg();

 }

}

 

 

the 'class name' above is referenced to the

class to be tested below.

It seems like the error message indicates something wrong with the code written in the line of  ' if(interval.equals('none')) ' below

 

 

public with sharing class (classname) {

****************

****************

****************

public String interval { get; set; }
 public Boolean interval15Flg { get; set; }
 public Boolean interval30Flg { get; set; }
 public Boolean interval60Flg { get; set; }
 public Boolean interval300Flg { get; set; }
 public Boolean interval600Flg { get; set; }
 
 public String nowDatetime { get; set; }
 
 Integer count = 0;
    public PageReference intervalCounter() {
        count++;
        setIntervalFlg();
        refresh();
        nowDatetime = Datetime.now().format('yyyy/MM/dd HH:mm:ss');
        return null;
    }
    public Integer getCount() {
        return count;
    }

 

public void setIntervalFlg(){
  if(interval.equals('none')) {
   interval15Flg = false;
   interval30Flg = false;
   interval60Flg = false;
   interval300Flg = false;
   interval600Flg = false;
  }
  else if (interval.equals('15')) {
   interval15Flg = true;
   interval30Flg = false;
   interval60Flg = false;
   interval300Flg = false;
   interval600Flg = false;
  }
  else if (interval.equals('30')) {
   interval15Flg = false;
   interval30Flg = true;
   interval60Flg = false;
   interval300Flg = false;
   interval600Flg = false;
  }
  else if (interval.equals('60')) {
   interval15Flg = false;
   interval30Flg = false;
   interval60Flg = true;
   interval300Flg = false;
   interval600Flg = false;
  }
  else if (interval.equals('300')) {
   interval15Flg = false;
   interval30Flg = false;
   interval60Flg = false;
   interval300Flg = true;
   interval600Flg = false;
  }
  else if (interval.equals('600')) {
   interval15Flg = false;
   interval30Flg = false;
   interval60Flg = false;
   interval300Flg = false;
   interval600Flg = true;
  }

}

When I tried Run-test on Eclipse, The above subject error message shows up.

This is a bit too vaqgue for me.

Could it be possible to teach me what this means more clearly for me.

Regards

 

Mori 

I simply don't understand the idea of the difference between List and Non-List type(simple Object(DB) type).

List<ABCobject__c> abc and ABCobject__c

Names are the same.

Both are to be used.

 

Please correct what I understand about the List and Non-List(object(DB) type)

 

1.List type is to store data with index.

2.List type is needed to do something  if or while statement  while storing all data into List type object?

   Do something from the all data?

3. Non-List is simply needed to access single data from the Non-List object.

 

Thanks

Mori  

I want to get same component of selectlist(multiselext) on visual force page.

Like selecting multiple items in the left box and press add button and they move to box on the right.

I know it is possible to get it by changing data type of object from text to select list(multiselect) and by writing inputfield in Vusual force and some additional code in Cotroller as well.

But I don't want to change data type of existing object.

I appreciate if you could provide some sample code for Controller and VF.

 

I already got check boxes section  on the page above.

I need to select items from there and need to show the items in the left box below.

Then I want what I described above.

 

Thanks

Mori

Is there any method to execute SOQL with selected date on the calender?

As far as I understand, I should use action support tag and "on onclick" or "on chage" for event on visual force page.

 

I appreciate if you could help me with Apex code either..

 

Thanks

Mori 

I'd like to obtain sample codes for Salesforce to select Year,Month,Day all by using combobox.

I'd like to select Year,Month then Day.

When selecting after Month, The number of Day needs be retrieved according to the number of actual days for the month. For example, Jan should have 31 days, on the other hand, Feb should have 28 days.

I appreciate if any member of the discussion boards provide me with the sample codes and also give me an idea of how the YMD object also needs to be prepared and configured.

 

Thanks

 

Mori

I would like to retrieve data selected using  the calender.

I still can't get the stored data.

I appreciate if anyone could help with this issue. 

There was no error either with Visual force, Classes( 2 Classes)

 

(Visual Force is as follows)

Other parts except the following are abbreviated.

-----------------abbreviation------------------

<apex:inputfield value="{!task.POP_UPReceiptDateTime__c}">                        
   <apex:actionSupport event="onchange" action="{!intervalCounter}" rerender="renderPanel" />
</apex:inputfield>

----------------abbreviation------------------

 

(1st one of  the Classes is as below)

public with sharing class AAA {

        public List<ABC_T_PopUpReceipt__c> popupreceipt { get; set; }
        public ABC_T_PopUpReceipt__c createtime { get; set; }
        public datetime mstDatetime { get; set; }
        Integer count = 0;
     /////Default Constructor   
      public AAA() {
   mstDatetime = Datetime.now();
          createtime = new ABC_T_PopUpReceipt__c();
      }
      public void init(){
         initObjects();           
      }        
      public void initObjects(){  
           popupreceipt = new List<ABC_T_PopUpReceipt__c>();
           setobject();
      }       
      public void setObject(){       
        popupreceipt = AAADBAccess.getDatafromDBAccess();
      }             
      public ABC_T_PopUpReceipt__c getTask() {
  return createtime;
      }
      public void setTask(ABC_T_PopUpReceipt__c a) {
          
             mstDatetime = a.POP_UPReceiptDateTime__c;
      }
      public void reload() {
  init(); 
      }
      public PageReference intervalCounter() {
      count++;
      reload();
      return null;
      }
      public Integer getCount() {
     return count;
      }
}

 

(2nd one of the Classes is as below)

*This is to be called by the first one

 

public with sharing class AAADBAccess {
    public static List<ABC_T_PopUpReceipt__c__c> getDatafromDBAccess()
    {     
        Datetime kakuninbi = Datetime.now();
        List<ABC_T_PopUpReceipt__c__c> jyuryoukakunin = new List<ABC_T_PopUpReceipt__c__c>();
        jyuryoukakunin = [select Id, OwnerId, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp,
                          POP_UPReceiptDateTime__c,kisyou_id__c,kisyou_id__r.Title__c,user_id__c                       
                    from ABC_T_PopUpReceipt__c__c
                    where POP_UPReceiptDateTime__c = : kakuninbi
                    order by POP_UPReceiptDateTime__c desc];        
      if (kisyoukeihou.size()==1)
         return jyuryoukakunin;
      else
         return null;
    }
}

 

 

  

System.NullPointerException: Attempt to de-reference a null object 
Class.AAA.: line 44, column 3 External entry point

 

I got a error message when I open the page on the Salesforce.

 

I create a class as below.

The message is somehow indicating 3rd line "hasseijikoku.kisyou_id__r.ReportDateTime__c = mstDatetime;"

 

public with sharing class  AAA {

 

--------- abbreviation----------------

 

//Constructor

public AAA() {

 

  mstDatetime = Datetime.now();
  hasseijikoku = new WXS_T_PopUpReceipt__c();
  hasseijikoku.kisyou_id__r.ReportDateTime__c = mstDatetime;
       
         }   

 

--------- abbreviation----------------

 

There was no error neither class nor visal force on Eclipse side.

 

I appreciate if anyone could help me find the problem

 

Regards

 

Mori

 

I would like to retreive the username in the UserObject.

What is the column name of the username in the UserObject?

Sorry, but I'm new to Apex, and a beginner in programming.

I appreciate if anyone could teach me.

 

What I want to do is retrieve the username in UserObject  referenced from other object.

 

Reagards

 

Mori

 

I would like to know if 'yourObject' is used within Apex as defalt?

 

Thanks

Mori

I've been trying Run-testing using test class as below.

However, one part of program code after "catch" was not tested.

I would like to know how I should write the program in the test class. 

 

@isTest
private class WXS_TEST_ClassA {

    static testMethod void myUnitTest( ) {

*************************************************

*************************************************

WXS_CL_ClassA controller = new WXS_CL_ClassA( );

*************************************************

*************************************************

controller.save( )

*************************************************

*************************************************

}

 

class to be tested is as follows.

Will it  be about how an error is given to the "controller.save( );"?

 

public with sharing class WXS_CL_ClassA {

*************************************************

*************************************************

 public PageReference save()
    {
        try {
            upsert object name;
            init();
            inputflg = false;
        } catch (DmlException de) {
            System.debug(de.getMessage());
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error, de.getMessage()));
        }
        return null;
    }