• rlucas
  • NEWBIE
  • 0 Points
  • Member since 2007

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

Hi

I have an issue with a visual force page.

 

 

The issue is: I have actionSupport within a selectRadio, event=onchange and immediate="true". The setter is not being called.

The setter does get called if I do not have immediate, but in that case validation rules get called (not in this example but in the real VF page I have) and I do not want this. If I use a combo box or check boxes, the setter is called but it does notwork on radios.

 

Here is an example of the problem:

 

PAGE - test
--------
<apex:page standardController="Task" extensions="testTask">
    <apex:form id="frm">
        
        <apex:sectionHeader title="Task" subtitle="New Task" />
        <apex:pageBlock title="Task Edit" mode="edit" id="pb">

            <apex:pageBlockSection title="Information" columns="1"id="pbs">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Frequency" for="freq" />
                    <apex:selectRadio value="{!selectedv}" id="freq">
                        <apex:actionSupport event="onchange" action="{!changedOption}" rerender="b1" immediate="true" />
                        <apex:selectOptions value="{!foptions}" />
                    </apex:selectRadio>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem id="b1" >
                    <apex:outputLabel value="{!selectedv}" for="dreq" />
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>

        </apex:pageBlock>

    </apex:form>
</apex:page>




CONTROLLER - testTask
-----------
public class testTask {

   
    public Task task;
    ApexPages.StandardController con;
    public testTask(ApexPages.StandardController stdController) {
        this.task = (Task)stdController.getRecord();
        con = stdController;
    }
    
    public PageReference changedOption () {         
        system.debug( 'changedOption ' + selectedv  );
        return null;
    }

        
    public string selectedv { get; set; } { selectedv = 'd'; }
    public List<SelectOption> foptions { get; set; } {
        foptions = new List<SelectOption>();  
        foptions.add(new SelectOption('a', 'A'));
        foptions.add(new SelectOption('b', 'B'));
        foptions.add(new SelectOption('c', 'C'));
        foptions.add(new SelectOption('d', 'D'));
    }
    
}




Anyone come across this issue?

 

kind regards

Richard

 

 

  • April 13, 2009
  • Like
  • 0

I have an issue with triggers & rollup summary fields...not sure if it is a bug or if I have to code around it.

Objects:
- Master Record - Invoice
- Master Record - Project
- Detail Record - Invoice Item (ie 2 masters)

Config:
- I have rollup summary on the Project to total the invoice items.
- I also have a trigger on Invoice Item delete to perform some validation & updates elsewhere in the system.

Problem:
- When I delete an Invoice, the trigger on Invoice Item is not performed. (I believe this is accepted force.com functionality - the "way it works")

Solution:
- Created a Trigger on Invoice before delete to manually delete all Invoice Items - therefore call the invoice item delete trigger.

New problem:
- While the Invoice Item delete trigger is now performed, the Rollup Summary field on the Project is reduced twice.

For example
- To start with, the Project Rollup Summary field = $0
- Create Invoice Item for $100
- Now the Project Rollup Summary field = $100
- Delete Invoice
- Now the Project Rollup Summary field = -$100 (should be back to $0)

Anyone one come across a similar issue?

thanks
Richard

  • January 02, 2009
  • Like
  • 0

I have created the Flex 2 demo from
http://wiki.apexdevnet.com/index.php/Tutorial:_Creating_Flex_Salesforce_Mashups
 
Is it possible to test this directly from Flex Builder ? (ie press the run button in the IDE)

When I try this I get an error: 
 ----------------------------------------------------------------------------------------------------------------
(mx.rpc::Fault)#0
  errorID = 0
  faultCode = "Channel.Security.Error"
  faultDetail = "Destination: DefaultHTTP"
  faultString = "Security error accessing url"
  message = "faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP'"
  name = "Error"
  rootCause = (flash.events::SecurityErrorEvent)#1
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#2
      bytesLoaded = 0
      bytesTotal = 0
      data = (null)
      dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#2
    text = "Error #2048: Security sandbox violation: file:///D:/My Documents/workspace_flex/ProjectExample/bin/ProjectExample.swf cannot load data from http://www.salesforce.com/services/Soap/u/9.0."
    type = "securityError"
 ----------------------------------------------------------------------------------------------------------------

Is this possible?

thanks
Richard

Hi there ,

 

I have  a problem .

I want to lock a record through APEX code.

Is  it possible ?

 

 

Please  Rply....

Thanks in advance ..

 

 

 

  • April 10, 2009
  • Like
  • 0
Hi all:
   Happy Holidays.
I created a Apex class, plus a Visual Force page, and a button.Now I am trying to connect the button to the page as a List button. When I choose Content Source Visual Force Page, but my Page does not come up on the Content dropdown...
It is a custom object I wrote the VF page against. Can someone tell me how to do this?
Thanks

I have created the Flex 2 demo from
http://wiki.apexdevnet.com/index.php/Tutorial:_Creating_Flex_Salesforce_Mashups
 
Is it possible to test this directly from Flex Builder ? (ie press the run button in the IDE)

When I try this I get an error: 
 ----------------------------------------------------------------------------------------------------------------
(mx.rpc::Fault)#0
  errorID = 0
  faultCode = "Channel.Security.Error"
  faultDetail = "Destination: DefaultHTTP"
  faultString = "Security error accessing url"
  message = "faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP'"
  name = "Error"
  rootCause = (flash.events::SecurityErrorEvent)#1
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#2
      bytesLoaded = 0
      bytesTotal = 0
      data = (null)
      dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#2
    text = "Error #2048: Security sandbox violation: file:///D:/My Documents/workspace_flex/ProjectExample/bin/ProjectExample.swf cannot load data from http://www.salesforce.com/services/Soap/u/9.0."
    type = "securityError"
 ----------------------------------------------------------------------------------------------------------------

Is this possible?

thanks
Richard