• timarp
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

I have been stuck with this for over a day.

 

I am using a component. that was obtained from an unmanaged package,  in my visualforce page. It is complaining that one of the attributes is not getting the right type for its parameter.

 

Following is the attribute definition and controller variable

 

 

  <apex:attribute name="leftOptions"
    description="Options list for left listbox." type="SelectOption[]"
    required="true" assignTo="{!leftOptions}" />

 

public SelectOption[] leftOptions { get; set; }

 

In my VF page, this is how I have been using it and the corresponding extension code

 

My VF:

                    <apex:column headerValue="Dates of Service" >
                        <apex:variable var="dos1" value="{!s.multiLineEdit_tag__c}"/>                        
                        <c:MultiselectPicklist leftLabel="" leftOptions="{!leftOptionList[dos1]}" rightLabel="" rightOptions="{!rightOptionlist[dos1]}"  size="5" width="150px"/>                                
                     </apex:column>   

 

My Controller:

    public List <SelectOption[] > leftSideOptions = new List <List<SelectOption> >();   
    public List<SelectOption[] > getleftOptionList()
    {
        system.debug('leftSideOptions'+leftSideOptions);
        return leftSideOptions;
    }

 

It throws me a VF error as:

Cannot convert the value of '{!leftOptions}' to the expected type.

 


Could someone guide me as to what I am doing wrong?

 

Thank you.

  • November 20, 2012
  • Like
  • 0

Ok, so I have created this HUGE chunk of javascript inside my visualforce page which was meant to replace the multi line edit page for OpportunityProduct. The javascript is almost 600 lines big (is it a design fault to begin with? I opted for javascript mainly since I had so many field dependencies that simply could not be dealt with using controlling and dependent fields)

 

Anyways, I will write a test class next to make sure my extension is working. However, a lot of the testing, in my opinion, will have to make sure the javascript is showing and hiding elements like it's intended to. Any ideas on how I should be approaching QAing this monster of a VF page. I am thinking normal apex test classes along with some javascript testing framework (suggestions anyone?)

 

Thanks

 

  • October 30, 2012
  • Like
  • 0

This is probably an easy one, but I am kind of lost when it comes to regular expressions

 

So this is the string I have

 

0.0&#124;&#124;&#124;&#124;&#124;&#124;&#124;1.0&#124;Arizona;California;&#124;&#124;&#124;&#124;&#124;&#124;

 

The &#124; is a "|" sign.

 

I would like to be able to split the string on that character. I was reading about the String.split() method, however some concrete example would be appreciated. Thanks!

  • October 28, 2012
  • Like
  • 0

I have been stuck with this for over a day.

 

I am using a component. that was obtained from an unmanaged package,  in my visualforce page. It is complaining that one of the attributes is not getting the right type for its parameter.

 

Following is the attribute definition and controller variable

 

 

  <apex:attribute name="leftOptions"
    description="Options list for left listbox." type="SelectOption[]"
    required="true" assignTo="{!leftOptions}" />

 

public SelectOption[] leftOptions { get; set; }

 

In my VF page, this is how I have been using it and the corresponding extension code

 

My VF:

                    <apex:column headerValue="Dates of Service" >
                        <apex:variable var="dos1" value="{!s.multiLineEdit_tag__c}"/>                        
                        <c:MultiselectPicklist leftLabel="" leftOptions="{!leftOptionList[dos1]}" rightLabel="" rightOptions="{!rightOptionlist[dos1]}"  size="5" width="150px"/>                                
                     </apex:column>   

 

My Controller:

    public List <SelectOption[] > leftSideOptions = new List <List<SelectOption> >();   
    public List<SelectOption[] > getleftOptionList()
    {
        system.debug('leftSideOptions'+leftSideOptions);
        return leftSideOptions;
    }

 

It throws me a VF error as:

Cannot convert the value of '{!leftOptions}' to the expected type.

 


Could someone guide me as to what I am doing wrong?

 

Thank you.

  • November 20, 2012
  • Like
  • 0

This is probably an easy one, but I am kind of lost when it comes to regular expressions

 

So this is the string I have

 

0.0&#124;&#124;&#124;&#124;&#124;&#124;&#124;1.0&#124;Arizona;California;&#124;&#124;&#124;&#124;&#124;&#124;

 

The &#124; is a "|" sign.

 

I would like to be able to split the string on that character. I was reading about the String.split() method, however some concrete example would be appreciated. Thanks!

  • October 28, 2012
  • Like
  • 0