• NisseKnudsen
  • NEWBIE
  • 25 Points
  • Member since 2011

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

Hey Guys!

 

I got a problem where I can't really figure out what I might have done wrong :(

 

First my Code:

PageReference pr = new PageReference( '/servlet/servlet.FileDownload?file=' + filepath );
			Blob internalXmlBlob = pr.getContent();
			String internalXml = internalXmlBlob.toString();
			System.Debug(  internalXml );

 

Now the Debug Log:

 

11:21:20.181 (181269000)|SYSTEM_METHOD_ENTRY|[753]|System.PageReference.getContent()
11:21:22.133 (2133850000)|EXCEPTION_THROWN|[753]|System.VisualforceException: org.apache.commons.httpclient.RedirectException: Maximum redirects (100) exceeded
11:21:22.133 (2133946000)|SYSTEM_METHOD_EXIT|[753]|System.PageReference.getContent()

 

What am I trying to do? I get the Document-File with the Id 'filepath' (parameter) as a blob, convert it to a string and later on try to parse it.

When doing this by using Execute Anonymous in Eclipse IDE I got -no- error.

But in VisualForce, I get this Error shown.

 

Does anyone have a idea?

 

Thanks a lot,

 

Nisse

 

 

 

 

Hey!

 

I got a special problem, I try to define it as best as possible:

I have a visualforce page (page A) inside salesforce. This page calls via AJAX another vf page (page B) and displays it in a javascript window. On page B it displays details of an object by using its standardcontroller. Also in B, there is a VIEW and EDIT Button. And now comes my problem: When clicking on the edit button, I am directed to the objects record page. But after saving, I am - guess please - redirected to page B, which is shown in the whole browser. But I would like to be redirected to page A.

 

I tried to create a workaround with JS, but no success by now. Do you have any suggestion how I could solve my problem?

 

Thanks a lot and Best Regards

 

Nisse

Hello Community!

 

I got a problem that I can't solve! I created a VisualForce-Page that shall be used as a Dashboard element. I integrated a selectList including a controller and a google viz piechart.

The idea was, when the user clicks an item in the list, that the piechart is being rerendere and therefore up-to-date. But it does NOT work. I don't know why, no errors, Firebug says I get a response which is actually exactly that what I wanted. ONLY the piechart doesnot rerender, at least not properly. This means after selecting an random item the outputpanel with the piechart disappears and never returns.

 

Anybody knows where my problem could be?

 

Thanks a lot, here's my code:

 

 

<apex:page controller="S2X_vfDashboard" >
	<apex:pageBlock id="projectprogress">
		<apex:form >
			<apex:selectList value="{!ProjectId}" multiselect="false" size="2">
			<apex:actionSupport event="onclick" action="{!getProjectProgress}" rerender="piechart" />
				<apex:selectOptions value="{!ProjectOptions}" />
			</apex:selectList>
		
		</apex:form>
		<apex:outputPanel id="piechart">
			<c:PieChart jsondata="{!ProjectProgressJson}" title="Project Progress"/>
	    </apex:outputPanel>
    </apex:pageBlock>

</apex:page>

 

 

Hello Community!

 

In addition to my previous post, I would like to know now, if there is any way to activate/deactivate triggers within my apex controller. I thought about 'trigger1.deactivate();'

 

Thanks for your help,

 

Cheers

 

Nisse

Hello Community!

 

I'm encountering the problem that I need to create on every org with my app two dummy users as a placeholder. Since I got a first-start-apex-controller I would like to integrate the creation of User in it. But I can't use the User-Object because of read-only-permission, as Eclipse says to me. 

So does anyone know how to do this?

 

Thanks a lot and Best Regards

 

Nisse

Hello Community!

 

I got a problem, that I would like to solve, but I can't find information in the apex/vf guides.

 

I am using a javascript chart which size is set to fixed values, e.g. 800px. But I would like to resize it dynamically by retrieving information about the page size, for example

 

apexPages.currentPage.getSize();

 

Does anybody know how this could be done?

 

Thanks and Regards

 

Nisse

Dear developerforce-Community,

 

I'm encountering a problem right now while trying to set my own Icon for certain custom object tabs. I go to my org -> setup -> create -> tabs and choose then Tab style. Afterwards I click on Create your Own Style and then Insert Icon. 

Now my question: HOW can I select an icon that is NOT in "my documents"? In the dropdownlist I only got "my documents"...

I would like to change it to a neutral place, because this results in problems uploading a package, since the file folder can't be accessed.

 

Thanks a lot for your help,

 

Best Regards

 

Nisse

Hey!

 

I got a special problem, I try to define it as best as possible:

I have a visualforce page (page A) inside salesforce. This page calls via AJAX another vf page (page B) and displays it in a javascript window. On page B it displays details of an object by using its standardcontroller. Also in B, there is a VIEW and EDIT Button. And now comes my problem: When clicking on the edit button, I am directed to the objects record page. But after saving, I am - guess please - redirected to page B, which is shown in the whole browser. But I would like to be redirected to page A.

 

I tried to create a workaround with JS, but no success by now. Do you have any suggestion how I could solve my problem?

 

Thanks a lot and Best Regards

 

Nisse

Hi,

 

I need to develop a class where I read in an XML file, then parse through the data, etc. This file will not be chosen manually by a user, rather I have the URL where the file is located and I need to get it from that location and open it in the code.

 

My question is, how do I get this file from the specified URL location and open it so that I can parse it in my code? I have seen many examples where the file is selected manually using apex:inputfile in the Visualforce page, but I have not been able to find anything yet where I can simply specify the location of a file and then call a method to read its contents.

 

Thanks in advance!

Hello Community!

 

I'm encountering the problem that I need to create on every org with my app two dummy users as a placeholder. Since I got a first-start-apex-controller I would like to integrate the creation of User in it. But I can't use the User-Object because of read-only-permission, as Eclipse says to me. 

So does anyone know how to do this?

 

Thanks a lot and Best Regards

 

Nisse

HI,

I have a small issue...

I uploaded one .jar file in Static resource. It's contains some .class files.

now i want to use one those .class file in my Apex Code.

Please tell me how to use this.

 

Thanks & Regards

Anusha

 

  • February 28, 2011
  • Like
  • 0