• thedge
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 11
    Replies
Should I expect the following Visualforce code
 
#1 Code:
<apex:inputField id="aFirstName" value="{!a.First_Name__c}"/>

 to generate the following HTML (assume the defined salesforce field type is standard text)?
 
#2 Code:
<input type="text" id="aFirstName" value="">

The reason I ask is because when I create a standard html input text box (like the one in #2 above) and use script to set its value using:

window.document.getElementById("aFirstName").value='TestFirstName'

it works fine but as soon as I convert it to a Visualforce input field (like the one in #1 above) the browser fails to locate the field with the id of "aFirstName".  Does VF alter the ID specified in the inputField tag when generating HTML?  Since I can't view source it is impossible for me to tell.

thanx,

Tom


 

  • December 19, 2007
  • Like
  • 0
I created a simple Visualforce page using the standardController for Contact to display Account information and included it on the contact page layout.  It worked fine until I recevied my email this morning that Person Accounts have been enabled in my developer organization.  Now the contact page displays the native contact information correctly but produces the following error in the section where the custom page should appear:
 
"SObject row was retrieved via SOQL without querying the requested field: IsPersonAccount"
 
 
I have included a scaled down version of the custom page as a reference.
 
Code:
<apex:page showHeader="false" sidebar="false" standardController="Contact">
<apex:pageBlock>
 <apex:outputField value="{!contact.Account.Name}"/> 
</apex:pageBlock> 
</apex:page>

 

Since Person accounts were just enabled in my organization none of the contact records are "PersonAccounts"

thanx.



Message Edited by thedge on 12-11-2007 02:55 PM
  • December 11, 2007
  • Like
  • 0
I'm running into a strange rendering problem when utilizing the <ajax:inputField> tag with a multi-select pick list inside of a tabPanel.
 
The list renders very small and the user cannot make out the lselection ist contents.  If I request the same list in the same panel a second time (different name for the id attribute) the second list renders perfectly.
 
If I remove the tabPanel then everything looks like it should.
....
 
Renders Incorrectly:
<apex:pageBlock title="Profile Information">
     <apex:tabPanel switchType="client" selectedTab="General" id="theTabPanel">
          <apex:tab name="General" title="General" label="General">
               <apex:form>
                    <apex:outputLabel for="aLanguages" value="Languages: "/>
                    <apex:inputField id="aLanguages" value="{!a.Languages__c}"/>
               </apex:form>
          </apex:tab>
     </apex:tabPanel>
</apex:pageBlock>

Renders Correctly (only aLanguages2 renders correctly)

<apex:pageBlock title="Profile Information">
     <apex:tabPanel switchType="client" selectedTab="General" id="theTabPanel">
          <apex:tab name="General" title="General" label="General">
               <apex:form>
                    <apex:outputLabel for="aLanguages" value="Languages: "/>
                    <apex:inputField id="aLanguages" value="{!a.Languages__c}"/>
                    <apex:outputLabel for="aLanguages2" value="Languages: "/>
                    <apex:inputField id="aLanguages2" value="{!a.Languages__c}"/>
               </apex:form>
          </apex:tab>
     </apex:tabPanel>
</apex:pageBlock>
 
any ideas?
  • December 09, 2007
  • Like
  • 0
I have created two custom objects (Obj 1, Obj 2) that are linked via a lookup field (Obj 2 lookup to Obj 1).  I've added the Obj 2 related list to the page layout for Obj 1 and added several additional fields (field b, field c, etc.) , from Obj 2 to the related list displayed fields.
 
When I reference the related list via the <apex:relatedList> tag on a VF page the additional fields that I added to the related list (field b, field c, etc.) do not show up.  The documentation led me to believe that related lists displayed on VF pages obtain their content from the defined page layout for the object.
 
 
  • December 04, 2007
  • Like
  • 0
Greetings!!

I want to ask you two  questions:-

1. Is there any way in VF, where we can select a value from a "Selectlist" and upon selection of the that value the page will refresh and associated fields, or you can say details will be displayed.

2. with your help i have made the check box to appear inside the datalist but the header thing is not comming over there, how can I do that.

Thanks in anticipatino of your kind resolution to my issue.

regards
Pallav
  • January 04, 2008
  • Like
  • 0
I want to show the data that is being the result of query in to salesforce, in a grid and there has to be a check box along with each record displyed. I any one has any knowledge or have worked on this before, please share their knowledge.

Thanks in anticipation of your valuable response.
  • January 03, 2008
  • Like
  • 0
Should I expect the following Visualforce code
 
#1 Code:
<apex:inputField id="aFirstName" value="{!a.First_Name__c}"/>

 to generate the following HTML (assume the defined salesforce field type is standard text)?
 
#2 Code:
<input type="text" id="aFirstName" value="">

The reason I ask is because when I create a standard html input text box (like the one in #2 above) and use script to set its value using:

window.document.getElementById("aFirstName").value='TestFirstName'

it works fine but as soon as I convert it to a Visualforce input field (like the one in #1 above) the browser fails to locate the field with the id of "aFirstName".  Does VF alter the ID specified in the inputField tag when generating HTML?  Since I can't view source it is impossible for me to tell.

thanx,

Tom


 

  • December 19, 2007
  • Like
  • 0
I'm using the following image formula field on account as a support rating indicator:  (Note the use of custom images)
IF( ISPICKVAL(Rating, "Gold") , IMAGE( "servlet/servlet.FileDownload?file=01560000000DE09", "gold image scaled to 15x50 pixels", 15, 50),
IF( ISPICKVAL(Rating, "Silver"), IMAGE( "servlet/servlet.FileDownload?file=01560000000DDzu", "silver image scaled to 15x50 pixels", 15, 50),
IF( ISPICKVAL(Rating, "Bronze") , IMAGE( "servlet/servlet.FileDownload?file=01560000000DE04", "bronze image scaled to 15x50 pixels", 15, 50),
"Outliner")))
This formula field works fine on the Account, but when I reference this custom field in my S-Control to display on the Contact or Case record it displays a blank image?  What is ironic is that if I use the generic images hosted on Salesforce for image formula fields like red or green, the S-Control can reference the image and displays just fine.
 
Note I'm just using a simple retrieve call to pull back the formula field and then referencing the record.formulafield to display the image in the S-Control.
 
Can anyone point me in the right direction?
I'm running into a strange rendering problem when utilizing the <ajax:inputField> tag with a multi-select pick list inside of a tabPanel.
 
The list renders very small and the user cannot make out the lselection ist contents.  If I request the same list in the same panel a second time (different name for the id attribute) the second list renders perfectly.
 
If I remove the tabPanel then everything looks like it should.
....
 
Renders Incorrectly:
<apex:pageBlock title="Profile Information">
     <apex:tabPanel switchType="client" selectedTab="General" id="theTabPanel">
          <apex:tab name="General" title="General" label="General">
               <apex:form>
                    <apex:outputLabel for="aLanguages" value="Languages: "/>
                    <apex:inputField id="aLanguages" value="{!a.Languages__c}"/>
               </apex:form>
          </apex:tab>
     </apex:tabPanel>
</apex:pageBlock>

Renders Correctly (only aLanguages2 renders correctly)

<apex:pageBlock title="Profile Information">
     <apex:tabPanel switchType="client" selectedTab="General" id="theTabPanel">
          <apex:tab name="General" title="General" label="General">
               <apex:form>
                    <apex:outputLabel for="aLanguages" value="Languages: "/>
                    <apex:inputField id="aLanguages" value="{!a.Languages__c}"/>
                    <apex:outputLabel for="aLanguages2" value="Languages: "/>
                    <apex:inputField id="aLanguages2" value="{!a.Languages__c}"/>
               </apex:form>
          </apex:tab>
     </apex:tabPanel>
</apex:pageBlock>
 
any ideas?
  • December 09, 2007
  • Like
  • 0
So we have a custom object in salesforce.com that allows us to build pretty complex product configurations and I would like to create a wizard for this. Straight through wizards are no problem, but what I want to do is create a dynamic wizard to show specific pages based on values selected.

The first page only contains one picklist with a list of our products. Based on what is selected here I would like to forward to a specific page.

Page one:
Picklist values: Product A, Product B, Product C.

If A selected, go to apex page A, if B selected go to apex page B, etc, I struggle with setting up the controller class and handling these if statements.

I would think it would be pretty simple I just struggle with the syntax and code form. You can see what I am trying to do with the branch function.



Here is what I have

Page 1
Code:
<apex:page controller="configGuide" tabStyle="Configuration__c">
<apex:sectionHeader title="Configuation Wizard" subtitle="Step 1"/>
<apex:form>
<apex:pageBlock title="Configuration Type">

<apex:pageBlockButtons>
<apex:commandButton action="{!branch}" value="Next"/>
</apex:pageBlockButtons>

<apex:pageBlockSection>




<apex:panelGrid>
<apex:outputLabel value="What Type of configuration would you like to build—" for="configType"/>
<apex:inputField id="configType" value="{!config.Product__c}"/>

</apex:panelGrid>


</apex:pageBlockSection>

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

 Controller
Code:
public class configGuide {

Configuration__c config;

public Configuration__c getConfig() {
if(config == null) config = new Configuration__c();
return config;
}

public PageReference branch() {
if(config.Product__c == 'BIG-IP'){
 return Page.BIGStep1;
}
} public PageReference configStep1() { return Page.configStep1; } public PageReference FPStep1() { return Page.FPStep1; } public PageReference BigStep1() { return Page.BigStep1; } public PageReference WJStep1() { return Page.WJStep1; } public PageReference save() { insert config; PageReference configPage = new PageReference('/' + config.id); configPage.setRedirect(true); return configPage; } }

 


  • December 07, 2007
  • Like
  • 0
I have created two custom objects (Obj 1, Obj 2) that are linked via a lookup field (Obj 2 lookup to Obj 1).  I've added the Obj 2 related list to the page layout for Obj 1 and added several additional fields (field b, field c, etc.) , from Obj 2 to the related list displayed fields.
 
When I reference the related list via the <apex:relatedList> tag on a VF page the additional fields that I added to the related list (field b, field c, etc.) do not show up.  The documentation led me to believe that related lists displayed on VF pages obtain their content from the defined page layout for the object.
 
 
  • December 04, 2007
  • Like
  • 0
I have a page with the following structure:

<apex: page>
<apex:form>
<apex: pageBlock>
<apex:inputText id="mytextinput">
.....


(forgive the spaces between "apex:" and "page" - necessary to avoid emoticons)

Prior to Winter '08, using {!$Component.mytextinput} gave me the ID of inputText component.

As of Winter '08, this no longer works (it just returns a blank string).

To access that component, I have to do two things:

(1) give an ID to the pageBlock, and then
(2) Use the hierarchical Component notation: {!$Component.mypageblock.mytextinput}

The Winter '08 docs are ambiguous with regards to the necessity of these extra steps.  They state:

For example, suppose you want to access a data table component that is contained in an <apex: pageBlock> tag. You only need to specify the ID for the <apex:dataTable> tag.This way, if the page hierarchy is ever changed (for example, if an <apex:detail> tag is wrapped around the table), you do not have to change your code.

Component IDs are accessed hierarchically on a page. For example, to access a data table with the ID tableID contained in a page block with the ID blockID, use the following expression: $Component.blockID.tableID.


These two paragraphs almost contradict each other; to me they make sense only if they are read as "if you have specified IDs for items higher in your hierarchy, then you need to use those IDs with the $Component accessor ($Component.mypageblock.mytextinput).  If you don't have IDs higher in your hierarchy, then you may use the direct accessor ($Component.mytextinput)."

However, my test case shows that the full hierarchy is required both on the page and in the accessor.

  • November 08, 2007
  • Like
  • 0
We are having a strange issue with an integration we are writing around socket level timeouts. This is happening usually within a minute of the application running and doesn't appear to be a session management issue. This is happening while doing a series (sometimes as few as 70) of small SOQL queries (each returns one row) that happens at the beginning of the application.

We are seeing this exception:

java.net.ConnectException: Connection timed out: connect
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection timed out: connect
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

This is using JDK1.5.0_01 and Axis 1.2.1. and going against a trial version account that was upgraded to EE

Has anyone seen this or have any ideas of what may be causing the issue? Since itis an Axis/Java exception we are going to try various combinations of JVM's and Axis levels to see if that resolves it.

Any ideas or thoughts would be appreciated!

Thanks,

John