Create custom scrollbar for Spark Datagrid

I had a custom scroll bar for a MX datagrid.  But recently I got the new Flash Builder 4.5 and it said to use the Spark Datagrid component instead.  So I changed everything to Spark, but now I can't find any info on customizing the scroll bar.  Is this possible?  Should I go back to mx?
According to the documentation in Flash Builder:
"The Spark DataGrid control provides the following features:
- Custom skins to control all aspects of the appearance of the DataGrid control"
So I'm hoping it's possible but I can't find any info either way.

Thanks.  I'm not sure exactly how I did it, but I started with this document in Flash Builder Help:
"Setting a custom horizontal scroll bar skin on a Spark List control in Flex 4"
I copied the code and changed "s|List" to "s|Datagrid", modified it accordingly for a vertical scroll bar, and I deleted references to "base color" so that it would compile.   Then, I copied in VScrollBarTrackSkin.mxml and VScrollBarThumbSkin.mxml from the Flash Builder directory: Adobe Flash Builder 4.5\sdks\4.5.1\samples\themes\zen\src\zen\skins.  And I removed the references to the swf files so that it would compile.  Then I embedded my own png images, e.g.: source.up="@Embed(source='/images/thumb.png')". And I got a scrollbar!
Only problem is the example does not have up and down controls.  But I figured this out from looking at the zen skins (VScrollBarSkin / HScrollBarSkin) and copying in the code for the up and down buttons as well.  Now it's working pretty good.
[I did not use any of the Flash Builder wizards/GUI to create the skins or files.  I just created the files individually (as in File - New - File).  Perhaps there's a better way to do it, but this worked for me.]
I'm not sure why you suggested looking at "ScrollerSkin".  This didn't lead me anywhere, though perhaps I was not clear in my question.  But I greatly appreciate your answer, for saying that this is possible, otherwise I would have given up!

Similar Messages

  • Error while creating a custom combobox for Spark DataGrid

    I am getting the following run time error:
    Error: Required skin part openButton cannot be found.
        atspark.components.supportClasses::SkinnableComponent/findSkinParts() [E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\componen ts\supportClasses\SkinnableComponent.as:671]
        atspark.components.supportClasses::SkinnableComponent/attachSkin()[E: \dev\hero_private_beta\frameworks\projects\spark\src\spark\components\ supportClasses\SkinnableComponent.as:646]
        atspark.components.supportClasses::SkinnableComponent/validateSkinCha nge()[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\com ponents\supportClasses\SkinnableComponent.as:406]
        atspark.components.supportClasses::SkinnableComponent/commitPropertie s()[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\compo nents\supportClasses\SkinnableComponent.as:420]
         atspark.components.supportClasses::ListBase/commitProperties()[E:\dev  \hero_private_beta\frameworks\projects\spark\src\spark\components\supp  ortClasses\ListBase.as:808]
        atspark.components::List/commitProperties()[E:\dev\hero_private_beta\ frameworks\projects\spark\src\spark\components\List.as:954]
        atspark.components.supportClasses::DropDownListBase/commitProperties( )[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\compone nts\supportClasses\DropDownListBase.as:504]
        atspark.components::ComboBox/commitProperties()[E:\dev\hero_private_b eta\frameworks\projects\spark\src\spark\components\ComboBox.as:644]
        atmx.core::UIComponent/validateProperties()[E:\dev\hero_private_beta\ frameworks\projects\framework\src\mx\core\UIComponent.as:8095]
         atmx.managers::LayoutManager/validateClient()[E:\dev\hero_private_bet  a\frameworks\projects\framework\src\mx\managers\LayoutManager.as:934]
        atmx.core::UIComponent/validateNow()[E:\dev\hero_private_beta\framewo rks\projects\framework\src\mx\core\UIComponent.as:7953]
        atspark.components.supportClasses::GridLayout/layoutItemRenderer()[E: \dev\hero_private_beta\frameworks\projects\spark\src\spark\components\ supportClasses\GridLayout.as:1808]
        atspark.components.supportClasses::GridLayout/createTypicalItemRender er()[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\comp onents\supportClasses\GridLayout.as:460]
        atspark.components.supportClasses::GridLayout/updateTypicalCellSizes( )[E:\dev\hero_private_beta\frameworks\projects\spark\src\spark\compone nts\supportClasses\GridLayout.as:514]
        atspark.components.supportClasses::GridLayout/layoutColumns()[E:\dev\ hero_private_beta\frameworks\projects\spark\src\spark\components\suppo rtClasses\GridLayout.as:570]
        atspark.components.supportClasses::GridLayout/measure()[E:\dev\hero_p rivate_beta\frameworks\projects\spark\src\spark\components\supportClas ses\GridLayout.as:230]
         atspark.components.supportClasses::GroupBase/measure()[E:\dev\hero_pr  ivate_beta\frameworks\projects\spark\src\spark\components\supportClass  es\GroupBase.as:1109]
        atmx.core::UIComponent/measureSizes()[E:\dev\hero_private_beta\framew orks\projects\framework\src\mx\core\UIComponent.as:8383]
        atmx.core::UIComponent/validateSize()[E:\dev\hero_private_beta\framew orks\projects\framework\src\mx\core\UIComponent.as:8307]
        atspark.components::Group/validateSize()[E:\dev\hero_private_beta\fra meworks\projects\spark\src\spark\components\Group.as:956]
        atmx.managers::LayoutManager/validateSize()[E:\dev\hero_private_beta\ frameworks\projects\framework\src\mx\managers\LayoutManager.as:659]
        atmx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\hero_priv ate_beta\frameworks\projects\framework\src\mx\managers\LayoutManager.a s:793]
        atmx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\h ero_private_beta\frameworks\projects\framework\src\mx\managers\LayoutM anager.as:1157]
    Here is my combobox:
    package
        import mx.controls.listClasses.BaseListData;
        import mx.controls.listClasses.IDropInListItemRenderer;
        import spark.components.ComboBox;
        public class sparkComboRendererDataGrid extends ComboBox implements IDropInListItemRenderer
            public function sparkComboRendererDataGrid()
                super();
            public function get listData():BaseListData
                return null;
            public function set listData(value:BaseListData):void
            override public function set dataProvider(value:Object):void
                super.dataProvider = value;
                // This may get called before dataProvider is set, so make sure not null and has entries
                if (value!=null && value.length)
                    // Got it, set flag
                    bDataProviderSet = true;              
    and here is the implementation:
    var PersonnelPerson:ClassFactory = new ClassFactory(sparkComboRendererDataGrid);
    PersonnelPerson.properties = {labelField : "person", dataProvider :
    new XMLListCollection(dataList.consistcrew)};
    var col:GridColumn = GridColumn(personnel.columns.getItemAt(0));                   
    col.itemRenderer = PersonnelPerson;
    Please help.
    Thanks

    Actually, after adding the following code it started working:
    import spark.skins.spark.DropDownListSkin;
    override public function stylesInitialized():void
          super.stylesInitialized();
          this.setStyle("skinClass", DropDownListSkin);

  • How to create custom infotype for training and event management

    hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
    PS No – PA0000-> PERNR
    Name   - PA0001 -> ENAME
    IS PS.No. – PA0001-> PS no. of Immediate Superior
    IS name PA0001 -> ENAME
    thanx in advance
    afzal

    Hi,
    Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
    If you wish to create a PD infotype, use transaction PPCI to create the infotype.
    But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
    If you wish to create a PA infotype, use transaction PM01 to create the infotype.
    But before that you may be required to create a strcuture PSnnnn  (where nnnn is the infotype number) with all the fields relevant for the infotype.
    Regards,
    Srini

  • How to create custom template for webcenter portal application

    Hi,
    I created webcenter portal application in my jdev using the webcenter portal application template provided by the webcenter framework.
    I tried to create custom template for my application by following steps:
    1. Created new application using webcenter portal application template with all default package structure.
    2. Right click pagetemplates folder under webcontent package and select new option.
    3. New gallery opens up.
    4. Selected JSF under webtier and JSF Page Template under items in the right hand side and clicked Ok button.
    5. New wizard opens up for creating new JSF page template.
    6. Gave template name(file name) and Page Template Name(template def name).
    7. Selected checkbox staing start a Quick Start Layout and selected three column layout and selected Ok.
    8. Selected checkbox for Create Associated ADFm Page Defination(so that page templates can be changes at run time).
    9. Created some Facet Definations (header, footer, content1, content2, LHN, RHN).
    10. Clicked Ok button which will create custom template.
    11. Added some Panel Group Layout component from Component Palette.
    12. Created new page (.jspx) with this template.
    Now when I try to add producer portlets created using Producer Portlet application template and connected to the above application using WSRP2.0, I'm facing problem.
    The prolem is that I'm not able to add more than one portlet in one single page?
    Kindly let me know whether the steps followed by me is wrong some where and needs to corrected and let me know how I can add more than one portlet to page?
    Basically I cant see more than one placeholders in my page to add portlets.

    Thanks Yannick.
    In the step 9 I had mentioned that I created various facet definations (header, footer, content, content1 RHN and LHN).
    Is this is not facet you are talking about or should I drop facet ref from the resource palette?
    Can't I add moer than one portlet to my page at design time itself?
    Annoying since in weblogic portal we do this at design time(.portal).

  • To create custom colors for exception

    Hi experts......
    I need to create custom colors for my report in order to set exceptions. Shades of red,yellow and green is just not enough for my client, they want to see blue as well when certain exception rises. Can someone please give me a hint as to how to implement that ...is it got to do st with the mime repository?
    Thnaks in advance!
    Tina

    Hi Tina,
    You can do this by formatting in the workbook. Run the query and in the workbook, on the BEx toolbar, there is a button for formatting. Select the exception cell whose color you want to change > in the Format button choos epatterns and select the color you would like. Once you have made the changes, save the workbook. The changes will remain in place the next time the user runs this workbook.
    Take a look at this link for more info:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a559ee09411d2acb90000e829fbfe/content.htm
    Hope this helps...

  • Creating Custom Theme for Power View Clustered columns chart

    Helllo...
    Is it possible to create custom theme for displaying clustered columns chart on Power View?
    Basically I am looking to create chart with specific colors for the bars? For e.g. for High - RED, Medium - Orange and Low - Yellow color. When I look at themes available in Excel 2013 I don't see this combination as such, so I was looking to create one
    myself. 
    I tried to create a theme using video on youtube, but the theme which I created is not showing up in Power View mode in excel 2013.
    www.youtube.com/watch?v=xs2F1n2-YR8

    Hi Sagar,
    In Power View, it has several default theme colors for us to apply to our workbook. Also, we can change the Font, Text Size and Background of the chart. However, it is not support to design a custom theme color.
    You can refer to the following steps to change the theme colors:
    1. On the POWER VIEW tab, in the Themes group, click Themes.
    2. Under Built-in, click the theme that you want to use.
    Please refer to the following screenshot below:
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Is it possible to create custom buttons for quizzes in Adobe Presenter?

    My company is not happy with the quiz buttons in Adobe Presenter and I was wondering if it is possibe to create custom buttons for quizzes and use them as defaults. Like you can do in Captivate.  I'm using Adobe Presenter 8 in Windows 7. 

    Hi,
    Do you want to change the appearance and position of buttons ?
    or
    Do you want to change the action when the button is pressed ?
    Thanks,
    Alpi Agarwal

  • How to create customer exit for characteristic variables and for text vars.

    hi friends,
      can anybody tell me how to create customer exit for characteristic variables and for text variables in bw ides system.
    thanks,
    sree

    Hi,
    Please have a look at:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Krzys

  • Can I create a custom scrollbar for my spark datagrid

    Basically I'm trying to customize the look of my spark datagrid.
    I'd like to change the header appearance and I'd also like to create a custom scrollbar.
    If only Catalyst would implement a custom datagrid component. I mean the datagrid is a very popular component, isn't it?
    Thanks
    kristin

    You need the password for free apps as well as for paid apps. The only ways that you can control what your child downloads is for you to supervise while the downloading is taking place or by totally restricting download apps with restrictions.
    When you enter your password and download content, you have 15 more minutes to continue downloading before you have to enter the password again. So if you download and app - then give the iPad to your child - he or she can continue downloading apps or music or any content for the next 15 minutes without any restrictions. IF you sign out of your account, then the child can no longer download. IMHO - You should NOT give your password to your child. That really is not a good practice.
    You can set restrictions on the iPad so that the child cannot download any apps at all. Go to Settings>General>Restrictions>On. Then you will have to enter a passcode for the device which you do not want to forget (if you do, you have to restore the device) so if you do this remember your passcode. You can then go to the apps settings within the restrictions and Enable Restrictions and turn off Installing Apps.
    This article will provide more information for you.
    http://netsecurity.about.com/od/frequentlyaskedquestions/a/How-To-Setup-Parental -Controls-On-An-Ipad-Ipod-Touch-Or-Iphone.htm

  • Setting font style on hover for spark datagrid

    I'm trying to skin a Spark datagrid. I have most things sorted by creating a custom skin, but one thing I can't find is how to set the colour of the row's font on hover. I can set the background colour fine, but how would I go about changing the font colour when a user hovers over the row?
    Thanks

    Hi
    You don’t actually deal with the text that’s displayed in the a datagrid inside of the skin
    Look at item renderers for the grid columns. You can style your text or whatever else you would like to display in the grid, in the renderer
    Hope that helps a little
    If you are still stuck just let me know and I’ll send you some code
    Cheers
    g
    heres some code
    NOTE: I am making this up as I sit here so I may be forgetting something. Don’t be surprised if this doesn’t work, but the basic idea is right I think
    So in the spark datagrid when you set your column (if you use mxml) this will replace a glob renderer so you can have a different one for each column if you wish.
    <s:GridColumn dataField="Status"
    headerText="name"
    width="37"                                                    
    itemRenderer="fooRenderer"
    />
    Or set a gloabel renderer in the grid def itself
    <s:DataGrid itemRenderer=”fooRenderer” />
    Then write a custom renderer: fooRenderer.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:s="library://ns.adobe.com/flex/spark"
                         xmlns:mx="library://ns.adobe.com/flex/mx"
                         clipAndEnableScrolling="true"
                         >
           <fx:Script>
                  <![CDATA[
                         override public function discard(willBeRecycled:Boolean):void
                               labelData.text="";
                               super.discard(willBeRecycled);
                         override public function prepare(hasBeenRecycled:Boolean):void
                               if(data)
                                       // set the colour of the text label to black
                                      labelData.setStyle("color",0x000000)
                                      // put some logic here to dynamic style the label
                               //check for the 'format' function on the column  (THIS MAY BE WRONG)
                               if( column.labelFunction != null )
                                      labelData.text = column.labelFunction( data, column );
                               else
                                      labelData.text = data[column.dataField];
                         super.prepare(hasBeenRecycled);
                  ]]>
           </fx:Script>
           <s:Label id="labelData" />
    </s:GridItemRenderer

  • Adding Visual custom component in spark DataGrid

    I am working with flex 4.5. I want to create Gauge component Datagrid.
    I am using open source com.betterthantomorrow.components. I have created custom components like this
        <?xml version="1.0" encoding="utf-8"?>
        <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                   xmlns:s="library://ns.adobe.com/flex/spark"
                                                   xmlns:mx="library://ns.adobe.com/flex/mx"
                                                   xmlns:bttc="com.betterthantomorrow.components.*"
                                                   xmlns:gauge="com.betterthantomorrow.components.gauge.*"
                                                   xmlns:objects="tekhnia.com.tekhniag.objects.*"
                                                   width="30%" height="65" backgroundColor="black" borderColor="black"
                                                   creationComplete="init(event)">
                  <fx:Declarations>
                            <mx:NumberFormatter precision="1" id="formatter" rounding="nearest" />
                  </fx:Declarations>
                  <fx:Script>
                            <![CDATA[
                                      import mx.events.FlexEvent;
                                      import mx.messaging.channels.StreamingAMFChannel;
                                      [Bindable]
                                      public var cpuValue:Number;
                                      [Bindable]
                                      public var memoryValue:Number;
                                      [Bindable]
                                      public var diskValue:Number;
                                      [Bindable]
                                      public var mycomp:String;
                                      [Bindable]
                                      public var serverName:String;
                                      [Bindable]
                                      public var statusImage:String;
                                      protected function init(event:FlexEvent):void
                                                var strValues:String;
                                                var strColors:String;
                                                var strAlphas:String;
                                                strColors="0x009900,0xFFFF00,0xDD0000";
                                                strValues="0,50,70,100";
                                                strAlphas=".8,.8,.8"
                                                var values:Array=strValues.split(",");
                                                var colors:Array=strColors.split(",");
                                                var alphas:Array=strAlphas.split(",");
                                                gauge1.setStyle("alertValues",values);
                                                gauge1.setStyle("alertColors",colors);
                                                gauge1.setStyle("alertAlphas",alphas);
                                                gauge2.setStyle("alertValues",values);
                                                gauge2.setStyle("alertColors",colors);
                                                gauge2.setStyle("alertAlphas",alphas);
                                                gauge.setStyle("alertValues",values);
                                                gauge.setStyle("alertColors",colors);
                                                gauge.setStyle("alertAlphas",alphas);
                                                gauge.invalidateDisplayList();
                                                gauge1.invalidateDisplayList();
                                                gauge2.invalidateDisplayList();
                            ]]>
                  </fx:Script>
                  <s:layout>
                            <s:HorizontalLayout/>
                  </s:layout>
                  <s:TileGroup width="101" paddingLeft="20" paddingRight="2">
                            <bttc:Gauge id="gauge"
                                                          diameter="50" width="50"
                                                          verticalCenter="0" horizontalCenter="-111"
                                                          minValue="1"  maxValue="10" value="{cpuValue}"  valueFormatter="{formatter}"
                                                          bigTicks="9" smallTicks="45" showMinMax="false" showValue="false" pointerColor="white"/>
                  </s:TileGroup>
                  <s:TileGroup width="101" paddingLeft="20" paddingRight="2">
                            <bttc:Gauge id="gauge1"
                                                          diameter="50" width="50"
                                                          verticalCenter="0" horizontalCenter="-111"
                                                          minValue="1"  maxValue="10" value="{memoryValue}"  valueFormatter="{formatter}"
                                                          bigTicks="9" smallTicks="45" showMinMax="false" showValue="false" pointerColor="white" automationName="T"/>
                  </s:TileGroup>
                  <s:TileGroup width="101" paddingLeft="20" paddingRight="2">
                            <bttc:Gauge id="gauge2"
                                                          diameter="50" width="50"
                                                          verticalCenter="0" horizontalCenter="-111"
                                                          minValue="1"  maxValue="10" value="{diskValue}"  valueFormatter="{formatter}"
                                                          bigTicks="9" smallTicks="45" showMinMax="false" showValue="false" pointerColor="white"/>
                  </s:TileGroup>
                  <s:TileGroup width="40" paddingTop="3">
                            <s:Image source="assets/led/big/{statusImage}" />
                            <s:Label  color="white" text="{serverName}" textAlign="center"/>
                  </s:TileGroup>
        </s:BorderContainer>
    I want to add this component in Datagrid. I have tried a lot on net. I didn't find any help. I read books as well.
    Please help me. I found somewhere on the site one liner answer : write grid renderer. I don't how to write grid renderer and pass the data values to it.
    I will be more thank full someone gives me pointer to sample grid renderer or code.

    What's the flow here?
    Do you want to pop-up a JSP in a window to prompt the user for extra information before submitting the check-in form? If so, you need a custom component to override the resource that draws the "submit" button on the form.
    Or, do you want to execute something like a web service during the check-in process? If so, do a validateStandard filter. See the 'DynamicPrefix' comonent in the howtocomponents:
    http://www.oracle.com/technetwork/middleware/content-management/index-092832.html

  • Want to implent CheckBox for itemRenderer and headerItemRenderer for spark DataGrid.

    I am using mx:DataGrid in my application.
    The first column itemRenderer and headerItermRenderer is CheckBox.
    Now I want to move it to spark DataGrid. I could imprement itermRenderer easily by creating sub-claassing GridItemRenderer. But I am struck at implementing headerItermRenderer. I tried to implent it using GridItemRenderer sub-class as I did with itemRenderer. It is not working. The set data method is not getting called.
    Do anyone have code for implenting checkbox as itemRenderer and headerRendere in spark datagrid (and not mx datagrid)?
    Thanks,
    Prithvee Zankat.

    Hi,
    Item renderer can be implemented for spark and i think you will have to write custom header renderer. I am providing some useful links,please go through them :
    http://help.adobe.com/en_US/flex/using/WS0ab2a460655f2dc3-427f401412c60d04dca-7ff3.html
    http://cookbooks.adobe.com/post_3_state_checkbox_for_header_renderer_in_datagrid-18900.htm l
    http://blogs.adobe.com/aharui/category/item-renderers
    http://boardreader.com/thread/Spark_Datagrid_custom_header_renderer_1zw07Xgoeo.html
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • How to Created custom report for Ship not Billed (SD/FI)?

    Hi all,
    I am anticipating  to write some abap reports..Here is one of them..
    Anyone can help  me with writing a Report , how to do 'Custom Report for shipped not Billed(SD/FI)' ..But since I am new to Abap , if you wish to reply, please use a little more detail and simple explanation, step by step so I can understand what is the idea, how it can be acheived...what kind of report should be used , techniques, tables etc...:)
    Appreciate your help!
    Regards,
    Boby

    Hi Boby,
    You need to create custom transaction to achive these results.
    you will have selection-screen ,it would be :
    Date : Here date would be mandatory  - Ranges Option
    Customer  - Optional field - Ranges
    Order #  Sales Order (Optional) Ranges
    Invoice #  - Invoice # (Optional) Ranges
    You will get the data based on ur selection-screen criteria ...
    First you will have customer order details from diffrent table
    VBAK,
    VBAP,
    LIKP
    LIPS
    VBRK,
    VBRP
    KNA1,
    VBFA Tables ( See the my sample program )
    Output would be :
    Customer #   Custome Name    Order #   Delivery #   Invoice #   Netpr, Netquantity ,
    Check the condition  whether invoice table has VBRK-RFBSK  = ''.
    See the my sample program : This is sales report by monthly..
    REPORT ZFDSALES_REPORT no standard page heading
                           message-id zwave.
    Data Declaration Part
    TYPE-POOLS
    type-pools : slis.
    Tables
    tables : VBAK,
             VBAP.
    Internal table for VBAK Table
    data : begin of i_vbak occurs 0,
           vbeln like vbak-vbeln,
           bstnk like vbak-bstnk,
           vdatu like vbak-vdatu,
           end of i_vbak.
    Internal table for VBAP and MATNR
    data : begin of i_vbap occurs 0,
           vbeln like vbap-vbeln,
           matnr like vbap-matnr,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr like vbap-netpr,
           maktx like makt-maktx,
           end of i_vbap.
    Internal tables
    data : begin of i_sales occurs 0,
           vdatu like vbak-vdatu,
           bstnk like vbak-bstnk,
           matnr like vbap-matnr,
           maktx like makt-maktx,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr  like vbap-netpr,
           end of i_sales.
    Variable for ALV
    data : v_repid like sy-repid,
           gt_fieldcat    type slis_t_fieldcat_alv.
    Selection-screen
    selection-screen : begin of block blk with frame title text-001.
    select-options : s_vbeln for vbak-vbeln,
                     s_erdat for vbak-erdat,
                     s_ernam for vbak-ernam,
                     s_vdatu for vbak-vdatu obligatory,
                     s_BSTNK for vbak-BSTNK,
                     s_KUNNR for vbak-kunnr,
                     s_matnr for vbap-matnr,
                     s_KDMAT for vbap-KDMAT.
    selection-screen : end of block blk.
    Initilization
    initialization.
      v_repid = sy-repid.
    S T A R T  -  O F  -  S E L E C T I O N ****************
    start-of-selection.
    Get the data from VBAK and VBAP Tables
      perform get_vbak_vbap.
    E N D  -  O F  -  S E L E C T I O N *****************
    end-of-selection.
    Display the data
      perform dispolay_data.
    *&      Form  get_vbak_vbap
          Get the data from VBAK and VBAP Table
    FORM get_vbak_vbap.
    Get the data from VBAK Table
      select vbeln bstnk vdatu from vbak into table i_vbak
                         where vbeln in s_vbeln
                         and   bstnk in s_bstnk
                         and   vdatu in s_vdatu
                         and   kunnr in s_kunnr
                         and   erdat in s_erdat
                         and   ernam in s_ernam.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
    Get the data from VBAP Table
      select avbeln amatnr akdmat akwmeng a~netpr
             b~maktx into table i_vbap
             from vbap as a inner join makt as b on bmatnr = amatnr
             for all entries in i_vbak
             where a~vbeln in s_vbeln
             and   a~kdmat in s_kdmat
             and   a~abgru = space
             and   a~matnr in s_matnr
             and   a~matnr ne '000000000000009999'
             and   a~matnr ne '000000000000004444'
             and   a~matnr ne '000000000000008888'
             and   a~matnr ne '000000000000001111'
             and   a~werks = '1000'
             and   b~spras = 'E'
             and   a~vbeln = i_vbak-vbeln.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
      sort i_vbak by vbeln.
      sort i_vbap by vbeln matnr.
      loop at i_vbap.
        read table i_vbak with key vbeln = i_vbap-vbeln
                                binary search.
        if sy-subrc eq 0.
          i_sales-bstnk = i_vbak-bstnk.
          i_sales-vdatu = i_vbak-vdatu.
          i_sales-matnr = i_vbap-matnr.
          i_sales-kdmat = i_vbap-kdmat.
          i_sales-maktx = i_vbap-maktx.
          i_sales-netpr = i_vbap-netpr.
          i_sales-kwmeng = i_vbap-kwmeng.
          append i_sales.
        else.
          continue.
        endif.
        clear : i_sales,
                i_vbap,
                i_vbak.
      endloop.
      sort i_sales by vdatu bstnk matnr.
      refresh : i_vbap,
                i_vbak.
    ENDFORM.                    " get_vbak_vbap
    *&      Form  dispolay_data
          Display the data
    FORM dispolay_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
          IT_FIELDCAT                       = gt_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_sales
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    ENDFORM.                    " dispolay_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Delivery Date
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'VDATU'.
      LS_FIELDCAT-OUTPUTLEN    = 12.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Delivery Date'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Purchase Order #Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BSTNK'.
      LS_FIELDCAT-OUTPUTLEN    = 25.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Purchase Order #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-REF_FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-REF_TABNAME    = 'MARA'.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material #'.
      ls_fieldcat-seltext_M = 'Material #'.
      ls_fieldcat-seltext_S = 'Material #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
      LS_FIELDCAT-OUTPUTLEN    = 40.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material Description'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Customer Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KDMAT'.
      LS_FIELDCAT-OUTPUTLEN    = 35.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Customer material no.'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Quantity
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KWMENG'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Quantity'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Net Price
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'NETPR'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Net Price'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init
    Reward Points if it is helpful
    Thanks
    Seshu

  • Creating Custom Validators for ADF in JDev 10.1.3.1

    Hi all,
    I'm trying to create a validator to solve a seemingly common problem - that is given 2 dates (startDate & endDate), validate that endDate cannot be earlier than startDate.
    In my case, both startDate and endDate are in the same form. From the ADF Developers Guide, the recommended approach is to create the validation method on the page's backing bean. But in my application, there are many occurrences of startDate and endDate in other forms, therefore having the validation method on the backing bean might not be the best solution.
    I tried to create my own custom validator and tying it to a tag library stated in http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFDevelop6.html#wp999130, but that didn't seem to work either. I'm not sure if creating custom validators by extending the ValidatorTag is supported in ADF.
    Would appreciate it if someone has any suggestions on how to create the validator that I need, without having validation methods that does the same thing all over my backing beans.
    TIA.
    Regards,
    Lennard

    Hi,
    of course, ADF Faces supports custom validators because it is compliant to the JSF APIs runnting on the JSF RI.
    Another approach for validation would be on the business service level. Assuming you use ADF BC, the EO can have a method validator defined that is automatically inherited by all its views. The disadvantage though is that the error message would have to come from the server, requiring custom error message handling for user friendly messages as described in the developer guide.
    Looking forward, in a next release of ADF the binding ayer will allow more complex validations thus not requiring to handle complex validation on teh business service.
    So far however I think that using a custom validator is the best you can do. Note that in the case of ADF BC the date is of type oracle.jbo.server.domain.Date and not java.util.Date, which might be a hint to check for your validator issue
    Frank

  • How to create custom adapter for Products and CommerceService

    Hi guys!
    First of all I wanted to say that I did search. Only relevant material I found was this http://dev.day.com/docs/en/cq/5-5/ecommerce/eCommerce-framework.html
    Unfortunately it doesn't go in details enough...
    I'm trying to follow geometrixx-outdoors example to create my shoppingCart. I have a list of of products in /etc/commerce/products.... referenced by productPage in content.
    But I don't know how to create custom CommerceProvider and Adapter to create proper Product objects - it always picks up geoProductImpl.
    As I understand I need to specify cq:commerceProvider to myProvider and then I need to somehow register MyProvider so it gets picked up.
    Also I guess I need to add MyProductAdapter somehow  so when shoppingCart executes following it returns my implementation instead of geoProductImpl.
    Product product = productResource.adaptTo(Product.class);
    I'd really appreciate if anyone could share an example or point me in the right direction for a guide.
    Cheers
    Kostya

    Hi Kostya,
        Look at this presentation recorded at http://dev.day.com/ddc/en/gems/commerce-framework.html
    Thanks,
    Sham

Maybe you are looking for