• crist
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies

Hi,

 

 I need a help on using Map on VF page .

 

public Map<Integer, String> bucketOrderMap{get;set;}

 

String bucketQuery = 'select Id, Name, Tutorial_Bucket_Unique_Name__c, Sort_Order__c from Tutorial_Bucket_Order__c where Name like \''+ tCategory.getName() +'\'';// and sort_order__c >='+ (currentBucket.sort_order__c - 1) + ' and sort_order__c <= '+currentBucket.sort_order__c + 1 ;       

 

bucketOrderMap = new Map<Integer, String>();               

for(Tutorial_Bucket_Order__c  curr:Database.query(bucketQuery))  {           

bucketOrderMap.put(Integer.valueOf(curr.sort_order__c), curr.Tutorial_Bucket_Unique_Name__c);     

  }

 

ON VF=========

 

 <ul>                         

  <apex:repeat value="{!bucketOrderMap}" var="c">         

          <apex:outputLabel value="{!c.Label}" />                     

          <!-- <li id="buck_{!c.}">{!c.Label}</li> -->               

    </apex:repeat>       

  </ul>  

 

In Vf page i got prob. can any body help me how to do it on this withour <apex:pageblock table>

 

thanks,

kp

  • August 30, 2011
  • Like
  • 0

Hi,

 

 I need a help on using Map on VF page .

 

public Map<Integer, String> bucketOrderMap{get;set;}

 

String bucketQuery = 'select Id, Name, Tutorial_Bucket_Unique_Name__c, Sort_Order__c from Tutorial_Bucket_Order__c where Name like \''+ tCategory.getName() +'\'';// and sort_order__c >='+ (currentBucket.sort_order__c - 1) + ' and sort_order__c <= '+currentBucket.sort_order__c + 1 ;       

 

bucketOrderMap = new Map<Integer, String>();               

for(Tutorial_Bucket_Order__c  curr:Database.query(bucketQuery))  {           

bucketOrderMap.put(Integer.valueOf(curr.sort_order__c), curr.Tutorial_Bucket_Unique_Name__c);     

  }

 

ON VF=========

 

 <ul>                         

  <apex:repeat value="{!bucketOrderMap}" var="c">         

          <apex:outputLabel value="{!c.Label}" />                     

          <!-- <li id="buck_{!c.}">{!c.Label}</li> -->               

    </apex:repeat>       

  </ul>  

 

In Vf page i got prob. can any body help me how to do it on this withour <apex:pageblock table>

 

thanks,

kp

  • August 30, 2011
  • Like
  • 0

 hi every1,

 

 I am working on data categories and got some problem in its sorting can any body help me for this..

 

i create like Articles---> tutorialscategory group(Article)---> Tutorials

- tut1
-- bucket1
--- bucket2
- tut2
-- bucket1
--- bucket2
I also create 2 custom object where m setting its order like
tutorial order and tutorial bucket order
In tutorial order m setting the sort order of tutorial and in tutorial bucket order m settin the sort order of the buckets ina tutorial.
now m getting prob in one of my query  which i used for sorting this.
query is: 
String bucketQuery = 'select Id, Name, Tutorial_Bucket_Unique_Name__c, Sort_Order__c from Tutorial_Bucket_Order__c where Name like \''+ tCategory.getName() +'\''; // and sort_order__c >='+ (currentBucket.sort_order__c - 1) + ' and sort_order__c <= '+currentBucket.sort_order__c + 1 ;       
bucketOrderMap = new Map<Integer, String>();
can any body help me for this...
Thanks,
crist
  • August 30, 2011
  • Like
  • 0

Hello,

 

 

I ahve a prob like i need to access data categorty in subtree like---

 

datacategorygroup--> article--> tutorial-->test--->test1---> test2

 

Now the prob is i can acacess upto test2 bt if i want to access test2 den how??? i use two custom objects in which i did sorting on tutorial name and tutorial bucket name resp.  so can anybody pls help me out...

 

 

Thankss,

  • August 24, 2011
  • Like
  • 0

hi everyone!!

I am creating a test method I m new to this so can anybody please help me regarding this. my apex code is:

public PageReference redirectToTutorial(){
        if(ApexPages.currentPage().getParameters().get('articleName') != null){
            return null;
        }
        DataCategoryHelper helper = DataCategoryHelper.getHelper('KnowledgeArticleVersion');
        String currentType;
        String currentArticleCategory;
        currentType = ApexPages.currentPage().getParameters().get('type');
        system.debug('====currentType======'+currentType);
        PageReference pg = null;
        Tutorial__kav currentArticle;
        List<Tutorial__kav> articleList = [select  URLName, id, Tutorial_Article_Text__c,(select DataCategoryGroupName, DataCategoryName From DataCategorySelections) from Tutorial__kav where knowledgeArticleId=:ApexPages.currentPage().getParameters().get('Id') and publishstatus='Online'];
        if(articleList != null && articleList.size() > 0){
            currentArticle = articleList.get(0);
            if(currentArticle.DataCategorySelections.size() > 0){
                currentArticleCategory = currentArticle.DataCategorySelections.get(0).DataCategoryName;
            }
        }
        pg = Page.MarketoTutorial;
        pg.getParameters().put('Id', ApexPages.currentPage().getParameters().get('Id'));
        pg.getParameters().put('articleName', currentArticle.URLName);
        pg.getParameters().put('tutorialName', currentArticleCategory);
        system.debug('=================='+pg);
        return pg.setRedirect(true);
    }
    

  • August 11, 2011
  • Like
  • 0

Hi,

 

 I need a help on using Map on VF page .

 

public Map<Integer, String> bucketOrderMap{get;set;}

 

String bucketQuery = 'select Id, Name, Tutorial_Bucket_Unique_Name__c, Sort_Order__c from Tutorial_Bucket_Order__c where Name like \''+ tCategory.getName() +'\'';// and sort_order__c >='+ (currentBucket.sort_order__c - 1) + ' and sort_order__c <= '+currentBucket.sort_order__c + 1 ;       

 

bucketOrderMap = new Map<Integer, String>();               

for(Tutorial_Bucket_Order__c  curr:Database.query(bucketQuery))  {           

bucketOrderMap.put(Integer.valueOf(curr.sort_order__c), curr.Tutorial_Bucket_Unique_Name__c);     

  }

 

ON VF=========

 

 <ul>                         

  <apex:repeat value="{!bucketOrderMap}" var="c">         

          <apex:outputLabel value="{!c.Label}" />                     

          <!-- <li id="buck_{!c.}">{!c.Label}</li> -->               

    </apex:repeat>       

  </ul>  

 

In Vf page i got prob. can any body help me how to do it on this withour <apex:pageblock table>

 

thanks,

kp

  • August 30, 2011
  • Like
  • 0

 

Hi,

 

May i know what would be validation rule for entering first name, last name etc.??

 

Cheers,

Devendra S