• App_Dev1
  • NEWBIE
  • 25 Points
  • Member since 2006

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 10
    Replies

UNSUPPORTED_CLIENT: HTTPS Required

 

I can't live without Trapdoor.

 

What is the recommended (if any) way to use Visualforce to reskin the native SFDC UI?

Here is my guess:  use standard controllers and components to recreate a standard page, then override standard SFDC styles with a custom stylesheet to change typefaces and text colors, hide the standard tab icon, etc.

The goal is small visual (not structural or behavioral) changes to "rebrand" without reimplementing.

Thoughts?

Two questions about components:

1. According to the Spring08 VF docs (p. 66), the generic sObject type is allowed as the datatype of a component's attribute. But I get an error when I try to use one:

Error: Apex class 'sobject' does not exist

2. Components are useful but I don't want to tie mine to a specific sObject type. I'd have to build a component for every supported type.

Is there any reflection-like mechanism so, given item 1 is resolved, I can call getters on the sObject which is passed in?

Is anyone having problems using static resources with non-Firefox browsers, specifically IE7 and Safari? I'm finding that 9 times out of 10, URLs in a static resource refuse to load in these browsers. It results in missing stylesheets and images in my VF page.

Static resources are very convenient, but if they are not supported across browsers I'll have to go back to using Documents.

The new version of the Eclipse toolkit allows Visualforce page editing, but I can't figure out how to edit the Controller code for a page. It doesn't show up under "Classes" as I'd expect.
I get this error from time to time. It has a bold heading "Pages" with this message:

"
You have uncommitted work pending. Please commit or rollback before calling out"

It happens on a form submit where I'm doing some DML and returning a PageReference. No matter what I do with try / catch I can't seem to trap this error and handle it, say with a rollback or commit as it states.

Any ideas? It's hard to debug this.

Is it possible to use multiple controllers in a composition?

In the example from p. 92 of the doc:

<apex:page>
<apex:composition template="composition">
<apex:define name="header">(page) This is the header of mypage</apex:define>
<apex:define name="body">(page) This is the body of mypage</apex:define>
</apex:composition>
</apex:page>

What is the behavior when my header page uses controller A and body uses B?

What I'm seeing now is that the last referenced controller "wins" and becomes the controller for the whole page. I think this also happens with includes.

IMHO the composition is already powerful for building reusable visual components, but would be even more so if each define block had completely independent state/logic.

Say I have page A which uses controller X, and page B controller Y. I want some continuity between the pages so that some variables in X are passed to Y when the user clicks a link in page A to visit page B.

I've implemented this with commandLink. The action method in X which transitions to page B includes a bunch of code that copies the relevant state variables into the request parameters. Example:

public PageReference goPageB() {

  PageReference ref = Page.pageB;

  ref.getParameters().put('p1', p1);

  ref.getParameters().put('p2', p2);

  ref.setRedirect(true);

  return ref;

}

This works fine. But I'm wondering if there's a better way. I'd rather pass the variables in a POST, or in a shared session object that both pages reference.


Is it possible to call functions on expressions? Let's say my custom controller returns an Account object (through a getAccount() method), and I want to URLEncode one of its fields, Url__c. So ideally my page looks something like this:

{!EncodingUtil.urlEncode(account.Url__c, 'UTF-8')}

... but that doesn't work. It says function not defined. I tried defining my own urlEncode function in my controller and still no luck.

My workaround is to build a custom object, move all of the field values of Account into it, and then do the encoding in there.

I understand we don't want logic polluting the view (page), but this is just a simple function call for the purposes of formatting. Another use-case is formatting DateTime fields.

Thoughts?

Is there a way to support file inputs? I'd like to be able to upload an image and have it stored in Salesforce.

I set the apex:form enctype to multipart/form-data but I don't see any way to bind a variable in my controller to a file input.

Not sure if this should go here or in IdeaExchange...

It'd be nice if we could designate a VF page to be a catch-all for unhandled exceptions. Maybe this could be a setup-level option.

Currently users are bounced into the native Salesforce UI and shown scary-looking VF errors in bold text. It'd be great to be able to display a friendly, custom page instead.

Is there some filtering going on before HTTP headers are passed to my controller?

I'm trying to pull the Cookie header out, but it never appears as a key in System.currentPageReference().getHeaders() map. I see lots of other headers there, but no cookies.

As it stands, to write a cookie-aware app I need to do it all in Javascript. (Write the cookie, read the cookie and post back to VF for the cookie's state to become part of the page state). Not ideal.

Thanks for any help.

I am trying to use the 8.0 AJAX API to pull salesforce information into an external page.  Having trouble with this with winter 07 and the new AJAX API.

Pre release winter 07 location: https://prerelna1.pre.salesforce.com
Ajax 8.0 Javascript:  https://prerelna1.pre.salesforce.com/soap/ajax/8.0/connection.js

I have tried setting sforce.connection.ur manually to https://prerelna1.pre.salesforce.com or https://prerelna1.pre.salesforce.com/services/Soap/u/8.0 with no luck.

Im sure I am missing something simple.  How do I do this?  Does anyone have a sample page?  Are the samples from the AJAX Beta 3 going to be updated?

Appreciate the help!
When I attempt to deploy Ajax Tools to our prerelease of winter 07 (endpoint=https://prerelwww.pre.salesforce.com ) I get the following types of errors (much longer list).  How can I fix/get around this?

[SForce.WS][Main.createNewScontrol:346]Creating new SControl 'ajax_tools'
Replace :ajaxtools/loading.html: with null
Replace :ajaxtools/rtsh.css: with null
Replace :ajaxtools/rtsh_script.js: with null
Replace :ajaxtools/samples.html: with null
Replace :ajaxtools/debugshell.html: with null
Replace :ajaxtools/explorer.html: with null
Replace :ajaxtools/editor_script.js: with null
Replace :ajaxtools/loading.html: with null
[SForce.WS][Main.createNewScontrol:356]Failed to create scontrol ajax_tools due
to [Error  fields='null'
 message='The S-Control Name must contain only alphanumeric characters, begin wi
th a letter, and be unique.: DeveloperName'
 statusCode='FIELD_INTEGRITY_EXCEPTION'
]

[SForce.WS][Main.createNewScontrol:346]Creating new SControl 'ajax_tools_tab'
Replace :ajax_tools: with null
Replace :ajax_tools: with null
Replace :ajax_tools: with null
[SForce.WS][Main.createNewScontrol:356]Failed to create scontrol ajax_tools_tab
due to [Error  fields='null'
 message='The S-Control Name must contain only alphanumeric characters, begin wi
th a letter, and be unique.: DeveloperName'
 statusCode='FIELD_INTEGRITY_EXCEPTION'
]


I noticed that the Contact Object has a few unique dataypes: 'Name' and 'Address'.  Name is actually the First and Last name on the tab but it does not present that way in the list of Contact fields.  Does anybody know how these unique fields were created?

UNSUPPORTED_CLIENT: HTTPS Required

 

I can't live without Trapdoor.

 

I am wanting to have a custom object with a url field.  The url will reference a static image.
My question is how can I implement an edit facility on my custom object so that the images can be added/edited?
 
My custom object works fine displaying images that I manually uploaded into static resources, where I then manually pasted the url into the records.  But how can I make this work automatically?
 
I can't find anything telling me how to upload files through code.....
 
BTW, Jasons Employee App is roughly what I am trying to do http://wiki.apexdevnet.com/index.php/Visualforce_Employee_App
However this sample app does not have the edit function.  Maybe its just not shown in the public demo?? 

Thanks!


Message Edited by GerhardNewman2 on 05-29-2008 06:05 AM
I am trying to use the Appirio's iGoogle widget and keep getting the same error when searching for a contact: 

INVALID_FIELD: MobilePhone,HomePhone,Fax,Department,AssistantName,AssistantPhone,MailingCity ^ ERROR at Row:1:Column:84 No such column 'AssistantName' on entity 'Contact'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

All of my other tabbed searches work fine just not the contact one (the most critical - murphy's law)

I do not know what to do with this?  I have written Appirio but they are not responding to me.  Does anyone know if I need to make an adjustment in Salesforce to make this worlk?  or is this specifically a problem with Appirio's program?
  • March 05, 2008
  • Like
  • 0
I'm pleased to let you all know we've just published a new major release of the Force.com IDE.  You can now seamlessly add all the new metadata components in Spring '08 to your Force.com projects and benefit from the familiar highlighting and syntax checking.  Get all the details at the Force.com blog.

Thanks to everyone who participates in this forum for your questions and comments on the IDE.  Our whole team participates actively, and we do our best not only to respond quickly but to use what we learn here to improve the product and inform our vision of Development-as-a-Service.  So keep it coming!

Jon Plax
Product Manager, Developer Tools
salesforce.com


Message Edited by JonP on 02-22-2008 05:49 PM
  • February 23, 2008
  • Like
  • 0
Is anyone having problems using static resources with non-Firefox browsers, specifically IE7 and Safari? I'm finding that 9 times out of 10, URLs in a static resource refuse to load in these browsers. It results in missing stylesheets and images in my VF page.

Static resources are very convenient, but if they are not supported across browsers I'll have to go back to using Documents.

The new version of the Eclipse toolkit allows Visualforce page editing, but I can't figure out how to edit the Controller code for a page. It doesn't show up under "Classes" as I'd expect.
Is it possible to call functions on expressions? Let's say my custom controller returns an Account object (through a getAccount() method), and I want to URLEncode one of its fields, Url__c. So ideally my page looks something like this:

{!EncodingUtil.urlEncode(account.Url__c, 'UTF-8')}

... but that doesn't work. It says function not defined. I tried defining my own urlEncode function in my controller and still no luck.

My workaround is to build a custom object, move all of the field values of Account into it, and then do the encoding in there.

I understand we don't want logic polluting the view (page), but this is just a simple function call for the purposes of formatting. Another use-case is formatting DateTime fields.

Thoughts?

Not sure if this should go here or in IdeaExchange...

It'd be nice if we could designate a VF page to be a catch-all for unhandled exceptions. Maybe this could be a setup-level option.

Currently users are bounced into the native Salesforce UI and shown scary-looking VF errors in bold text. It'd be great to be able to display a friendly, custom page instead.