• Halcyonandon
  • NEWBIE
  • 30 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 16
    Replies
Is it possible to offer a visualforce page publicly?  How is it done?
Is it possible to take the search component from the sidebar and utilize it in my own customer portal design as I see fit?  I need to disable the sidebar for the purpose of our customer portal, while retaining the search functionality....

Additionally,  currently customer portal searches and finds the data in the custom objects, but do I have any control over how these custom objects are displayed when a user searches for them?  By default when a user searches and finds custom object data they view the object and not the data directly.

So I guess the best way to phrase my question is... How does one create a custom search component in the customer portal.
Can we somehow create multiple idea exchange instances that dont share data with each other?

We want to have a different idea exchange for each customer portal we build.  Is this possible?  If not, is there a work around?
So I followed the blog tutorial for visualforce.  On posting information to the visualforce blog I made, I had noticed that html wasnt supported even though the tutorial used the YUI rich text editor.  Then on my own project, I'm at the point where html needs to be pulled from a custom object field and displayed on a visualforce page, except that html doesnt render.  It displays unformatted.

So my question is...  Is it at all possible to stored HTML in a custom object and use it in a visualforce page to control the formatting of content?

If this isnt possible, is there any alternative?

Update: I also tried using the rich text editor built into the inputTextArea, this saved the rich text as html in the field and did not render same as all previous attempts.



Message Edited by Halcyonandon on 04-25-2008 07:37 AM
We'd like to use our own styling for our customer portal tabs.  Is this possible or their flexibility limited only to the customize options provided in the customer portal settings?
I followed the example provided at http://wiki.apexdevnet.com/index.php/Extended_Functionality_of_Visualforce_-_Part_2 to create dynamic picklists on a form for entering information.  The idea behind the form is that the user will select a group from a picklist.  The chosen group generates the categories related to it.  This works beautifully, unfortunately the tutorial cut off before going into more detail on working with dependent pick lists.  The main point of the form is so the user can enter in topics and directions.  This also works, however in addition to submitting data to those fields in the custom object, their selected category also needs to be submitted to the category field (which has a lookup relationship to the category custom object).

here's my visualforce page code...

<apex:page showheader="true" standardcontroller="Topic__c" extensions="helpFormController" id="UseCaseDisplay" label="TopicCategoryReport" >

<apex:form>


<apex:outputLabel value="Grouping:" for="grouping"/>
<apex:selectList value="{!grouping}" size="1" id="grouping">

<apex:selectOptions value="{!groupings}"/>
<apex:actionSupport event="onchange" rerender="categories"/>
</apex:selectList>
<a class="title" href="/apex/addgrouping" target="_blank">New</a>
<br /> <br />

<apex:outputLabel value="Category:" for="categories"/>
<apex:selectList value="{!Category}" size="1" id="categories" disabled="{!ISNULL(grouping)}">
<apex:selectOptions value="{!Categories}"/>
</apex:selectList>
<a class="title" href="/apex/addcategory" target="_blank">New</a>
<br /> <br />
<h2>New Topic: </h2>
<apex:inputField value="{!Topic__c.name}" id="topic"/><br /><br />
<h2>Directions: </h2><br />
<apex:inputtextarea id="directions" cols="100" rows="25" value="{!Topic__c.Directions__c}"/> <br /><br />
<apex:commandButton value="Save" action="{!Save}" onClick="beforeTextSave()"/>
</apex:form>
</apex:page>

And here is the controller extension code...

public class helpFormController {

public helpFormController (ApexPages.StandardController stdController){

}
/* String value for the grouping */
String grouping;

/* String value for the category */
String category;

/* Getter for the grouping value */
public String getGrouping() { return this.grouping; }

/* Setter for the grouping value */
public void setGrouping(String s) { this.grouping = s; }

/* Getter for the category value */
public String getCategory() { return this.category; }

/* Setter for the category value */
public void setCategory(String s) { this.category = s; }

/* Getter which dynamically generates the groupings from the Grouping__c object. */
public List<SelectOption> getGroupings() {
List<SelectOption> optionList = new List<SelectOption>();
/* Add a null option to force the user to make a selection. */
optionList.add(new SelectOption('','- None -'));

/* Loop through the feature_category__c records creating a selectOption
for each result with the record ID as the value and the name as the label
displayed in the selectList */

for (Grouping__c fc: [select name from Grouping__c order by Name]){
optionList.add(new SelectOption(fc.id,fc.name));
}
return optionList;
}
/* Getter which generates the options for the Topic selectList based on the current
value of the selected category. If there is no value selected then only
the null option should be returned. */


public List<SelectOption> getCategories() {
List<SelectOption> optionList = new List<SelectOption>();
/* Add a null option to force the user to make a selection. */
optionList.add(new SelectOption('', '- None -'));

/* If a category has been selected then query for the related values */
if(grouping!= NULL) {

/* Loop over the related feature records for the given category
creating a selectOption with the value being the feature record ID
and the label is the name of the feature. */

for (Category__c f : [select name from Category__c f where f.Grouping__c = :grouping]){
optionList.add(new SelectOption(f.name,f.name));
}
}
return optionList;
}
}

We're building a help system, one with a similar hierarchy as the salesforce help.  I've been having trouble finding documentation on structuring and populating nested lists using visualforce.  We have our content divided into custom objects as follows...

application - top level, not displayed, used to control the content being displayed in multiple customer portals
grouping - Above the list, names act as headers above the tree
category - these categories exand out to show topics
topic - When clicked these open directions in a div to the right of the menu.

so where I'm at...

I have a custom controller that populates the grouping list.  I'm not sure if this should even be a list since its the header for the lists contained with .

public class CODhelp {

List<grouping__c> grouping;

public List<grouping__c> getgrouping() {
if(grouping == null) grouping = [select name from Grouping__c where application__r.name = 'cod'];
return grouping;
}
}


Then I'm creating the list in the visualforce page using the following markup...

<apex:dataList value="{!grouping}" var="grouping__c" id="theList">
<apex:outputText value="{!grouping__c.name}" styleclass="treeHeader"/>
</apex:dataList>


This currently works to populate a list of grouping names for the application "cod".  However I need to go deeper for categories, topics and then the directions (which is a custom field of topic).

The html needed to generate our menu looks like this...

<ul class="tree">
<dt class="treeHeader">Grouping</dt>
<li class="closed"><a href="#">Category 1</a>
<ul>
<li><a href="directions">Topic 1</a></li>
<li><a href="directions">Topic 2</a></li>
</ul>
</li>
</ul>

Unfortunately, I'm at a loss on how to generate this structure using visualforce and populate it with the data from our custom objects.  I would greatly appreciate any suggestions or assistance on how to successfully achieve the desired result.

Thanks.


hey,

So I have a visualforce page built.  My company would like to use the customer portal's tabs, however we don't want our users to see the left side content that is placed in there by default.  Is there any way to customize this, remove it or remove elements of it?

For the unfamiliar, when you set showheader to true, it displays more than just the header in the customer portal.  It also displays the search and 'create new' drop down, which we dont want to provide on every page in the customer portal.

Thanks
Is it possible to offer a visualforce page publicly?  How is it done?
Is it possible to take the search component from the sidebar and utilize it in my own customer portal design as I see fit?  I need to disable the sidebar for the purpose of our customer portal, while retaining the search functionality....

Additionally,  currently customer portal searches and finds the data in the custom objects, but do I have any control over how these custom objects are displayed when a user searches for them?  By default when a user searches and finds custom object data they view the object and not the data directly.

So I guess the best way to phrase my question is... How does one create a custom search component in the customer portal.
Hello experts,
 
I want to know the way of using condition in visualforce page. I have a custom object 'Person__c' having few fields. Two of them are:
Name, Active(Checkbox), Birthday, Age(Numberic)
 
What I want to do is list values in these fields in visualforce page. While displaying, I want to display:
 'Minor' if Age<16, otherwise 'Adult'
 
I want to be able to do this in any of the following 3 ways:
 
1. By using If clause in apex page
2. By passing 'Age' as a parameter to my extended controller
3. And using case (or similar) in SOQL
 
Below is my code:
 
Code:
<apex:page standardController="Person__c" extensions="PersonExtension">
 <apex:form>
  <apex:pageblock title="My Persons Infos">
   <apex:pageblockList value="{!PersonList}" var="p">
    <apex:column value="{!p.Name}"/>
    <apex:column value="{!p.Active__c}"/>
    <apex:column value="{!p.Birthday__c}"/>
    <apex:column value="{!p.Age__c}"/>
    <apex:column value="{!anystring}"/>
    <apex:column value="{!IF((p.Age__c>16),'Adult','Minor')}"/>
   </apex:pageblockList>
  </apex:pageblock>
 </apex:form>
</apex:page>


public class PersonExtension{

  private final Person__c person;

  public PersonExtension(ApexPages.StandardController stdController){
    this.person= (Person__c)stdController.getRecord();
  }

  public Person__c[] getPersonList(){
    return [Select p.Id, p.Name, p.Age__c, Birthday__c, p.Active__c from Person__c p];
  }

  public String getAnyString(){
    return 'Anything';
  }
}

The error I get is: Error: Syntax error. Missing ')'
 
If I change the if condition to: <apex:column value="{!IF((p.Age__c<16),'Minor','Adult')}"/>
The error will be: Error: Syntax error. Found 'lt'
 
Even a simple clause is not working:

<apex:column value="{!IF(CONTAINS({!anystring}, 'Anything'),True, False)}"/>
 
1. What is wrong in my code? Can I use IF condition in this way?
2. Can I pass a parameter (Age in above case) to my controller and return a string based on parameter supplied to it? If so, how?
3. Can I use case...when clause (or similar like in sql) in my SOQL? If so, how can I do so?
 
Thanks
Can we somehow create multiple idea exchange instances that dont share data with each other?

We want to have a different idea exchange for each customer portal we build.  Is this possible?  If not, is there a work around?
So I followed the blog tutorial for visualforce.  On posting information to the visualforce blog I made, I had noticed that html wasnt supported even though the tutorial used the YUI rich text editor.  Then on my own project, I'm at the point where html needs to be pulled from a custom object field and displayed on a visualforce page, except that html doesnt render.  It displays unformatted.

So my question is...  Is it at all possible to stored HTML in a custom object and use it in a visualforce page to control the formatting of content?

If this isnt possible, is there any alternative?

Update: I also tried using the rich text editor built into the inputTextArea, this saved the rich text as html in the field and did not render same as all previous attempts.



Message Edited by Halcyonandon on 04-25-2008 07:37 AM
We'd like to use our own styling for our customer portal tabs.  Is this possible or their flexibility limited only to the customize options provided in the customer portal settings?
I followed the example provided at http://wiki.apexdevnet.com/index.php/Extended_Functionality_of_Visualforce_-_Part_2 to create dynamic picklists on a form for entering information.  The idea behind the form is that the user will select a group from a picklist.  The chosen group generates the categories related to it.  This works beautifully, unfortunately the tutorial cut off before going into more detail on working with dependent pick lists.  The main point of the form is so the user can enter in topics and directions.  This also works, however in addition to submitting data to those fields in the custom object, their selected category also needs to be submitted to the category field (which has a lookup relationship to the category custom object).

here's my visualforce page code...

<apex:page showheader="true" standardcontroller="Topic__c" extensions="helpFormController" id="UseCaseDisplay" label="TopicCategoryReport" >

<apex:form>


<apex:outputLabel value="Grouping:" for="grouping"/>
<apex:selectList value="{!grouping}" size="1" id="grouping">

<apex:selectOptions value="{!groupings}"/>
<apex:actionSupport event="onchange" rerender="categories"/>
</apex:selectList>
<a class="title" href="/apex/addgrouping" target="_blank">New</a>
<br /> <br />

<apex:outputLabel value="Category:" for="categories"/>
<apex:selectList value="{!Category}" size="1" id="categories" disabled="{!ISNULL(grouping)}">
<apex:selectOptions value="{!Categories}"/>
</apex:selectList>
<a class="title" href="/apex/addcategory" target="_blank">New</a>
<br /> <br />
<h2>New Topic: </h2>
<apex:inputField value="{!Topic__c.name}" id="topic"/><br /><br />
<h2>Directions: </h2><br />
<apex:inputtextarea id="directions" cols="100" rows="25" value="{!Topic__c.Directions__c}"/> <br /><br />
<apex:commandButton value="Save" action="{!Save}" onClick="beforeTextSave()"/>
</apex:form>
</apex:page>

And here is the controller extension code...

public class helpFormController {

public helpFormController (ApexPages.StandardController stdController){

}
/* String value for the grouping */
String grouping;

/* String value for the category */
String category;

/* Getter for the grouping value */
public String getGrouping() { return this.grouping; }

/* Setter for the grouping value */
public void setGrouping(String s) { this.grouping = s; }

/* Getter for the category value */
public String getCategory() { return this.category; }

/* Setter for the category value */
public void setCategory(String s) { this.category = s; }

/* Getter which dynamically generates the groupings from the Grouping__c object. */
public List<SelectOption> getGroupings() {
List<SelectOption> optionList = new List<SelectOption>();
/* Add a null option to force the user to make a selection. */
optionList.add(new SelectOption('','- None -'));

/* Loop through the feature_category__c records creating a selectOption
for each result with the record ID as the value and the name as the label
displayed in the selectList */

for (Grouping__c fc: [select name from Grouping__c order by Name]){
optionList.add(new SelectOption(fc.id,fc.name));
}
return optionList;
}
/* Getter which generates the options for the Topic selectList based on the current
value of the selected category. If there is no value selected then only
the null option should be returned. */


public List<SelectOption> getCategories() {
List<SelectOption> optionList = new List<SelectOption>();
/* Add a null option to force the user to make a selection. */
optionList.add(new SelectOption('', '- None -'));

/* If a category has been selected then query for the related values */
if(grouping!= NULL) {

/* Loop over the related feature records for the given category
creating a selectOption with the value being the feature record ID
and the label is the name of the feature. */

for (Category__c f : [select name from Category__c f where f.Grouping__c = :grouping]){
optionList.add(new SelectOption(f.name,f.name));
}
}
return optionList;
}
}

We're building a help system, one with a similar hierarchy as the salesforce help.  I've been having trouble finding documentation on structuring and populating nested lists using visualforce.  We have our content divided into custom objects as follows...

application - top level, not displayed, used to control the content being displayed in multiple customer portals
grouping - Above the list, names act as headers above the tree
category - these categories exand out to show topics
topic - When clicked these open directions in a div to the right of the menu.

so where I'm at...

I have a custom controller that populates the grouping list.  I'm not sure if this should even be a list since its the header for the lists contained with .

public class CODhelp {

List<grouping__c> grouping;

public List<grouping__c> getgrouping() {
if(grouping == null) grouping = [select name from Grouping__c where application__r.name = 'cod'];
return grouping;
}
}


Then I'm creating the list in the visualforce page using the following markup...

<apex:dataList value="{!grouping}" var="grouping__c" id="theList">
<apex:outputText value="{!grouping__c.name}" styleclass="treeHeader"/>
</apex:dataList>


This currently works to populate a list of grouping names for the application "cod".  However I need to go deeper for categories, topics and then the directions (which is a custom field of topic).

The html needed to generate our menu looks like this...

<ul class="tree">
<dt class="treeHeader">Grouping</dt>
<li class="closed"><a href="#">Category 1</a>
<ul>
<li><a href="directions">Topic 1</a></li>
<li><a href="directions">Topic 2</a></li>
</ul>
</li>
</ul>

Unfortunately, I'm at a loss on how to generate this structure using visualforce and populate it with the data from our custom objects.  I would greatly appreciate any suggestions or assistance on how to successfully achieve the desired result.

Thanks.


hey,

So I have a visualforce page built.  My company would like to use the customer portal's tabs, however we don't want our users to see the left side content that is placed in there by default.  Is there any way to customize this, remove it or remove elements of it?

For the unfamiliar, when you set showheader to true, it displays more than just the header in the customer portal.  It also displays the search and 'create new' drop down, which we dont want to provide on every page in the customer portal.

Thanks
Hi,
 
I created and deployed a Visualforce page in my customer portal. It works fine as per the functionality.
 
But when i bookmar that visual force page i.e. https://tapp0.salesforce.com/apex/registerwizardpage , close my browser and come back to this page, it takes me to the salesforce login page, where my customer portal username password woudl not work.
 
Is there any way if i bookmark a customer portal page and come back to that page, later on it takes me to the customer portal login page rather than taking me to the salesforce login page.
 
Thanks
GM 
 
 
  • March 26, 2008
  • Like
  • 0
I have a checkbox field and a picklist field. I set up a field dependency so that if the checkbox is checked, all the picklist values are available but if the checkbox is unchecked none of them are. It all works fine in the preview.
 
The dependency does not work however on my visualforce page.
 
The page it should work on is one of a number of wizard pages controlled by a custom controller. Should dependencies work with a custom controller?
 
When I refresh my Eclipse object from the server I cannot see any dependency information. Where is this defined?
I would like our users to be able some objects and relationships in an
expandable  tree based form. Can anyone suggest the best way to do this, e.g.
S-Control, VisualForce, Ajax?

Thanks,

Andy