• Witte
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 9
    Replies

Hello,

 

Can anyone help me? Im trying to save the input for a custom object. I also want to use the document object to save a document.

 

The Visual Force page

 

  <apex:page standardcontroller=Topics__c" extensions="Topics_Extension">
  <apex:form >
    <apex:pageBlock title="Topics">
                <table width="400px" >
                        <tr>
                                <td>Name:</td>
                                <td><apex:inputField value="{!Topics.Name__c}" required="true" /></td>
                        </tr>

                        <tr>
                                <td>Document:</td>
                                <td><apex:inputFile value="{!Topicsbody}" filename="{!topicsname}" required="true" /></td>
                        </tr> 

               </table>

               <apex:pageBlockButtons >
                     <apex:commandButton value="Save" action="{!saveTopics}"/>
               </apex:pageBlockButtons>

       </apex:pageBlock>

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

 

The extension - Controller

public with sharing class Topics_Extension {
    public Topics__c Topic;
    ApexPages.StandardController controller;
   
    //document variables
    public blob Topicsbody;
    public string topicsname;
   
    public Topics_Extension(ApexPages.StandardController controller) {
    this.topics = (Topics__c)controller.getRecord();
    this.controller = controller;
     }

   
    public PageReference saveTopics() { 
        controller.save();  
        return null;
    }
}

 

How can i save both. so a new topics is inserted and the document is inserted in documents.

 

Thanking you in front,

Paul

  • August 31, 2011
  • Like
  • 0

Hello,

 

im quite new with salesforce. Does anyone know how you can disable the menu which is seen if you select an image with and then click with your right mouse button. I want to prevent that someone can copy a image.

 

Does anyone knows how to get this done?

 

Thanking you in front.

 

Greetings,

Paul

  • July 06, 2011
  • Like
  • 0

Hello,

 

Can anyone help me, with hidding a image on the page for one user and show it for another user. im new in this.

Can anyone help me?

 

thanking you in front.

Paul

  • June 08, 2011
  • Like
  • 0

 

Can anyone help me with testing the following code: 

 

 

 

public cntStocksetImageBrowser(ApexPages.StandardController stdController) {

 

 

 

    theController = stdController;

 

 

 

    // the name of the stockset,

 

    thisStockset = [selectNamefrom abc__cwhere Id = :theController.getID()];

 

   abcName = thisStockset.Name; // setting up the as3 object that is used to make the AWS calls  

 

 

 

    try {

 

         AWSKeys credentials = new AWSKeys(AWSCredentialName);

 

         as3 = new S3.AmazonS3(awsServerName, credentials.key,credentials.secret);

         }

 

    catch(AWSKeys.AWSKeysException AWSEx) {

 

         ApexPages.Message errorMsg = new ApexPages.Message(ApexPages.Severity.FATAL,AWSEx.getMessage());

 

 

        ApexPages.addMessage(errorMsg);

        }

 

 

 

     bucketLocation = awsServername + bucketName + '/';

 

     stocksetFolder = awsServername + bucketName + '/' + stocksetName + '/';

 

     stocksetImagesList = new List<String>();

 

     listabcImages();

 

     theImage = abcImagesList[0];

 

}

 

 

Thanking you in front,

Paul

  • June 06, 2011
  • Like
  • 0

Can anyone tell me, help me, why the mainimage not rerenders?

The mainImage renders in a  datatable component but not in a repeat component.

Use of repeat component is because i want a list of images shown horizontally instead of vertically.

 

The VisualForce page.:

 

 

<"abc__c"extensions="cntabcImageBrowser">

<apex:form>

    <apex:pageBlock>

       <apex:outputpanelid="mainImage">

           <apex:Imagevalue="{!theImage}"title="{!theImage}"height="135px"/>

       </apex:outputpanel>

    <br/>

    <h2>Images in table form as they will be displayed the page</h2>

    <br/>

    <apex:repeatvalue="{!abcList}"var="stocksetImage">

    <apex:Image value="{!abcImage}" title="{!abcImage}" width="49px"/>

    <apex:actionSupport action="{!makeMainImage}" event="onmouseover" rerender="mainImage">     

       <apex:param name="ImageID" value="{!abcImage}" />

    </apex:actionsupport>     </apex:repeat> <!-- the list of images in a simple table -->    

    <br/>  

    <br/>

    <br/>  

    </apex:page>

</apex:pageBlock>

</apex:form>

 

 

Controller:

 

 

public String theImage {get;set;}

 

// action on Page image Generiek

    public PageReference makeMainImage(){

          theImage = ApexPages.CurrentPage().getParameters().get('ImageID');

    returnnull;

 

}

 

Thanks in front

 

Paul

  • June 01, 2011
  • Like
  • 0

Hi,

 

Can anyone explain me how to schedule data import of a CSV file.

 

I can import a csv file manually but i want it to be automated.

 

Can anyone tell were to look for.

 

thnx

 

  • November 22, 2010
  • Like
  • 0

hi,

 

I`ve placed a button and want the bevhavior to make new pupop box.

im using javascript in the javascript im refering to PHP. But the pupop box gives a syntax error.

the code used is:

window.alert(<php echo $result; ?>);

<?php
$from = "abc";
$to = "def";
$amount = 1.00;
$url = "url";
$result = file_get_contents($url);
?>

 

Cant i use php after a button? Can help me wiith this, why the syntax error is displayed?

 

  • November 22, 2010
  • Like
  • 0

Hi,

 

Im new with Salesforce and with coding of APEX.

 

Can anyone help me getting started with how to auto update an inputfield?

 

Lets say i have a made a httprequest.

 

     HttpRequest req = new HttpRequest();
     req.setEndpoint('url');
     req.setMethod('GET');

Now i want the data to be placed in a inputfield. But i dont know where to start.

  • November 22, 2010
  • Like
  • 0

Hello,

 

Can anyone help me? Im trying to save the input for a custom object. I also want to use the document object to save a document.

 

The Visual Force page

 

  <apex:page standardcontroller=Topics__c" extensions="Topics_Extension">
  <apex:form >
    <apex:pageBlock title="Topics">
                <table width="400px" >
                        <tr>
                                <td>Name:</td>
                                <td><apex:inputField value="{!Topics.Name__c}" required="true" /></td>
                        </tr>

                        <tr>
                                <td>Document:</td>
                                <td><apex:inputFile value="{!Topicsbody}" filename="{!topicsname}" required="true" /></td>
                        </tr> 

               </table>

               <apex:pageBlockButtons >
                     <apex:commandButton value="Save" action="{!saveTopics}"/>
               </apex:pageBlockButtons>

       </apex:pageBlock>

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

 

The extension - Controller

public with sharing class Topics_Extension {
    public Topics__c Topic;
    ApexPages.StandardController controller;
   
    //document variables
    public blob Topicsbody;
    public string topicsname;
   
    public Topics_Extension(ApexPages.StandardController controller) {
    this.topics = (Topics__c)controller.getRecord();
    this.controller = controller;
     }

   
    public PageReference saveTopics() { 
        controller.save();  
        return null;
    }
}

 

How can i save both. so a new topics is inserted and the document is inserted in documents.

 

Thanking you in front,

Paul

  • August 31, 2011
  • Like
  • 0

Hello,

 

im quite new with salesforce. Does anyone know how you can disable the menu which is seen if you select an image with and then click with your right mouse button. I want to prevent that someone can copy a image.

 

Does anyone knows how to get this done?

 

Thanking you in front.

 

Greetings,

Paul

  • July 06, 2011
  • Like
  • 0

hi,

 

I`ve placed a button and want the bevhavior to make new pupop box.

im using javascript in the javascript im refering to PHP. But the pupop box gives a syntax error.

the code used is:

window.alert(<php echo $result; ?>);

<?php
$from = "abc";
$to = "def";
$amount = 1.00;
$url = "url";
$result = file_get_contents($url);
?>

 

Cant i use php after a button? Can help me wiith this, why the syntax error is displayed?

 

  • November 22, 2010
  • Like
  • 0

Hi,

 

Im new with Salesforce and with coding of APEX.

 

Can anyone help me getting started with how to auto update an inputfield?

 

Lets say i have a made a httprequest.

 

     HttpRequest req = new HttpRequest();
     req.setEndpoint('url');
     req.setMethod('GET');

Now i want the data to be placed in a inputfield. But i dont know where to start.

  • November 22, 2010
  • Like
  • 0