• mrh
  • NEWBIE
  • 35 Points
  • Member since 2012

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

Hello

 

I have just created a new page (in visualforce version 26.0) and on the view page I have a set of buttons (which I have set to appear in "both" locations.

 

However with the location="both" set, the edit button (defined below - which returns to the edit page with the saved data for further changes) only works when you select the edit button at the bottom of the page.  Clicking the edit button at the top does nothing and leaves me on the view page.

 

<apex:commandButton styleclass="screenonly buttonform button edit"action="{!edit}"value=""rendered="{!isEditable}"/>

 

However if I set location to "top", then the only edit button at the top of the page works correctly.

 

It would seem that setting the page back to be a version 24.0 implementation fixes this and with location set to "both", either of the edit buttons work.  Frustratingly, all my other pages were created with version 24.0 so they all work correctly.

 

Its seems only a problem if I use version 25.0 (or 26.0).  Does anyone know what could cause this difference between version 24.0 and 25.0?

 

Many thanks in advance,
mark

  • December 17, 2012
  • Like
  • 0

Hello

 

I have an input screen which contains a group which consists of a single repeated field, i.e. to allow a user to enter up to 5 different account names (all of the same defined field).

 

When displaying this information on the 'View' page, I have the following code which also suppresses any of the repeated fields that have not been completed (i.e. are blank) by the user from being displayed.  So if the user only enters 3 account names, only 3 fields are displayed.

 

<apex:repeat value="{!RepeatingGroup5}" var="group5">
    <apex:outputField id="accountName" value="{!group5.Account_Name__c}"/>
    <apex:outputText rendered="{!ISBLANK(group5.Id)}" value=" "/>
</apex:repeat>

 

What I would like to do is add to the 'rendered' attribute on the output text to also suppress not only blank fields, but any that contain the default value for this account name field.

 

So if all of these account name fields have a default value of 'X     1' on the input page, and a user only fills in 3 account names, leaving 2 fields with the value 'X     1', these are not displayed on the view page.

 

Is this possible in the above code and would anyone be able to explain how to do this?

 

Many thanks in advance

 

  • October 31, 2012
  • Like
  • 0

Hello all

 

I am trying to include a REGEX in a field validation rule to check that for a given field of length 8 chars, the value entered has the following syntax:

 

1st char:  X

2nd char: any alpha numeric

3rd char: any alpha numeric

4th char: any alpha numeric

5th char: any alpha numeric

6th char: 0

7th char: 1

8th char: any alpha numeric

 

I have tried the following but its not quite there.  Could anyone please suggest a solution?

 

NOT(REGEX(field__c, "(X\\[a-zA-Z0-9]{5}\\01\\[a-zA-Z0-9]{1})"))

 

Many thanks in advance.

  • October 30, 2012
  • Like
  • 0

Hello

 

I am having problems trying to rerender a selection of checkbox fields contained within a panelGrid, based on whether another checkbox elsewhere on screen is selected or not.

 

Is what I am trying to do even possible?

 

This is a cutdown version of the code I have.  This is the field (checkbox) definition on which I want to base the other selectable options:

 

<apex:pageBlockSection id="opt1" showHeader="true "title="Options"columns="1">

<apex:inputField value="{Field1__c}"id="f1">

<apex:actionSupport event="onchange" rerender="MoreOptions"/>

</apex:inputField>

</apex:pageBlockSection>

 

This is the section I want to rerender based on the selected value above:

 

<apex:pageBlockSection id="MoreOptions" collapsible="false" showHeader="true" title="Later OptionsSubscriptions" columns="1">

<apex:panelGridcolumns="4"style="width:100%;"styleclass="list"rowclasses="dataRow,dataRow"columnClasses="labelCol,data2Col center,data2Col center,data2Col center">

<apex:outputText value=" "/>

<apex:outputText style="color:#999;font-weight:bold;padding:2px;" value="Option 1"/>

<apex:outputText style="color:#999;font-weight:bold;padding:2px;" value="Option 2"/>

<apex:outputText style="color:#999;font-weight:bold;padding:2px;" value="Option 3"/>

<apex:outputText value="Row 1"/>

<apex:inputField rendered="{!Field1__c}"id="row1opt1_checked" value="{!OptionA__c}"/>

<apex:inputField rendered="{!NOT Field1__c}" id="row1opt1_unchecked" value="{!OptionA_unchecked__c}"/>

<apex:inputField id="row1opt2" value="{!Option2__c}"/>

<apex:inputField id="row1Opt3" value="{!Option3__c}"/>

</apexPanelGrid>

</apex:pageBlockSection>

 

So what i am trying to do is make the first checkbox in row1, column 1 rerender with a different field, checked/unchecked option based on Field1__c being selected or not above.

 

Currently, nothing happens when I select Field1__c.  Nothing is rerendered.

 

Any help would be greatly appreciated.

 

Many thanks,
mark

  • July 24, 2012
  • Like
  • 0

Hello

 

I have a pageblocktable definition which consists of 8 input rows, and in this table one column is made up of a checkbox field ('Default_sub_account__c' - with a default value of un-selected), however I now want to set the first row (only) of the table to be selected.

 

Rather than create a new field for this with a default value of selected, I was hoping to use an inputCheckbox for the first row, however when I use the following code, the inputCheckbox still appears as unchecked.

 

The correct components are being displayed for the table - i see the tool tip I've defined below on the first row only, however the field is unchecked.

 

Can anyone explain this please?

 

Many thanks,

mark

 

<apex:column style="text-align:center;">

  <apex:facet name="header">

    <apex:outputText styleclass="tableheader view">

      Default

    </apex:outputText>

  </apex:facet>

  <apex:inputCheckbox rendered="{!newFormChild.TF_Position__c == 0}" selected="true" title="dsdsf"/>

  <apex:inputField rendered="{!newFormChild.TF_Position__c != 0}" styleclass="checkall" value="{!newFormChild.Default_sub_account__c}"/>

</apex:column>

  • July 12, 2012
  • Like
  • 0

Hello,

 

I have recently upgraded to Force.com IDE v25 and since doing so am experiencing problems deploying certain files to a Production (eu1) environment.

 

I can still successfully deploy whatever I need e.g.. custom classes/pages/layouts/objects to an alternative sandbox environment however when deploying to a Production environment, from this list only only custom classes/pages deploy successfully.  Trying to deploy layouts or objects freeze or hang Eclipse/Force IDE during the validation of the deployment plan stage.  I am then forced to kill Eclipse.

 

For the last 6 months, I have used the following configuration to successfully deploy to both Production and sandboxes without a problem:
  - Eclipse 3.7 (I know this is not yet supported, but it has been working fine)
  - Force.com IDE v20
  - Eclipse runtime parameters: -vmargs -Xms512m -Xmx1024m -XX:MaxPermSize=512m

 

It is only since upgrading to v25 (or v24) of Force.com, that I experience these problems.  I have tried uninstalling IDE v25 and reverting to v20, however this is also failing as i get an error with a mismatch for "the MD5 hash is not as expected".  Creating a new Eclipse workspace does not help and causes this same error.

 

Can anyone shed any light on this all?    I am unable to find a decent logfile containing an explanation for the issue causing the freeze/hang so if anyone has any advice on this too, I can supply more information.

 

Many thanks,
Mark

  • June 26, 2012
  • Like
  • 0

Hello

 

I am having some difficulties generating a SOQL query to return details from the Case and Attachment objects in one hit - hopefully someone can advise whether this is possible and if so to do it!

 

I have a custom apex controller which is successfully making an API call to the database to retrieve details from the Case object which retrieves me a list of Case details.

 

What I would like to do now is get the same query to return the same Case details, but also to return me details from the Attachment object that relate to these cases.

 

To further explain, the essential fields that I need for the query to return me are 'Case.CaseNumber, Attachment.Id where Attachment.ParentId = Case.Id'.

 

It looks as though joins are something that SOQL doesn't like, but can anyone help me with this?

 

Many thanks.

Mark

 

  • May 23, 2012
  • Like
  • 0

Hello

 

I have an input screen which contains a group which consists of a single repeated field, i.e. to allow a user to enter up to 5 different account names (all of the same defined field).

 

When displaying this information on the 'View' page, I have the following code which also suppresses any of the repeated fields that have not been completed (i.e. are blank) by the user from being displayed.  So if the user only enters 3 account names, only 3 fields are displayed.

 

<apex:repeat value="{!RepeatingGroup5}" var="group5">
    <apex:outputField id="accountName" value="{!group5.Account_Name__c}"/>
    <apex:outputText rendered="{!ISBLANK(group5.Id)}" value=" "/>
</apex:repeat>

 

What I would like to do is add to the 'rendered' attribute on the output text to also suppress not only blank fields, but any that contain the default value for this account name field.

 

So if all of these account name fields have a default value of 'X     1' on the input page, and a user only fills in 3 account names, leaving 2 fields with the value 'X     1', these are not displayed on the view page.

 

Is this possible in the above code and would anyone be able to explain how to do this?

 

Many thanks in advance

 

  • October 31, 2012
  • Like
  • 0

Hello all

 

I am trying to include a REGEX in a field validation rule to check that for a given field of length 8 chars, the value entered has the following syntax:

 

1st char:  X

2nd char: any alpha numeric

3rd char: any alpha numeric

4th char: any alpha numeric

5th char: any alpha numeric

6th char: 0

7th char: 1

8th char: any alpha numeric

 

I have tried the following but its not quite there.  Could anyone please suggest a solution?

 

NOT(REGEX(field__c, "(X\\[a-zA-Z0-9]{5}\\01\\[a-zA-Z0-9]{1})"))

 

Many thanks in advance.

  • October 30, 2012
  • Like
  • 0

Hello

 

I am having problems trying to rerender a selection of checkbox fields contained within a panelGrid, based on whether another checkbox elsewhere on screen is selected or not.

 

Is what I am trying to do even possible?

 

This is a cutdown version of the code I have.  This is the field (checkbox) definition on which I want to base the other selectable options:

 

<apex:pageBlockSection id="opt1" showHeader="true "title="Options"columns="1">

<apex:inputField value="{Field1__c}"id="f1">

<apex:actionSupport event="onchange" rerender="MoreOptions"/>

</apex:inputField>

</apex:pageBlockSection>

 

This is the section I want to rerender based on the selected value above:

 

<apex:pageBlockSection id="MoreOptions" collapsible="false" showHeader="true" title="Later OptionsSubscriptions" columns="1">

<apex:panelGridcolumns="4"style="width:100%;"styleclass="list"rowclasses="dataRow,dataRow"columnClasses="labelCol,data2Col center,data2Col center,data2Col center">

<apex:outputText value=" "/>

<apex:outputText style="color:#999;font-weight:bold;padding:2px;" value="Option 1"/>

<apex:outputText style="color:#999;font-weight:bold;padding:2px;" value="Option 2"/>

<apex:outputText style="color:#999;font-weight:bold;padding:2px;" value="Option 3"/>

<apex:outputText value="Row 1"/>

<apex:inputField rendered="{!Field1__c}"id="row1opt1_checked" value="{!OptionA__c}"/>

<apex:inputField rendered="{!NOT Field1__c}" id="row1opt1_unchecked" value="{!OptionA_unchecked__c}"/>

<apex:inputField id="row1opt2" value="{!Option2__c}"/>

<apex:inputField id="row1Opt3" value="{!Option3__c}"/>

</apexPanelGrid>

</apex:pageBlockSection>

 

So what i am trying to do is make the first checkbox in row1, column 1 rerender with a different field, checked/unchecked option based on Field1__c being selected or not above.

 

Currently, nothing happens when I select Field1__c.  Nothing is rerendered.

 

Any help would be greatly appreciated.

 

Many thanks,
mark

  • July 24, 2012
  • Like
  • 0

Hello

 

I have a pageblocktable definition which consists of 8 input rows, and in this table one column is made up of a checkbox field ('Default_sub_account__c' - with a default value of un-selected), however I now want to set the first row (only) of the table to be selected.

 

Rather than create a new field for this with a default value of selected, I was hoping to use an inputCheckbox for the first row, however when I use the following code, the inputCheckbox still appears as unchecked.

 

The correct components are being displayed for the table - i see the tool tip I've defined below on the first row only, however the field is unchecked.

 

Can anyone explain this please?

 

Many thanks,

mark

 

<apex:column style="text-align:center;">

  <apex:facet name="header">

    <apex:outputText styleclass="tableheader view">

      Default

    </apex:outputText>

  </apex:facet>

  <apex:inputCheckbox rendered="{!newFormChild.TF_Position__c == 0}" selected="true" title="dsdsf"/>

  <apex:inputField rendered="{!newFormChild.TF_Position__c != 0}" styleclass="checkall" value="{!newFormChild.Default_sub_account__c}"/>

</apex:column>

  • July 12, 2012
  • Like
  • 0

Hello,

 

I have recently upgraded to Force.com IDE v25 and since doing so am experiencing problems deploying certain files to a Production (eu1) environment.

 

I can still successfully deploy whatever I need e.g.. custom classes/pages/layouts/objects to an alternative sandbox environment however when deploying to a Production environment, from this list only only custom classes/pages deploy successfully.  Trying to deploy layouts or objects freeze or hang Eclipse/Force IDE during the validation of the deployment plan stage.  I am then forced to kill Eclipse.

 

For the last 6 months, I have used the following configuration to successfully deploy to both Production and sandboxes without a problem:
  - Eclipse 3.7 (I know this is not yet supported, but it has been working fine)
  - Force.com IDE v20
  - Eclipse runtime parameters: -vmargs -Xms512m -Xmx1024m -XX:MaxPermSize=512m

 

It is only since upgrading to v25 (or v24) of Force.com, that I experience these problems.  I have tried uninstalling IDE v25 and reverting to v20, however this is also failing as i get an error with a mismatch for "the MD5 hash is not as expected".  Creating a new Eclipse workspace does not help and causes this same error.

 

Can anyone shed any light on this all?    I am unable to find a decent logfile containing an explanation for the issue causing the freeze/hang so if anyone has any advice on this too, I can supply more information.

 

Many thanks,
Mark

  • June 26, 2012
  • Like
  • 0

Hello

 

I am having some difficulties generating a SOQL query to return details from the Case and Attachment objects in one hit - hopefully someone can advise whether this is possible and if so to do it!

 

I have a custom apex controller which is successfully making an API call to the database to retrieve details from the Case object which retrieves me a list of Case details.

 

What I would like to do now is get the same query to return the same Case details, but also to return me details from the Attachment object that relate to these cases.

 

To further explain, the essential fields that I need for the query to return me are 'Case.CaseNumber, Attachment.Id where Attachment.ParentId = Case.Id'.

 

It looks as though joins are something that SOQL doesn't like, but can anyone help me with this?

 

Many thanks.

Mark

 

  • May 23, 2012
  • Like
  • 0