• harlequin
  • NEWBIE
  • 30 Points
  • Member since 2008

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

Something strange happens, when I use the IE browser:

After I call this VF page in IE7 and click on the button "Konten Import"   a new window opens up, but  the PopUp window switch always behind the main page. The main page seem to reload itself.

The symptom is:

I click on <apex:CommandButton value="Konten Import" onclick="openpopup()" />

<script type="text/javascript">

function openpopup()

{

var KontenWindow = window.open('{!URLFOR($page.KontenImport)}','Konten','height=200,width=385,status=yes,scrollbars=yes,resizable=yes');

setTimeout("openpopup()",100);

KontenWindow.focus();

}

</script>

This behavior happens only on VF Page in IE Browser.

 

Thanks

Steve

On the Visualforce page that I have created I want to add the [Change] link next to the Record Owner name so that the record owner can be re-assigned to another user.   I know that the correct URL to change the Opportunity Owner looks something like this:

https://c.cs2.visual.force.com/006R00000032yPy/a?retURL=%2F006R00000032yPy

I am trying to go there with this Output Link tag:

Code:
<apex:outputLink value="{!$CurrentPage.parameters.id}/a?retURL=%2F{!$CurrentPage.parameters.id}">
   [Change]
</apex:outputLink>

 But it adds the "apex" part of my visualforce page's URL like so:

https://c.cs2.visual.force.com/apex/006R00000032yPy/a?retURL=%2F006R00000032yPy

How do I get the correct URL?

Thanks

Hi..
      How to change the pageblock background color... I am using pageblocktable so that only I am using pageblock here.. I can change the pageblocktable color using bgcolor attribute...
      I want a white background .. How is it possible in pageblock
I am using the &bull; character entity which generates a bullet point in a Visualforce page which renders as a PDF. I am using like the following:

<div>&bull;<span class="tab"></span>&quot;<b>Content Site</b>&quot; means...

and I am get an the following warning: The entity "bull" was referenced, but not declared. I tried using &#149; and &#x2022; but those do not render correctly the bullet point in the PDF. I am unable to consistently generate the warning message either. I can generate the PDF 3 times and get the warning all three times or not at all without changing anything.

Any ideas what could be occurring?

Thanks.


  • November 25, 2008
  • Like
  • 0
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.

Something strange happens, when I use the IE browser:

After I call this VF page in IE7 and click on the button "Konten Import"   a new window opens up, but  the PopUp window switch always behind the main page. The main page seem to reload itself.

The symptom is:

I click on <apex:CommandButton value="Konten Import" onclick="openpopup()" />

<script type="text/javascript">

function openpopup()

{

var KontenWindow = window.open('{!URLFOR($page.KontenImport)}','Konten','height=200,width=385,status=yes,scrollbars=yes,resizable=yes');

setTimeout("openpopup()",100);

KontenWindow.focus();

}

</script>

This behavior happens only on VF Page in IE Browser.

 

Thanks

Steve

I have created 
Code:
 <style>
    .buttons{background-color : #a8a}
</style> 
<apex:form>
  <apex:commandButton value="Check In" action="{!savedata}" styleClass="buttons"/>
</apex:form>

 
tags in my VF page but still that button has "Gray" color in background.... not that defined color in inline Stylesheet.
What should i do ??
Thanks in advance.


Message Edited by Shwetal Desai on 11-25-2008 05:39 AM
I've tried everything...

On a VF page I want to show a small icon based on a Checkbox on an object.

Imagine the checkbox is called "isClosed"

Seems that image formula fields that are passed to VF are escaped and show the string <img src="....

I've tried <apex:image url="{!IF(opp.isClosed__c, GetClosedIcon, GetOpenIcon)}" /> to call a method.

Any suggestions?


I am trying to disable a select List when the user checks a checkbox. I am running into the following problems.
 
a. The select option tag doesnt populate the options from the referenced field
b. The Select List box doesnt get disabled when i check the checkbox
Code:
<apex:inputfield value="{!case.Region__c}">
<apex:actionSupport event="onchange" action="{!regionSectionAction}" reRender="NewEmployeeRequest1"/></apex:inputField>&nbsp;&nbsp; <b>Region</b> &nbsp;&nbsp; 
<apex:selectList value="{!case.Regional_Location__c}" disabled="{!!noRegionSection}" >
<apex:selectOption value="{!case.Regional_Location__c}" itemLabel="{!case.Regional_Location__c}" />
</apex:selectList>

 
 
The same functionality works when i tried to disable a text box rather than a select List
 
Code:
<apex:inputfield value="{!case.Region__c}">
<apex:actionSupport event="onchange" action="{!regionSectionAction}" reRender="NewEmployeeRequest1"/></apex:inputField>&nbsp;&nbsp; <b>Region</b> &nbsp;&nbsp; 
<apex:inputtext value="{!case.Regional_Location__c}" disabled="{!!noRegionSection}" >
</apex:inputtext>

 

Thanks,


 
I have used the disable value to disable my input text field. However, I would like it to be greyed out and then enable it based on a value picked in a picklist.
 
Is there a solution to that?
 
Thanks,
Is it possible to use the <Image> tag to display a icon, which displays helptext when the user hovers over it (using the MouseOver event)? If so, does anyone know how to do that?
Im using a controller extension to account for this page. However, what happens when you click Go! is that first the list of accounts is rerendered and after a second or so, the hole page is refreshed.
In the real program that wipes out data created in other sections by JS.
I would expect only the portion mentioned in the rerender to be refreshed.
 
Looks like onclick event is the culprit. Changing the page so that the rerender is triggered onchange on the select list, works as expected. Still, I want my onclick for other purposes
 
Any ideas?
 
 
 

<apex:page standardController="Account" recordSetvar="accounts"

extensions="Account2MapControllerExt">

<script src="http://maps.google.com/maps?file=api&v=2.x&key={!mapkey}" type="text/javascript"></script>

<script src="http://www.google.com/jsapi?key={!mapkey}" type="text/javascript" ></script>

<apex:form >

<apex:pageBlock >

  <apex:pageBlockSection title="Select Account List" columns="1" collapsible="false">

    <apex:outputPanel > Select an account list view to map :

      <apex:selectList value="{!filterId}" size="1">

        <apex:selectOptions value="{!listviewoptions}" />

        </apex:selectList>

      <apex:commandButton value="Go!" >

      <apex:actionSupport event="onclick" reRender="accTable" status="accStatus" />

      </apex:commandButton>

      <apex:actionStatus id="accStatus" startText="(incrementing...)" stopText="(done)"/>

    </apex:outputPanel>

  </apex:pageBlockSection>

  <apex:pageBlockSection >

    <apex:dataTable value="{!accounts}" var="a" id="accTable" rows="3">

      <apex:column value="{!a.id}" rendered="false"/>

      <apex:column value="{!a.name}" rendered="true"/>

    </apex:dataTable>

  </apex:pageBlockSection>

</apex:pageBlock>

</apex:form>

</apex:page>



Message Edited by PerGeert on 11-22-2008 06:19 PM

Message Edited by PerGeert on 11-22-2008 07:50 PM
I am  trying to display an Error Message when the user does not check a checkbox when the user clicks on the Save command button. However, my message component doesnt tie in to the command button. When i click on save, the page proceeds to the next one, without displaying the error message.
 
I used get, set to get the value of the checkbox in the Controller
Code:
   public void setagreeCheckBox(Boolean checkBox)
    {
  this.checkBox = checkBox;
 }
     
    public Boolean getagreeCheckBox()
    {
     return this.checkBox;
 }
 I have defined a function to check the value of the checkbox and add the message to message component.
Code:
<apex:page controller="NewEmployeeRequest2" sidebar="true" showHeader="true" >
<head>
<script language="Javascript"> 
 
 function check(boolean checkboxvalue)
 {
  var returnvalue= true;
  if(checkbox=='false')
  {
  returnvalue=false;
  alert(checkbox);
  ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'Please check and agree to proceed'));
  }
  return returnvalue;
 }
</script>
</head>
 <apex:form id="NewEmployeeRequest2">
    <apex:pageBlock >
<apex:inputfield value="{!case.Rules_of_Behavior_Agree__c}" />
          <apex:commandButton action="{!Cancel}" value="Cancel" />
         <apex:commandButton action="{!Save}" value="Continue"  onclick="return check('{!agreeCheckBox}')">
          <apex:actionSupport event="onclick" rerender="ErrorMessage"/>
          </apex:commandButton>
          <apex:pageMessage id="ErrorMessage" rendered="return check('{!agreeCheckBox}')" severity="warning" strength="2"> 
          </apex:pageMessage>
</apex:pageBlock> 
</apex:form>
</apex:page>

 
This doesnt work. In addition, I have multiple fields in my form which I have to validate.
 
Thank you in advance,
Anchal
 
Hi ,
 
I have a requirement as such : i want to to display only those tags on my page which are present for more than two vendors (we have  accounts as vendors ).
 
1.I have taken all the tags in one list
2.then have stored those distinct records in a set (not sure my way is correct or not )
3.created one more list
4.then for each element of the set i am comparing with the elements of set , if i find that element i am incrementing the counter
5. when the counter is greater than 2 , i am storing that tag into list 3 and returning list 2 but
My code goes on like this
 
public List<String> getTags()
{
List<AccountTag> list1= [select Name from AccountTag];
List<AccountTag> list2= new List<AccountTag>();
Set<String> Tags1 = new Set<String>();
List<String> list3 = new List<String>();
for (Integer i=0; i< list1.size(); i++)
{
    Tags1.add(list1[i].name);
}
for(Integer l=0;l<Tags1.size();l++)
{
    list3.add(Tags1[l].name);
}
   for(Integer j=0;j<list3.size();j++)
   {
     for(Integer k=0;k<List1.size();k++)
      {
       if(list1[j]==List3[k])
       count= count+1;
       }
       if(count>=2)
       list2.add(list1[j]);
      }
 
return list2;
}
Unknown property 'String.Name' is the error i am getting
please help : As soon as possible : 


Message Edited by paras on 11-20-2008 08:49 PM

Message Edited by paras on 11-20-2008 08:50 PM
  • November 21, 2008
  • Like
  • 0