• oracle
  • NEWBIE
  • 50 Points
  • Member since 2010

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

   <apex:form id="theForm" forceSSL="true">
                <select multiple="multiple" size="3"  name="laogao" tabindex="12"  style="width: 235px; ">
                                                                                                            <optgroup style="font-size:9px;text-decoration:none;"label="Chosen">
                                                                                                                <p>
                                                                                                                </p>
                                                                                                               
                                                                                                                <option value="sdf">sdf</option>
                                                                                                                 <option value="sdf">sdf</option>
                                                                                                            </optgroup>
                </select>

</apex:form>

 

    String s = Apexpages.currentPage().getParameters().get('laogao');
system.debug('00NR0000000cxZ1_selected:::::::::' + s);

 

print s=null;

 

how solve this question?

I call this method two times.but every time send email of content difference.How to solve this problem

while field instead of  password in the User object?

 

thanks

public with sharing class NewSiteLogin {

    public String username {get; set;}
    public String password {get; set;}

    public PageReference login()
    {
        String startUrl = System.currentPageReference().getParameters().get('startURL');
system.debug('usename=:::' + username);
system.debug('password=:::' + password);
        //User user = [select count() from User where ]
        //User u = new User();
        
        PageReference pageTest = Site.login(username, password, startUrl);

    return pageTest;
    }

}

 

Error: __MISSING LABEL__ PropertyFile - val FrontDoor$BadSidException not found in section Exception

Please email us if you need to get in touch.

 

why?

 

thanks!!

 

Product object have a property Product_Descritpion.

it's a Testarea.

when set Product_Description context is <h1>abc</h1>. click save.

web service side not change..

when set Product_Description context is String.click save.

test can be successfully.

 

before  Product_Description property is Text .

when set Product_Description context is <h1>abc</h1>. i can < change &lt;  > change &gt.

but.Textarea  not can..why?

 

 

thanks...

 

 

/*

Field LabelAccount NameField NameAccount
Data TypeLookup(Account) Contacts
Help Text

*/

Account t = new Account(name='laogaonihao');

Contract con = new Contract();

con.Account = t.id;

 

why contract insert?

 

thanks

when update string no problem.

but add html taglib after not update successfully.

why?

Product.Product_Description = 'abc'  no problem.

Product.Product_Description = '<h1>abc</h1>';  not succeefully send web service.

 

 

thanks.

Product object have a property Product_Descritpion.

it's a Testarea.

when set Product_Description context is <h1>abc</h1>. click save.

web service side not change..

when set Product_Description context is String.click save.

test can be successfully.

 

before  Product_Description property is Text .

when set Product_Description context is <h1>abc</h1>. i can < change &lt;  > change &gt.

but.Textarea  not can..why?

 

 

thanks...

 

 

/*

Field LabelAccount NameField NameAccount
Data TypeLookup(Account) Contacts
Help Text

*/

Account t = new Account(name='laogaonihao');

Contract con = new Contract();

con.Account = t.id;

 

why contract insert?

 

thanks

when update string no problem.

but add html taglib after not update successfully.

why?

Product.Product_Description = 'abc'  no problem.

Product.Product_Description = '<h1>abc</h1>';  not succeefully send web service.

 

 

thanks.

I wrote the following

 

 

Public Static String getEmailFromSubjecct(String Subject){ // First, instantiate a new Pattern object "MyPattern" String emailRegex = '(\\w+)@(\\w+\\.)(\\w+)(\\.\\w+)*'; Pattern MyPattern = Pattern.compile(emailRegex); // Then instantiate a new Matcher object "MyMatcher" Matcher MyMatcher = MyPattern.matcher(Subject); boolean hasMatch = MyMatcher.matches(); String match = MyMatcher.group(0); return match;

}

 the variable "hasMatches" returns "true" when I call this with

 

EmailTools.getEmailFromSubject('test@test.com is an email address');

 

but  the string "match" fails with "System.StringException: No match found"

 

I am lost here.  Why would the .matches() method return true if there are no matches?

 

Having issues deloying this Trigger.  The Apex class has 100% coverage but Eclipse requires at least 1% test coverage for the Trigger.  Please help.
 
Trigger:
 

trigger ContractTriggerUpdate on Contract (after update) {

ContractUpdate.AddeCon(trigger.new);

}

Class:

public class ContractUpdate {

public static void AddeCon(Contract [] UpdateContract) {

List<Account> accountsToUpdate = new List<Account>();

for(Contract c: UpdateContract)

{

if ((c.Stage__c=='Completed') && (c.RecordTypeId == '0123000000002Hr') && (c.Status == 'Active')){

Account acc = new Account(Id=c.AccountId,eCon_Completed__c=TRUE);

accountsToUpdate.add(acc);

}

else { Account acc = new Account(Id=c.AccountId,eCon_Completed__c=FALSE);

accountsToUpdate.add(acc);

}

}

update accountsToUpdate;

}

 

public static testMethod void test_AddeCon(){

Account test1 = new Account(Name = 'one', eCon_Completed__c=FALSE);

Account test2 = new Account(Name = 'two',eCon_Completed__c=TRUE);

Account test3 = new Account(Name = 'three',eCon_Completed__c=FALSE);

Account test4 = new Account(Name = 'four',eCon_Completed__c=TRUE);

Account[] accts = new Account[] { test1, test2, test3, test4 };

insert accts;

Contract TestCon1 = new Contract (AccountId = test1.Id, Stage__c = 'Completed',Status = 'Active',RecordTypeId = '0123000000002Hr');

Contract TestCon2 = new Contract (AccountId = test2.Id, Stage__c = 'Install on Hold', Status = 'Active');

Contract TestCon3 = new Contract (AccountId = test3.Id, Stage__c = 'Completed', Status = 'Cancelled', RecordTypeId = '0123000000002Hr');

Contract TestCon4 = new Contract (AccountId = test4.Id, Stage__c = 'Completed',Status = 'Active', RecordTypeId = '0123000000002Hr');

Contract[] con = new Contract[] {TestCon1, TestCon2, TestCon3, TestCon4};

AddeCon(con);

// Execute trigger with test data set

// Confirm results

Account[] acctQuery = [SELECT eCon_Completed__c FROM Account WHERE Id = :accts[0].Id OR Id = :accts[1].Id OR Id = :accts[2].Id OR Id = :accts[3].Id];

System.assertEquals(TRUE, acctQuery[0].eCon_Completed__c);

System.assertEquals(FALSE, acctQuery[1].eCon_Completed__c);

System.assertEquals(FALSE, acctQuery[2].eCon_Completed__c);

System.assertEquals(TRUE, acctQuery[3].eCon_Completed__c);

}

}

 

Thanks in advance