• Shirish Dwivedi
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 8
    Replies
Here is my vf page code:

<apex:inputText value="{!searchString}" id="txtbxdo" onkeydown="if(event.keyCode==13){this.blur();}else{resetTimer();}" style="width:200px"/>

Here is my controller class

public with sharing class opportunityProductEntryExtension {

    public String searchString {get;set;}
public String getsearchString(){
        return 'True';
    }
    
    public String setsearchString(String searchString){
        if (this.searchString==searchString) {
            return 'true';
    }
        else {
            return null;
        }
        
    }
                  
I want the textbox on my page to have a String value "True" in the textbox area. It should be set automatically whenever the page is opened/reloaded.
I tried using get & set but did not work. 

Here is what my code looks like -

VF page -
<apex:inputText value="{!searchString}" onkeydown="if(event.keyCode==13){this.blur();}else{resetTimer();}" style="width:200px"/>

Controller - 
public string searchString {get;set;}

public String getsearchString(){
        return 'True';
    }
    
    public String setsearchString(String searchString){
        if (this.searchString==searchString) {
            return 'True';
    }
        else {
            return null;
        }
        
    }

I dont know but the value in the textbox is not pre-set to "True" when I load the page. Any help will be appreciated?
Hi guys,

I have customized the Opportunity Product Entry page with the help of Michealforce.org (http://www.michaelforce.org/recipeView?id=a0G30000006eVxVEAU)

But I want to have a pre-filter (just like in Standar Opportunity Product entry page) on my custom page that would show me the results specified according to that filter.

When I should click Add Product/Service button from the opportunity page it takes me to the custom page which I used from the link above. But I want the pre-filter to be automatically set with respect to "Some Field" = True and the results should be shown according to that filter. The image below shows the filter I am talking about and the Standard SF page.
User-added image
Hi everyone,

Suppose I have a "print this" hyperlink at the end of the visual force page on clicking it I want the Visual force page to open in a new window as pdf giving users direct option to print. I know with chrome we can print by right clicking mouse and so on.. but I need this print hyperlink to work.
I have tried Render as="pdf" method but since the page has complex coding structure its not working.

is there anyway I can use jsPdf library or Pdf.js library and execute the above as function. I need a way to know how can I export all the data on the visual form page to the new window as pdf?
I want the textbox on my page to have a String value "True" in the textbox area. It should be set automatically whenever the page is opened/reloaded.
I tried using get & set but did not work. 

Here is what my code looks like -

VF page -
<apex:inputText value="{!searchString}" onkeydown="if(event.keyCode==13){this.blur();}else{resetTimer();}" style="width:200px"/>

Controller - 
public string searchString {get;set;}

public String getsearchString(){
        return 'True';
    }
    
    public String setsearchString(String searchString){
        if (this.searchString==searchString) {
            return 'True';
    }
        else {
            return null;
        }
        
    }

I dont know but the value in the textbox is not pre-set to "True" when I load the page. Any help will be appreciated?
Hi guys,

I have customized the Opportunity Product Entry page with the help of Michealforce.org (http://www.michaelforce.org/recipeView?id=a0G30000006eVxVEAU)

But I want to have a pre-filter (just like in Standar Opportunity Product entry page) on my custom page that would show me the results specified according to that filter.

When I should click Add Product/Service button from the opportunity page it takes me to the custom page which I used from the link above. But I want the pre-filter to be automatically set with respect to "Some Field" = True and the results should be shown according to that filter. The image below shows the filter I am talking about and the Standard SF page.
User-added image
Hi everyone,

Suppose I have a "print this" hyperlink at the end of the visual force page on clicking it I want the Visual force page to open in a new window as pdf giving users direct option to print. I know with chrome we can print by right clicking mouse and so on.. but I need this print hyperlink to work.
I have tried Render as="pdf" method but since the page has complex coding structure its not working.

is there anyway I can use jsPdf library or Pdf.js library and execute the above as function. I need a way to know how can I export all the data on the visual form page to the new window as pdf?