• Jim Boudreaux
  • NEWBIE
  • 188 Points
  • Member since 2008

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

i am having issue with date field.

 

i have one field of type Date in my custom object. and i am storing the date value in it successfully.

 

here is my code:

 

public Date agendaDate2; // user name which will be provided by user   

public Date getAgendaDate2()   

{       

return agendaDate2;   

}   

public void setAgendaDate2(Date dateValue)   

{

       agendaDate2= dateValue;   

}

 

i am showing date value in <apex:inputText> my VF page

 

but it shows the "Fri Nov 18 00:00:00 GMT 2011" in this format.

 

i want to show this date in  12/11/2011 format.

 

show how can i do that ?

 

please help i am newbie in salesforce.

 

any kind of help will be greatly appriciated.

 

thanks in advance...

Vishal

 

 

If I have a Custom Controller and VisualForce page with a PageBlockTable and InlineEditSupport, what do I need to do to save the changes to multiple records in my PageBlockTable?

 

I tried 

public PageReference SaveTiers(){
        update tiers;
        setup(fields.id);
        return null;
    }

 where tiers is a list<tier__c> and setup() grabs the list of tier__c and fills tiers. THe thing is, I got this working at one point, but after a refresh it quit working and now I can't get it to work at all.

 

I would post all my code, but it would just confuse more because it is complicated and calls a lot of outside classes. Suffice to say, all I want to know is how would I write a function that saves the changes to a list of records that were changed via the inlineediting ui in a pageblocktable?

 

Is there a permissions issue with custom fields in a Developer Edition Site? I made a simple little visualforce page that displays the name standard field as well as a couple custom fields. It works fine in the org, but despite setting all the public permissions correctly, when I try to view the page on the site, the only field that is rendered is Name.

 

http://imfromthepast-developer-edition.na8.force.com/properties?id=a01C000000OeqM8

 

 

<apex:page Controller="Property" showHeader="false">
    <div style="margin:auto; width:1000px;">
        <div style="width:100%; float:left;">
            <div style="width:170px; float:left;">
                <apex:image value="{!URLFOR($Action.Attachment.Download, logo)}"/>
            </div>
            <div style="width:800px; height:100px; float:left; line-height:180px; text-align:right; font-size: 10pt">
                HOME | PHOTO GALLERY | FLOOR PLANS | AMENITIES | LOCATION | LEASING | RESIDENTS
            </div>
        </div>
        <div style="width:100%; float:left;">
            <div style="width:170px; height:362px; float:left; color:white; border: 0px solid #c0c0c0; padding:0px; text-align:left; background:#9c9b8d">
                <div style="border-bottom:2px solid white; padding:10px; font-size:15pt">View Community</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">HOME</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">PHOTO GALLERY</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">FLOOR PLANS</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">AMENITIES</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">LOCATION</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">LEASING</div>
                <div style="border-bottom:1px dashed black; margin:5px; padding:5px 5px 5px 10px">RESIDENTS</div>
            </div>
            <div style="width:780px; float:left; border: 1px solid #c0c0c0; margin-left:5px; padding:5px">
                <apex:repeat value="{!property.attachments}" var="a">
                    <apex:image value="{!URLFOR($Action.Attachment.Download, a.id)}"/>
                </apex:repeat> 
            </div>
            <div style="width:780px; height:100px; float:left; border: 1px solid #c0c0c0; margin-left:0px; padding:5px"> 
                {!property.overview__c}
            </div> 
            <div style="width:163px; height:100px; float:left; border: 1px solid #c0c0c0; margin-left:0px; padding:5px"> 
                <apex:outputtext value="{!property.name}"/><br/>
                <apex:outputtext value="{!property.street__c}"/>
            </div>          
        </div>
    </div>   
</apex:page>

 

public class Property {
    string id = apexpages.currentpage().getparameters().get('id');
    public property__c getProperty() {
        return [select name,street__c, city__c, features__c, state__c, zip__c, overview__c, phone__c, fax__c, (select id from attachments where name = 'Image.jpeg') from property__c where id = :id];
    }
    public string getLogo(){
        return [select id from Attachment where parentid = :id and name = 'logo.png'].id;
    }

}

 

 

 

When I use pageblocks and pageblocksections and outputfields, etc, I do not get the new Salesforce Look and Feel that I get when I view a standard SF page or when I use <apex:detail/>.

 

Why is that? Is there a way around that?

I am trying to draw a line on a VF page that I can adjust the thickness of.  I have tried the following:

 

<hr size="7" /> and <hr height="20">

 

But the line thickness seems to stay the same regardless of what values I use.   Any help would be appreciated.

Thank You.

Just trying out the new Spring 11 functionality, and had a question I am hoping someone might know..

 

I can get field sets to work as input or output fields.

 

I can get Inline editing to work as advertised.

 

But is it possible to output a set of fields from a field set and have those fields enabled to use inline editing? I have tried to combine the various examples but with no success - is it possible and if so, can someone give me an example?

 

For instance, it looks from the Spring Webinar that this should work if I pass in a Contact Id into the page...

 

 

<apex:page standardController="Contact" >
<apex:sectionHeader title="Inline for {!contact.Name}"/>
<apex:form>
 
<apex:pageMessages/>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="2">
<apex:repeat value="{!$ObjectType.Contact.FieldSets.TestFS1}" var="f">
<apex:outputField value="{!Contact[f]}">
<apex:inlineEditSupport event="ondblclick"/>
</apex:outputField> 
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

Many thanks

In my page I have a component:

 

<c:AccountFooSection title="DISPLAYING ALL CURRENT FOOS FOR {!titleLink}" />

In my controller, I have this:

 

private String getTitleLink { 
    return '<br/><a style=\'white-space:nowrap\' href=\'/' + id + '\'>' + name + '</a>';
}

 This is what I see for the component's title: 

 

DISPLAYING ALL CURRENT FOOS FOR <br/><a style='white-space:nowrap' href='/001M0000002Kt7jIAC'>Foo Test</a>

 

I tried placing HTML tags in the title itself, but got the same result. There is no "escape='false'" for components.

 

Any suggestions? Thanks!

 

Note: This actually works fine on Winter '10 production, but not in my Spring '11 sandbox. Is Salesforce rendering differently now?

Am I doing something wrong or does the InLineEditSupport Tag not work with Field Sets?

I have been working on the Force.com for some time now and one thing that really helps me learn the platform is pushing the envelope and seeing where it tears. To this end I have decided to build a game on it.

Not anything fancy, like a first person shooter, just a turn based strategy game, like Risk.

Or more accurately, like Outreach.

Most of those old board games were little more than databases anyway, so I figured this would be an easy project. In fact the hardest part I anticipated was creating a hex map in CSS, but that turned out to be a two hour chore.

Ergo i anticipate smooth sailing from here on out. I am posting this here for anyone interested in following my progress as i take the Force.com platform that, to the best of my knowledge, it hasn't gone before, and also for anyone interested in helping me beta test the game when I am done.

 

Ciao.

How does one go about retrieving multiple jpgs that are attached to a given custom object, selecting one based on a filename saved in a related custom object, and displaying that jpg in visual force markup?

This is the use case:

I have a custom object for buildings. I have a custom object for floors, related to the building object through a master-detail relationship. I attach a jpeg of the floor plan to the floor record. I then want to grab the floors of a given building and display the floorplan jpg for each floor in that building.
I created a VF page. Here's the code:


Code:
<apex:page tabStyle="Account_c__c">
    <apex:pageblock title="Critical Accounts">
    <apex:enhancedList type="account_c__c" height="600" rowsPerPage="50" id="AccountList"></apex:enhancedList> 
    </apex:pageblock>
</apex:page>

 





This renders a page much like the typical enhanced list that one gets out of the box with salesforce. the only difference is it lacks the little print button on the upper right side of the enhanced list.

How do I get that print link back?

Message Edited by Jim Boudreaux on 10-30-2008 07:58 AM
I am making a VF page that looks exactly like the regular page except that the Related lists are tabbed.
The only thing missing is inline editing. Yes, it is activated and works fine in my non-VF pages.
Is there an attribute I'm missing?