• astroboiii
  • NEWBIE
  • 35 Points
  • Member since 2012

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

I have noticed that in a VF page if you have a picklist field as your first field the initial field set to focus is the first non-picklist field.  This is undesireable and odd as I want the user's tab-focus to be on the first field of the page.

 

has anyone else noticed this and know a way to achieve the desired (expected) result?  I have already tried setting focus to the field in question via js but it seems to be ignored or some other script included by SFDC is being run to set the tab index to the first non-picklist field.

 

Thanks in advance to all those who view/help.

i have a simple inputText field a commandbutton an actionstatus section and an outputText field.  I want to enter text in the inputText, hit the command button, bind whatever is in the inputText to the corresponding controller variable and have it display in the outputText field.

 

Now, if I get rid of all the ajaxy stuff it works fine but that just won't do.  Is there any way to get this to work?  The controller variable is always null no matter what i do.

 

Thanks.

 

Below is the code:

 

public with sharing class ParameterPassCntrlr {
	public String input {get; set;}
	
	public ParameterPassCntrlr(){
		
	}
	
	public void parameterAction(){
		try {
			this.input = ApexPages.currentpage().getparameters().get('input'); 
		}catch(Exception e){
			ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,e.getMessage()));
		}
	}
}

 

<apex:page controller="ParameterPassCntrlr" >
	<apex:actionstatus id="pleasewait">
		<apex:facet name="start">
			<div class="waitingSearchDiv" id="el_loading" style="background-color: #fbfbfb;
			height: 100%;opacity:0.65;width:100%;"> 
				<div class="waitingHolder" style="top: 200px; width: 91px;">
						<img class="waitingImage" src="/img/loading.gif" title="Please Wait..." />
					<span class="waitingDescription">Loading...</span>
				</div>
			</div>
		</apex:facet>
	</apex:actionstatus>
	
	<apex:form >	
		<apex:pageBlock mode="submit" title="Param Pass">            
			<apex:outputPanel id="messages">			                
				<apex:pageMessages />
			</apex:outputPanel>
	            
			<apex:pageBlockButtons >
				<apex:actionRegion >
					<apex:commandButton value="Pass" action="{!parameterAction}" reRender="output" status="pleasewait" >						
					</apex:commandButton>
				</apex:actionRegion>
			</apex:pageBlockButtons>
			
			<apex:pageBlockSection showHeader="true" title="INPUT" columns="1">
				<apex:inputText value="{!input}" label="Input:" title="Input"/>
			</apex:pageBlockSection>
			
			<apex:pageBlockSection Id="output" showHeader="true" title="OUTPUT" columns="1">
				<apex:outputText value="{!input}" label="Output:" />
			</apex:pageBlockSection>		 						
		</apex:pageBlock>	
	</apex:form>
	
</apex:page>

 

I'm tryign to help aid some developers on their test class creation in an environment with a lot of cooks in the kitchen.  Things are changing quite often and it's often hard on the test case creation process when fields that weren't required yesterday are required tomorrow etc.

 

So I'm trying to make a simple class that takes in an object type and builds the object for you, checking the objects describe field results to find the fields required.

 

However, in trying to do this one of the parameters I use is checking if the field's isNillable is false.  This worked for some environments but not in others... For example, in one environment account.name was returning a true value for IsNillable but we all know this is not true (and after thinking I lost my mind and tried to do this myself on the backend as a test...I confirmed you can't).

 

Any ideas why it would return true? or does anyone have a sure fire way to detect which fields are required using the schema?

 

Thanks

I have noticed that in a VF page if you have a picklist field as your first field the initial field set to focus is the first non-picklist field.  This is undesireable and odd as I want the user's tab-focus to be on the first field of the page.

 

has anyone else noticed this and know a way to achieve the desired (expected) result?  I have already tried setting focus to the field in question via js but it seems to be ignored or some other script included by SFDC is being run to set the tab index to the first non-picklist field.

 

Thanks in advance to all those who view/help.

i have a simple inputText field a commandbutton an actionstatus section and an outputText field.  I want to enter text in the inputText, hit the command button, bind whatever is in the inputText to the corresponding controller variable and have it display in the outputText field.

 

Now, if I get rid of all the ajaxy stuff it works fine but that just won't do.  Is there any way to get this to work?  The controller variable is always null no matter what i do.

 

Thanks.

 

Below is the code:

 

public with sharing class ParameterPassCntrlr {
	public String input {get; set;}
	
	public ParameterPassCntrlr(){
		
	}
	
	public void parameterAction(){
		try {
			this.input = ApexPages.currentpage().getparameters().get('input'); 
		}catch(Exception e){
			ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,e.getMessage()));
		}
	}
}

 

<apex:page controller="ParameterPassCntrlr" >
	<apex:actionstatus id="pleasewait">
		<apex:facet name="start">
			<div class="waitingSearchDiv" id="el_loading" style="background-color: #fbfbfb;
			height: 100%;opacity:0.65;width:100%;"> 
				<div class="waitingHolder" style="top: 200px; width: 91px;">
						<img class="waitingImage" src="/img/loading.gif" title="Please Wait..." />
					<span class="waitingDescription">Loading...</span>
				</div>
			</div>
		</apex:facet>
	</apex:actionstatus>
	
	<apex:form >	
		<apex:pageBlock mode="submit" title="Param Pass">            
			<apex:outputPanel id="messages">			                
				<apex:pageMessages />
			</apex:outputPanel>
	            
			<apex:pageBlockButtons >
				<apex:actionRegion >
					<apex:commandButton value="Pass" action="{!parameterAction}" reRender="output" status="pleasewait" >						
					</apex:commandButton>
				</apex:actionRegion>
			</apex:pageBlockButtons>
			
			<apex:pageBlockSection showHeader="true" title="INPUT" columns="1">
				<apex:inputText value="{!input}" label="Input:" title="Input"/>
			</apex:pageBlockSection>
			
			<apex:pageBlockSection Id="output" showHeader="true" title="OUTPUT" columns="1">
				<apex:outputText value="{!input}" label="Output:" />
			</apex:pageBlockSection>		 						
		</apex:pageBlock>	
	</apex:form>
	
</apex:page>

 

I'm tryign to help aid some developers on their test class creation in an environment with a lot of cooks in the kitchen.  Things are changing quite often and it's often hard on the test case creation process when fields that weren't required yesterday are required tomorrow etc.

 

So I'm trying to make a simple class that takes in an object type and builds the object for you, checking the objects describe field results to find the fields required.

 

However, in trying to do this one of the parameters I use is checking if the field's isNillable is false.  This worked for some environments but not in others... For example, in one environment account.name was returning a true value for IsNillable but we all know this is not true (and after thinking I lost my mind and tried to do this myself on the backend as a test...I confirmed you can't).

 

Any ideas why it would return true? or does anyone have a sure fire way to detect which fields are required using the schema?

 

Thanks

When you build page layouts in SF, you can create a new Section, and one of the properties is "Tab-key Order", options are "Left-Right" or "Top-Down".

 

How can I create the same effect in Visual Force?

 

The pageBlockSection has the "columns" attrubute, but not the order direction.

 

Then I looked at the inputFields to see if I can change their index, but there is no easily exposed attribute. 

 

This seems like an oversight.  I figured that I could create similiar layouts/flow with VisualForce.

 

Am I missing someplace?

 

Thanks,

Steve