function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EyalEyal 

Visual force page design

Hello,

 

I have 2 questions:

 

1. I created a page in visual force which presents a list of a custom object called User Vide.

 

In order to do so, I used the  selectList  tag. In addition, I am using the actionSupport tag to retrieve the records.

 

Afterward, I am using the pageBlockTable tag to present the relevant fields in a table.

 

The problem is that I want the user to see the list in the table  BUT I don't want him to be able to choose a view, because there is only one view, so it doesn't make sense.

 

How can I hide the view pick list graphics and still get the table ?

 

I am adding my page:

 

<apex:page standardController="User_Video__c"  extensions="ExstensionControlerUserVideo"  recordSetvar="User_Videos__c">
    <apex:form >
        <apex:pageBlock >
            <apex:pageMessages />
         
            <apex:pageBlock >
               
                   <apex:panelGrid columns="2">
                    <apex:outputLabel value=""/>
                    <apex:  selectList value="{!filterId}" size="1" rendered="False">
                        <apex:actionSupport event="onchange" rerender="UV_table"/>
                        <apex:selectOptions value="{!listviewoptions}"/>
                    </apex:selectList>
                </apex:panelGrid>
            </apex:pageBlock>
          
             <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        
            <apex:pageBlockTable value="{!User_VideoS__c}" var="UV" id="UV_table">
                  /// fields ...      
            </apex:pageBlockTable>
        </apex:pageBlock>
   </apex:form>
</apex:page>

 

 

 

2. I tried to use the cookbook to design my site : http://developer.force.com/cookbook/recipe/customizing-the-look-and-feel-of-your-force-com-site 

 

I added a logo of my org to the static resources and did all has descirbed, but the site header looks the same.

 

Must I define a CSS style sheet in order to change the look and feel of my site ?

 

I am adding my new header:

 

<apex:component id="headerComponent">
  <apex:panelGrid cellpadding="0" cellspacing="0" width="98%" border="0" columns="2" style="text-align: left;" id="theHeader">
    <apex:image id="logo" value="{!$Resource.logo}"/>    <-----  this is what I changed 
    <apex:panelGrid cellpadding="0" cellspacing="0" width="100%" border="0" columns="1" style="text-align: right;" id="Links">
      <apex:panelGroup rendered="{!AND(ISPICKVAL($User.UserType,'Guest'), $Site.LoginEnabled)}">
        <apex:outputLink value="/site/SiteLogin.apexp">{!$Label.site.login_button}</apex:outputLink>
        <apex:outputText value=" | "/>
        <apex:outputLink value="/site/ForgotPassword.apexp">{!$Label.site.forgot_your_password_q}</apex:outputLink>
        <apex:outputText value=" | " rendered="{!$Site.RegistrationEnabled}"/>
        <apex:outputLink value="/site/SiteRegister.apexp" rendered="{!$Site.RegistrationEnabled}">{!$Label.site.new_user_q}</apex:outputLink>
      </apex:panelGroup>
      <apex:outputLink value="{!$Site.Prefix}/secur/logout.jsp" rendered="{!NOT(ISPICKVAL($User.UserType,'Guest'))}">{!$Label.site.logout}</apex:outputLink>
    </apex:panelGrid>
  </apex:panelGrid>
</apex:component>

 

 

Thanks a lot for your help,

 

Eyal

 

 

SpanishForkDevSpanishForkDev

How about using javascript to hide the element you don't want to see?

Abhinav GuptaAbhinav Gupta

Answer to Q1 :

I believe you can change the rendered attribute of the picklist as follows, please note the "rendered" attribute. This will hide the picklist on rerendering via actionSupport. Also note, I have added picklist id "filterPicklist" to the action support rerendering.

 

<apex:selectList id ="filterPickList" value="{!filterId}" size="1" rendered="{!filterId == null}">
   <apex:actionSupport event="onchange" rerender="UV_table,filterPickList"/>
   <apex:selectOptions value="{!listviewoptions}"/>
</apex:selectList>