• Chris110
  • NEWBIE
  • 0 Points
  • Member since 2010

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

 

<apex:outputLabel style="">
              <apex:commandButton action="{!add}" value="add"/>
              <apex:commandButton value="Search" action="{!Searchs}" onclick="return SearchClick()"/>
              </apex:outputLabel>

 use css styles like this

 

 <table width="100%">
                  <tr>
                      <td align="center">
                          <apex:commandButton action="{!add}" value="add"/>
                          <apex:commandButton value="Search" action="{!Searchs}" onclick="return SearchClick()"/>
                      </td>
                  </tr>
              </table>

 thanks for your help!

 

 

 

Now i have a site in developer froce.com.

but I can not use any user name to login.

the error messages tell me that the user name or password is incorrect.

I found that there is no any user on the Customer Portal.

when i enable the Self-Registration,but i can not be Registration any user.

The error message tell me that That operation is only allowed from within an active site.

But when i add an user can not find the Customer Portal Manager,Authenticated Website and High Volume Customer Portal.

Everyone  can help me, how can i login or registration.

thanks very much!

The data in a single object, the circumstances under which the Share button display.

For example:

An object was build after a custom tab ,we can insert some record.

In some cases we can see the sharing button, but the sharing button  Disappeared in some objects.

How to Configure it,or under what circumstances  the button can display .

Thanks for your help!

Hello everybody:

I created a trigger, and now there is an exception or error message, but I do not know how to display it on  Visualforce page.

thanks for your help!

trigger SalaryRangeTrigger on JobPosition__c (before insert) 
{
 list<testtable__c> testData;
 
 for(JobPosition__c T: Trigger.new)
 {
  if(t.Salary__c!=null)
  {
   list<Salary__c> salaryId=[select id,maxPay__c,minPay__c,SalaryName__c 
            from Salary__c
            where id=:t.Salary__c];
            for(Salary__c dataId:salaryId)
            {
                if(t.Monthly__c < dataId.minPay__c || t.Monthly__c>dataId.maxPay__c)
                {
     //Trigger.new[0].Monthly__c.addError('not a valid account');
     Trigger.new[0].addError('error messages!');
                }
                testData=new List<testtable__c>();
                testData.add(new testtable__c(minPay__c=dataId.minPay__c,maxPay__c=dataId.maxPay__c,jobId__c=dataId.SalaryName__c));
                insert testData;
            }
  }
 }
}

 

 

Trigger.new[0].addError('error messages!');

or

t.addError('error message!');t is an object;
how to Display the error on Visualforce

 

<apex:outputLabel style="">
              <apex:commandButton action="{!add}" value="add"/>
              <apex:commandButton value="Search" action="{!Searchs}" onclick="return SearchClick()"/>
              </apex:outputLabel>

 use css styles like this

 

 <table width="100%">
                  <tr>
                      <td align="center">
                          <apex:commandButton action="{!add}" value="add"/>
                          <apex:commandButton value="Search" action="{!Searchs}" onclick="return SearchClick()"/>
                      </td>
                  </tr>
              </table>

 thanks for your help!

 

 

 

Now i have a site in developer froce.com.

but I can not use any user name to login.

the error messages tell me that the user name or password is incorrect.

I found that there is no any user on the Customer Portal.

when i enable the Self-Registration,but i can not be Registration any user.

The error message tell me that That operation is only allowed from within an active site.

But when i add an user can not find the Customer Portal Manager,Authenticated Website and High Volume Customer Portal.

Everyone  can help me, how can i login or registration.

thanks very much!

Hello everybody:

I created a trigger, and now there is an exception or error message, but I do not know how to display it on  Visualforce page.

thanks for your help!

trigger SalaryRangeTrigger on JobPosition__c (before insert) 
{
 list<testtable__c> testData;
 
 for(JobPosition__c T: Trigger.new)
 {
  if(t.Salary__c!=null)
  {
   list<Salary__c> salaryId=[select id,maxPay__c,minPay__c,SalaryName__c 
            from Salary__c
            where id=:t.Salary__c];
            for(Salary__c dataId:salaryId)
            {
                if(t.Monthly__c < dataId.minPay__c || t.Monthly__c>dataId.maxPay__c)
                {
     //Trigger.new[0].Monthly__c.addError('not a valid account');
     Trigger.new[0].addError('error messages!');
                }
                testData=new List<testtable__c>();
                testData.add(new testtable__c(minPay__c=dataId.minPay__c,maxPay__c=dataId.maxPay__c,jobId__c=dataId.SalaryName__c));
                insert testData;
            }
  }
 }
}

 

 

Trigger.new[0].addError('error messages!');

or

t.addError('error message!');t is an object;
how to Display the error on Visualforce

Hi, I need to deal with the selected records from enhancedlist view. In my custom controller, I always get "c2=0" by using controller.getSelected() whenever I make the selection in the listview and then click the "get seleted" link.   What is the event for the selection?

 

And getRecords() can not return more than 20 that is not useful for the project.

 

And getRecords() can not get refresh when I select another view in the view option dropdown list.



I really appraciate if anybody has a idea! 

 

My test page:

<apex:page standardController="ProfileHierarchy__c" recordSetvar="profiles" extensions="testController">

<apex:enhancedlist type="ProfileHierarchy__c" height="200" rerender="c1,c2" />

<apex:outputText id="c1" value="c1={!c1}" /> <br>
<apex:outputText id="c2" value="c2={!c2}" /> <br>
<apex:form >
<apex:commandLink action="{!setC2}" value="get selected" reRender="c2" />
</apex:form>
</apex:page>

my controller:

 public class testController {

public testController (ApexPages.StandardSetController controller)
{
 li=controller;
}

public ApexPages.StandardSetController li{get;set;}

 

public Integer getC1(){
return ((List<ProfileHierarchy__c>)li.getRecords()).size();
}


public Integer c2=0;
public Integer getC2(){
 return c2;
}
public void setC2(){
 c2 = ((List<ProfileHierarchy__c>)li.getSelected()).size()+1;
}

}