• Sreerup
  • NEWBIE
  • 25 Points
  • Member since 2007

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

I am trying to write a VF page that does the following:

I have one page block ("pageblock1") with an "open" button. When i press this button, another page block appears ("pageblock2") with a "close" button. When pageblock2 appears, the "open" button in pageblock1 should be disabled. Then, when i press on the "close"in pageblock2, pageblock2 should disappear again, and the "open" button in pageblock1 should be enabled.

This is a code that produces such a behaviour:

 

** page **

 

<apex:page controller="test1">
    <apex:form >
        <apex:pageBlock title="Block1" id="Block1">
            <apex:outputLabel value="{!IsShown}"/>
            <apex:commandButton action="{!showBlock2}" value="open" disabled="{!IsShown}"/>
        </apex:pageBlock>
        <apex:pageBlock title="Block2" id="Block2" rendered="{!IsShown}">
            <apex:outputLabel value="{!IsShown}"/>
            <apex:commandButton action="{!closeBlock2}" value="close"/>
        </apex:pageBlock> 
    </apex:form>
</apex:page>

 

 

** controller **

 

public class test1
{
    public boolean IsShown{set;get;}
   
    public void showBlock2()
    {
        IsShown = true;
    }
   
    public void closeBlock2()
    {
        IsShown = false;
    }
}

 

However, I want to use ajax in this page, but this doesnt give me the desired result. I tried simply to add a rerender attribute to both commandButtons : <apex:commandButton ... rerender="Block1, Block2"/>. What happens is that Block1 is being rerendered (the button becomes disabled and the label changes its value) - but block2 does not appear. I guess it is because Block2 rendered attribute remains false, althogh the isShown property is true.

 

Any suggestions?

 

Thanks, Alon

 

  • February 07, 2009
  • Like
  • 0
Hi,

I was trying to generate the Java classes using WSDL2Java utility of Axis. I am using Axis 1.3 for the purpose. But I can find that the activation.jar and mail.jar are missing from the lib directory when extracting the installed zip. While running the WSDL2Java utility I am receiving java.lang.ClassNotFoundException. Please suggest. Should I be installing any other versions of AXIS? The Axis 1.4  is also missing out on these  two jars.Please suggest.
Can anyone provide me the information regarding the best practices followed while migrating an application (bundled in the form of package) from sandbox environment to production? Thanks in advance.
When we are creating a case and selecting a company id, is it possible that default data appear in the case such as account ids and products associated with accounts? Any help is appreciable.

Hi ...

 

I need user to be redirected to a Custom VF page after Record is Saved. How can i do that ... any idea plz ... :(

  • March 13, 2009
  • Like
  • 0

I'd like to implement a Select All button on a page requiring user interaction with Select Checkboxes.  Here's the page code with the Select All button.  How to rerender the checkboxes all checked?  I'm guessing I do this with rerender but not sure how to access the select options array?

 

<apex:pageBlockSection title="Available SOs" collapsible="false" columns="2">
            <apex:selectCheckboxes id="chkCandidateSOs" value="{!selectedItems}" >
                   <apex:selectOptions value="{!items}"/>
                   <apex:actionStatus id="checkSOs" startText="Checking all SOs...">
                           <!-- how do i update the above checkboxes in this action? -->
                       </apex:actionStatus>
            </apex:selectCheckboxes>
            <apex:outputPanel />
            <apex:commandButton value="Select All" action="{!selectAll}"
            rerender="chkCandidateSOs" status="checkSOs"/>

 

and the controller code:

 

public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>();
        for (Service_Order__c eachSO:candidateSignatureItems){
            options.add(new SelectOption(eachSO.Name,eachSO.Name));
        }
        return options;
     }
     public void selectAll(){
         //implement reset of selected checkboxes?
     }
     public void setSelectedItems(String[] selection){
         selectedItems = selection;   
     }
    
     public String[] getSelectedItems(){
         return selectedItems;   
     }

 

Is it as simple as moving the options array in the controller up in scope and setting some attribution on SelectOptions in the selectAll action?  Or do I do something in the page itself?

 

Thanks!

g

  • February 10, 2009
  • Like
  • 0

I am trying to write a VF page that does the following:

I have one page block ("pageblock1") with an "open" button. When i press this button, another page block appears ("pageblock2") with a "close" button. When pageblock2 appears, the "open" button in pageblock1 should be disabled. Then, when i press on the "close"in pageblock2, pageblock2 should disappear again, and the "open" button in pageblock1 should be enabled.

This is a code that produces such a behaviour:

 

** page **

 

<apex:page controller="test1">
    <apex:form >
        <apex:pageBlock title="Block1" id="Block1">
            <apex:outputLabel value="{!IsShown}"/>
            <apex:commandButton action="{!showBlock2}" value="open" disabled="{!IsShown}"/>
        </apex:pageBlock>
        <apex:pageBlock title="Block2" id="Block2" rendered="{!IsShown}">
            <apex:outputLabel value="{!IsShown}"/>
            <apex:commandButton action="{!closeBlock2}" value="close"/>
        </apex:pageBlock> 
    </apex:form>
</apex:page>

 

 

** controller **

 

public class test1
{
    public boolean IsShown{set;get;}
   
    public void showBlock2()
    {
        IsShown = true;
    }
   
    public void closeBlock2()
    {
        IsShown = false;
    }
}

 

However, I want to use ajax in this page, but this doesnt give me the desired result. I tried simply to add a rerender attribute to both commandButtons : <apex:commandButton ... rerender="Block1, Block2"/>. What happens is that Block1 is being rerendered (the button becomes disabled and the label changes its value) - but block2 does not appear. I guess it is because Block2 rendered attribute remains false, althogh the isShown property is true.

 

Any suggestions?

 

Thanks, Alon

 

  • February 07, 2009
  • Like
  • 0
I am trying to setup the Email2Case client and need to configure the sdfcConfig.txt file with a Salesforce.com user account which can post to a case in Salesforce.com.
 
What kind of user (Role, Profile, Permissions) do I need to create in Salesforce.com before I can use the same for Email2Case feature?
 
Thanks in advance.
I am trying to insert the 1 year chart from finance.yahoo.com but I can't seem to get the content correct. Here's what I have so far:
 
<html>
<head>
</head>
<body style="margin-left:0; margin-top:0; margin-bottom:0; margin-right:0; background-color:#F3F3EC;">
<img BORDER=0 style="background-color:#F3F3EC;"
src="http://chart.finance.yahoo.com/c/1y/m/s={!Account.TickerSymbol}"/>
</body>
</html>
 
What am I doing wrong?
 
Thank you-
TheElf
  • September 26, 2007
  • Like
  • 0
Hello,
I'm looking for a way to use Workflow rules to inform the Sales managers when the opportunity of a Sales person has been open for a while, but not updated.

I see how this can be done based on the closing date of the Opp, but what about the last modified date?

For example, if an Opportunity was last modified 20 days ago, I would like the system to send out an email with a template of some sort.

Does anyone know how this can be done?

Thanks in advance for any suggestions.

Greg
  • September 26, 2007
  • Like
  • 0
Hi.. I have written workflow rules with email as action in our sandbox system. But we are not getting any notification even when simple criteria.. Is it a problem with sandbox? did anyone face the same problem? Thanks in advance..
  • September 26, 2007
  • Like
  • 0
I have a question regarding the "recruiting app" shown in the the "Introduction to the apex platform" pdf.
 
In this application we created 3 new custom objects: Postions, candidates, job applications.
 
The position tab includes a section that displays Job applications for the current record. in that section the candidate column displays an ID and not it's value (the candidate name). This problem occurs every time that I create a lookup field to a object that has an auto-number id.
 
Is there any solution to that problem?