Drawing custom component in AS

I have a custom component that is displayed using a repeater.
Sometime, I need to draw that component in as. How can I add that
component?

Hi,
Create the Inbound Plugs for the Windows/Views of the custom component, and create the Target Ids for your components in
CRMC_UI_CMP_IP_T table. Now in SPRO, maintain the entries in the Work Area component repository. Create new logical link with new Target ID for your component and use the logical in the work center.
Regards,
S Reddy

Similar Messages

  • Custom component doesnt draw itself

    Hey
    Im relatively new to java, and especially to swing, heres the problem.
    Im trying to make a custom component (extends JComponent).Ive overwridden the paintComponent() method. But when i make a new component and add it to JPanel, it isnt drawn, although i can see that the paintComponent() method of the component is indeed invoked: heres the short code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.MouseInputAdapter;
    import javax.swing.*;
    public class Test extends JFrame {
         static Test window;
         MouseOps mListener;
         JPanel drawingArea;
        public Test() {
              addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent e) {
                   System.exit(0);
              drawingArea = new JPanel();
              drawingArea.setBackground(Color.white);
              getContentPane().add(drawingArea, BorderLayout.CENTER);
              mListener = new MouseOps();
              drawingArea.addMouseListener(mListener);
              drawingArea.addMouseMotionListener(mListener);
         class MouseOps extends MouseInputAdapter{
              public void mouseClicked(MouseEvent e) {
                   int x = e.getX();
                   int y = e.getY();
                   TestComp comp = new TestComp(x, y);
                   drawingArea.add(comp);
                   drawingArea.validate();
                   repaint();               
         public static void main(String[] args) {
              window = new Test();
              window.setTitle("Test");
              window.setSize(450, 260);
              window.setVisible(true);
    class TestComp extends JComponent {
         int x, y;
         TestComp(int x, int y){
              this.x = x;
              this.y = y;     
         public void paintComponent (Graphics g) {
              super.paintComponent(g);
              g.setColor(Color.blue);
              g.drawRect(x, y, 30, 30);
              System.out.println("Should be drawn at: " + x + " " + y);
    }

    Your component has zero size. The passed in graphics instance has its clip set
    to the components size, so you will never be able to draw anything.
    So you have two choices:
    * set the bounds of your component manually. To do this you will have to use
    a null LayoutManager: http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html
    * or else do not use a separate component for each graphics object at all.
    Use a single container that overrides paintComponent() and iterates itself
    over the graphics objects and calls paint on them. Because the graphics
    objects are much more lightweight this approach scales better and is usually
    taken in graphics frameworks.
    Stephen

  • JPanel won't display my custome component

    Hi,
    I made a custome component class that in its paint method at this stage is suppose to paint a white rectangle on screen. However the when I add this custome component to my JPanel it doesn't show up. Does anybody have a solution for this?
    My code for the custome component is,
    public spaceMediaDisplayObject(mediaObject mo){
         x = mo.getSpaceX();
         y = mo.getSpaceY();
         height = mo.getHeight();
         width = mo.getWidth();
         name = mo.getName();
         System.out.println("Constructor");
         this.repaint();
    public void paint(Graphics g){
         System.out.println("Draw");
         g.setColor(Color.white);
         g.drawRect(x, y, height, width);
    And the fragment of code I am using to try and display in on the panel is as follows,
    spaceMediaDisplayObject smdo = new spaceMediaDisplayObject(toDisplay);
         spaceBodyPanel.add(smdo);
    Please help if able.

    If it's null then you need to set the size of each component explicitly:
    JPanel panel = new JPanel(null);
    Component customComponent = new CustomComponent();
    panel.add(customComponent);
    customComponent.setBounds(0, 0, 100, 100); // For exampleA simple layout manager could be used to make the component fill the panel, for example:
    JPanel panel = new JPanel(new GridLayout(1, 1));
    panel.add(new CustomComponent());Hope this helps.

  • Advice on creating a tricky custom component

    Hi,
    I'm working on creating a custom component which displays a image at the top of the canvas, and loops through a passed array collection, displaying each row of the array collection in a item renderer. So the component should look like this (see attached image).
    As you can see from this image the header is a image itself, this will differ every instance of the panel, there should be 3 of these panels on the page. Then each row of data is a item renderer displaying the data provided from a array collection of value object. If there are 4 items in this array collection then the panel should show 4 rows, if there are 2 row in the array then the panel will display 2 rows. Also the height of the panel will dynamically change depending on the number of rows to show.
    I was thinking of extending a Canvas component, and then passing in the image URL and trying to load and draw the image dynamically, then I was thinking of using the Drawing API to create the rectangle shape using the drawRoundRectComplex() of the graphics class.
    The problems I see with this is that I don't think the drawn rectangle shape can re-draw itself to show the change in height when more or less row of data need to be be displayed.
    Another option I have been thinking about is extending the Panel class to create my component, this may be better for handling the height resizing, but I'm not sure it can support the look of this component (the header image and the three rounded corners).
    Could anyone give me some advice on what would be the better option for creating this component.
    Thanks
    Stephen

  • Custom component not working properly

    Hi all - I am trying to create a custom component. I have followed the suggested MVC architecture, and created the following classes:
    1. SuperLineModel (the MODEL)
    2. SuperLine (the actual component,e.g. the CONTROLLER)
    3. BasicSuperLineUI (the UI Delegate class, e.g. the VIEW)
    4. SuperLineUI (an abstract type class for my UI Delegate)
    I also have a fifth class that draws a frame and panel, and then adds the custom component to the panel. In the main method of this class, I
    register the UI delegate like this:
    UIManager.put(BasicSuperLineUI.UI_CLASS_ID, "com.volant.mapit.view.BasicSuperLineUI");Everything compiles without any problems, but the custom component is never painted for some reason. In fact, I added a print line to the UI delegates paint method just to see if it was ever called, and it wasn't. I know I'm missing something here, and it's probably something small. I'm hoping some of you Swing gurus can take a look at my code below and point out the problem for me.
    I really appreciate any help you can give me. Thanks.
    The classes are listed below:
    // SuperLineModel
    import javax.swing.*;
    import javax.swing.event.*;
    public class SuperLineModel
      private double sourceXCoord = 0;
      private double sourceYCoord = 0;
      private double targetXCoord = 0;
      private double targetYCoord = 0;
      private EventListenerList listenerList = new EventListenerList();
      public SuperLineModel()
      public SuperLineModel(double sourceXCoord, double sourceYCoord,
                           double targetXCoord, double targetYCoord)
        this.sourceXCoord = sourceXCoord;
        this.sourceYCoord = sourceYCoord;
        this.targetXCoord = targetXCoord;
        this.targetYCoord = targetYCoord;
      public void setSourceXCoord(double x)
        this.sourceXCoord = x;
        return;
      public void setSourceYCoord(double y)
        this.sourceYCoord = y;
        return;
      public void setTargetXCoord(double x)
        this.targetXCoord = x;
        return;
      public void setTargetYCoord(double y)
        this.targetYCoord = y;
        return;
      public double getSourceXCoord()
        return this.sourceXCoord;
      public double getSourceYCoord()
        return this.sourceYCoord;
      public double getTargetXCoord()
        return this.targetXCoord;
      public double getTargetYCoord()
        return this.targetYCoord;
      public void addChangeListener(ChangeListener cl)
        listenerList.add(ChangeListener.class, cl);
      public void removeChangeListener(ChangeListener cl)
        listenerList.remove(ChangeListener.class, cl);
    // SuperLine
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import com.volant.mapit.view.*;
    import com.volant.mapit.model.*;
    public class SuperLine extends JComponent implements ChangeListener
      private SuperLineModel model;
      public SuperLine()
        init(new SuperLineModel());
      public SuperLine(SuperLineModel model)
        init(model);
      public void init(SuperLineModel model)
        setModel(model);
        setMinimumSize(new Dimension(50, 50));
        setPreferredSize(new Dimension(50,50));
        updateUI();
      public void setUI(BasicSuperLineUI ui)
        super.setUI(ui);
      public BasicSuperLineUI getUI()
        return (BasicSuperLineUI)ui;
      public void updateUI()
        setUI((BasicSuperLineUI)UIManager.getUI(this));
        invalidate();
      public String getUIClassID()
        return SuperLineUI.UI_CLASS_ID;
      public SuperLineModel getModel()
        return model;
      public void setModel(SuperLineModel model)
        SuperLineModel oldModel = model;
        if(oldModel != null)
          oldModel.removeChangeListener(this);
        if(model == null)
          model = new SuperLineModel();
        else
          model.addChangeListener(this);
        firePropertyChange("model", oldModel, model);
      public void stateChanged(ChangeEvent evt)
        repaint();
    // BasicSuperLineUI
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.plaf.*;
    import com.volant.mapit.control.*;
    public class BasicSuperLineUI extends SuperLineUI
      public static ComponentUI createUI(JComponent c)
        return new BasicSuperLineUI();
      public void installUI(JComponent c)
        SuperLine sl = (SuperLine)c;
      public void uninstallUI(JComponent c)
        SuperLine sl = (SuperLine)c;
      // This method is never called and I don't know why!!!
      public void paint(Graphics g, JComponent c)
        super.paint(g, c);
        System.out.println("test2");
        g.fillRect(0, 0, 200, 400);
    // SuperLineUI
    import javax.swing.plaf.*;
    import com.volant.mapit.control.*;
    public abstract class SuperLineUI extends ComponentUI
      public static final String UI_CLASS_ID = "SuperLineUI";

    A quick glance at the code and it looks ok with the exception of the following which I don't understand what you're trying to do:
      public void installUI(JComponent c)  {
        SuperLine sl = (SuperLine)c;
      public void uninstallUI(JComponent c)  {
        SuperLine sl = (SuperLine)c;
      }Here are my comments:
    1) I expect Superline sl to be a global variable for use elsewhere in your program.
    2) I have no idea what your uninstallUI does.
    This is what I would do:
      SuperLine sl;
      public void installUI(JComponent c)  {
        sl = (SuperLine)c;
      public void uninstallUI(JComponent c)  {
      }Finally, I am assuming that the changelistener will trigger a repaint which in turn will call your paint method, right?
    ;o)
    V.V.

  • 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

  • Scrolling a custom Component (e.g. JPanel) with overridden paint(Graphic g)

    Hi.
    I&#8217;m creating an application for modelling advanced electrical systems in a house. Until now I have focused on the custom canvas using Java2D to draw my model. I can move the model components around, draw lines between them, and so on.
    But now I want to implement a JScrollPane to be able to scroll a large model. I&#8217;m currently using a custom JPanel with a complete override of the paint(Graphic g) method.
    Screen-shot of what I want to scroll:
    http://pchome.grm.hia.no/~aalbre99/ScreenShot.png
    Just adding my custom JPanel to a JScrollPane will obviously not work, since the paint(Graphic g) method for the JPanel would not be used any more, since the JScrollPane now has to analyze which components inside the container (JPanel) to paint.
    So my question is therefore: How do you scroll a custom Component (e.g. JPanel) where the paint(Graphic g) method is totally overridden.
    I believe the I have to paint on a JViewport instructing the JScrollPane my self, but how? Or is there another solution to the problem?
    Thanks in advance for any suggestions.
    Aleksander.

    I�m currently using a custom JPanel with a complete override of the paint(Graphic g) method. Althought this isn't your problem, you should be overriding the paintComponent(..) method, not the paint(..) method.
    But now I want to implement a JScrollPane to be able to scroll a large model.When you create a custom component to do custom painting then you are responsible for determining the preferredSize of the component. So, you need to override the getPreferredSize(...) method to return the preferredSize of your component. Then scrolling will happen automatically when the component is added to a scrollPane.

  • Adding a Custom Component to Check-In Operation

    Hi everyone,
    Our technical knowledge is very basic in UCM and ECM.
    We are trying to add a JSP component which must have some interaction with the user just before a Check-in operation which should be consumed in the client's web browser.
    Can anyone please point me in the right directions for creating such a schema. We are learning stuff such as Custom Components, Component Wizard, presentation of UCM data through JSON, JSP components, Dynamic Server Pages. We have found the product amazing so far just like every other Fusion Middleware product.
    But still it is too early for us to decide what we should go with. Any info would be so much appreciated. I thought we could try a trigger before a Check-in operation through Content Profile, which would open a custom JSP added to UCM as a custom component. But it is very in-mature as you can point out.
    Thanks.

    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

  • Scaling a Custom Component? (pressing a button)

    "To resize a custom component, edit the components content"
    Does that mean edit in Photoshop?? I can't find anywhere to scale the object. I have a button and I want it to scale down as I press it...
    I basically want an easy way to make an image into a button that looks depressed or something when you click it...

    It means to edit the component in Catalyst.
    For example:
    1) Draw a Rectangle
    2) Choose the Arrow tool. Right-clck on Rectangle and choose Convert Artwork to Component > Button
    3) With the Button selected, notice that the HUD displays "Edit Button Appearance" with Up, Down, Over, and Disabled choices. Choose one.
    Or, you can double-click on the Button.
    4) In either case, you will enter what is called Edit-in-Place mode, where you are now editing the definition of the Button.
    5) You can use the Catalyst drawing tools to change the Button so that it looks different in the Up and Down states.
    6) Use the bread crumb bar above the ArtBoard to exit Edit-in-Place mode, or double-click outside the Button.
    Hope this helps,
    -- Greg

  • Create complex custom component

    Hi everyone!
    I'm trying to create my own custom component in JSF. However I have several questions :
    - It is not mandatory to create a renderer class, right ? the component can draw itself ?
    - How can I create a custom component which would have several "values" inside ? for example let us supppose I want to create a custom JSF component to enter a IBAN. The IBAN is divided into several parts : BBAN, country code, key, Bank adresse,... but any tutorial I've found explain how to create a input component with only one simple value (for example the classical "CreditCardInputComponent").
    Josselin

    Hi,
    did you find a solution for your "composite" component problem?
    I am also trying to create a custom component that contains several standard jsf components such as HtmlCommandLink and HtmlInputText.
    I build all the standard components within my component programmatically using things like:
    HtmlCommandLink link = (HtmlCommandLink) application.createComponent(HtmlCommandLink.COMPONENT_TYPE);
    Also at the beginning of the encodeBegin I clear all children from my custom component using getChildren().clear()
    and rerender the component based on my new internal model which I updated during the previous decoding of my component.
    As a simple jsf custom tag it works ok, however, I am facing deep problems with action events as soon as I use the component within a jsf HtmlDataTable tag.
    Am I missing something here?
    Any ideas? Help is really really appreciated. This different behavior in different contexts is slowly but constantly driving me nuts.
    cheers
    hans

  • Painting Custom Component

    I am writing a custom Component inheriting from JComponent class. I am doing custom painting of this component as the component I want has to have a gradient background. I am able to draw the graphics properly. But I am having a problem with the positioning of the control. I read in the tutorial for the custom painting of JComponent that we should paint the component taking the base as 0. If I place my component any where on the panel other than (0,0) the component either gets displayed at 0,0 or is not getting displayed properly.Kindly provide me with a solution.

    Painting of the component and positioning of the component are two different things.
    Yes painting is done relative to the top left of the component which is (0, 0);
    Positioning of the component in a container is done by the Layout Manager. So you need to provide a getPreferredSize(...) implementation so the LayoutManager knows how much space to reserve for the component.
    Maybe the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/14painting/index.html]Custom Painting will help you out. There is also a section on "Using Layout Manager".
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Draw custom selection frame(dashed rectangle), while mouse dragging is moving

    Hi All,
    Maybe anyone has experience of drawing custom selection frame(dashed rectangle) for selected page items.
    I have to draw a custom selection frame(dashed rectangle), when I drag mouse cursor, while left mouse button is pressed.
    Thank you!
    Regards.

    There are two possible answers:
    1. If you use the getGraphics() in your event dispatching code, then the rectangle disappears because the component you paint on gets repainted, and it has no idea about your rectangle it should paint. The painting routine should ALWAYS be written in paintComponent(Graphics gr) method. (I wish they made the getGraphics() method protected).
    2. If you paint it in the write way, it might disappear because the components that it overlaps might cover it.
    Now a fix:
    Because you need to paint on TOP of everything in the JPanel, you can either:
    1. The dirty way: overwrite the paint(Graphics gr) method of your JPanel, first call super.paint(gr) then paint the rectangle.
    2. A proper way: Add a non-opaque JPanel on top of you JLayeredPane (similar to GlassPane), and paint the rectangle on it (in it's paintComponent method).
    Regards,
    Marcin
    You're probably doing some getGraphics() drawing which is usually wrong. If a component gets repainted by the system it loses all the information
    Now to the question:
    Your rectangle disappears beacause the Components that are overlapping it

  • Problem with inputText in my custom component

    Hi, I have a custom dataTable component that I'm trying to get to work. It has to be a custom component because dataTable doesn't support rowspan, colspan, multi line headers, and a rendered attribute for rows. The problem is, that when I wrap the column tag inside my row tag then the method for the inputText tag never gets called in the UPDATE_MODEL_VALUES phase.
    I'm starting to think that JSF doesn't support 2 levels of tags between the inputText and dataTable. I'm hoping that someone can tell me what I have wrong with my components.
    Here is the JSP snippet.
    <cjsf:rptTable>
         <cjsf:data id="dataTable1" value="#{allAuthUser.tableRows}" var="myTableRow1">
              <cjsf:row>
                   <cjsf:col>
                        <h:inputText id="tableTestFld" value="#{myTableRow1.testFld}" size="5" maxlength="5"/>
                   </cjsf:col>
              </cjsf:row>
         </cjsf:data>
    </cjsf:rptTable>Here is what it renders. It looks to me like everything renders fine. So I'm guessing that there is something in a component that is causing JSF during the life cycle to not be able to process correctly.
    <table>
         <tbody>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_0:tableTestFld" name="tblmaintForm:body:dataTable1_0:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_1:tableTestFld" name="tblmaintForm:body:dataTable1_1:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_2:tableTestFld" name="tblmaintForm:body:dataTable1_2:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
         </tbody>
    </table>Note: If I leave off the row tag it renders the same way except of course the <tr> and </tr> tags are missing. If I do this, then the backing method for the inputText tag is called and everything works fine. Why doesn't it work with the row tag in place?
    Here are the components:
    public class UIRptTable extends UIComponentBase {
         public UIRptTable() {
              setRendererType("tblmaint.rptTableRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableData extends HtmlDataTable {
         public UIRptTableData() {
              setRendererType("tblmaint.rptTableDataRenderer");
         public String getFamily() {
              return "javax.faces.Data";
    public class UIRptTableRow extends UIOutput {
         public UIRptTableRow() {
              setRendererType("tblmaint.rptTableRowRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableCol extends UIColumn {
         public UIRptTableCol() {
              setRendererType("tblmaint.rptTableColRenderer");
         public String getFamily() {
              return "javax.faces.Column";
    }Here is part of the faces-config file in case you need it.
    <!-- Components -->
    <component>
         <component-type>tblmaint.rptTable</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTable</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableData</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableData</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableRow</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableRow</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableCol</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol</component-class>
    </component>
    <!-- Render Kits -->
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Data</component-family>
              <renderer-type>tblmaint.rptTableDataRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableDataRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRowRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRowRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Column</component-family>
              <renderer-type>tblmaint.rptTableColRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableColRenderer</renderer-class>
         </renderer>
    </render-kit>I sure hope that someone can help me out. Please let me know if you need any additional information.
    Thanks,
    Ray

    Hi, Ray!
    1) I was trying to put a button in the column header (for sorting) and I couldn't get that to work. That involved the >colhdr tag. I got that to work but I don't remember the fix. I'll look it up and reply back with that when I can.Dealing the first part of your trouble, you need NOT a custom component.
    I have looked through the implementation of RepeaterRenderer, as you advised me, and found that the multi-header possibility is included in the implementation of dataTable control.
    The code below is the part of source of repeater.jsp with only change:
    <d:data_repeater> &#61664; <h:dataTable>
    And it works fine.
    <h:dataTable id="table"
    binding="#{RepeaterBean.data}"
         rows="5"
    value="#{RepeaterBean.customers}"
    var="customer">
    <f:facet name="header">
    <h:outputText value="Customer List"/>               <!� First Header row -- >
    </f:facet>
    <h:column>
    <%-- Visible checkbox for selection --%>
    <h:selectBooleanCheckbox
    id="checked"
    binding="#{RepeaterBean.checked}"/>
    <%-- Invisible checkbox for "created" flag --%>
    <h:selectBooleanCheckbox
    id="created"
    binding="#{RepeaterBean.created}"
    rendered="false"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Account Id"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="accountId"
    binding="#{RepeaterBean.accountId}"
    required="true"
    size="6"
    value="#{customer.accountId}">
    </h:inputText>
    <h:message for="accountId"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Customer Name"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="name"
    required="true"
    size="50"
    value="#{customer.name}">
    </h:inputText>
    <h:message for="name"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Symbol"/>
    </f:facet>
    <h:inputText id="symbol"
    required="true"
    size="6"
    value="#{customer.symbol}">
    <f:validateLength
    maximum="6"
    minimum="2"/>
    </h:inputText>
    <h:message for="symbol"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Total Sales"/>
    </f:facet>
    <h:outputText id="totalSales"
    value="#{customer.totalSales}">
    <f:convertNumber
    type="currency"/>
    </h:outputText>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Commands"/>
    </f:facet>
    <h:commandButton id="press"
    action="#{RepeaterBean.press}"
    immediate="true"
    value="#{RepeaterBean.pressLabel}"
    type="SUBMIT"/>
    <h:commandLink id="click"
    action="#{RepeaterBean.click}"
    immediate="true">
    <h:outputText
    value="Click"/>
    </h:commandLink>
    </h:column>
    </h:dataTable>
    You may have a look at HTML source to prove that dataTable is already what you need:
    <table id="myform:table">
    <thead>
    <tr><th colspan="6" scope="colgroup">Customer List</th></tr>
    <tr>
    <th scope="col"></th>
    <th scope="col">Account Id</th>
    <th scope="col">Customer Name</th>
    <th scope="col">Symbol</th>
    <th scope="col">Total Sales</th>
    <th scope="col">Commands</th>
    </tr>
    </thead>
    <tbody>
    2.) The second trouble is still unsettled as previously. Right now I have different task at my job, and I can�t continue investigation of this problem.
    But when you find smth., please let me know. I�ll be very grateful.
    Regards,
    Oleksa Stelmakh

  • Unable to Edit the View in Custom Component

    Hi Experts,
    Please help me to resolve this issue !
    I am unable to lock the BOL Entity in my custom component using BTAdminH. I have written the below code in the Edit event Handler for Edit Button. The lr_entity->lock( ) condition statement is getting false and it is skipping the "set_view_editable( me )." code statement. Why??
    This is code excerpt that I have taken from edit button of the BP_HEAD/AccountViewSet and altered to my component/View
    DATA: lr_entity     TYPE REF TO cl_crm_bol_entity,
            lr_controller TYPE REF TO cl_ZVKH8_bspwdcomponent_impl.
      TRY.
          lr_controller ?= me->comp_controller.
          lr_entity ?= lr_controller->typed_context->btadminh->collection_wrapper->get_current( ).
    IF lr_entity IS BOUND.
      IF lr_entity->IS_LOCKED EQ abap_false.
        IF le_entity->IS_CHANGEABLE EQ abap_true.
           IF lr_entity->lock( ) EQ abap_true.
            me->view_group_context->set_view_editable( me ).
           ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
    and when I directly executed the below code in the Edit event Handler for Edit Button I am receiving the dereferencing NULL value exception. Why in my custom component in many places this happening??
      me->view_group_context->set_view_editable( me ).
    Exception Details
    CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference
    Method: ZL_ZVKH8_DETAILSEF_IMPL=>EH_ONBACK
    Thanks,
    Bujji

    Hi Summit & NishaNC,
    Thanks for your responses !
    As suggested, I have debugged the code for ->lock( ) method and there are exceptions raised from some methods.
    Method GET_LOCK () -> Method GET_ROOT () ->Method GET_PARENT ()
    At GET_ROOT( ) method i have received an exception
    "Root entity BTAdminH could not be determined" and one more "Entity BTAdminH could not be locked"
    Later when I have checked in MODEL Browser, I found that the BOL object "BTAdminH" for my view is an Access object and not the Root Object.
    Hence, I have a question? Does the locking can be done only for ROOT Objects?
    If this is TRUE then I think this is the major problem with my custom component where even the cross component navigation is also not happening and in many places I am receiving "Dereferencing NULL Value" information.
    Also I have gone through some of the Threads and one information that I found from Sumit Mittal
    1. An access object is an independent entity, has primary keys of its own.
    2. A root object is a special access object that is at the top of the hierarchy based on business rules.
    3. A dependent object's primary keys are supplied by access objects and it's lifetime is bound to them. If the parent object is destroyed, the dependent object is also destroyed.
    4. Search objects are query objects useful for querying root objects
    5. Search result objects - Search objects return the results in the form of a result object together with a relation pointing to the root object.
    6. View objects - ?
    7. Dynamic search objects - Used in advanced search, supports ranges and operators
    Could you please specify in which scenarios we have to go for Access Objects and Root Objects
    Thanks,
    Bujji

  • How do you reference a valueObject located in main to a custom component created in Catalyst?

    Hello,
    I have been working with the Catalyst Beta 2 / Flash Builder beta trying to create a photogallery and have hit a little bit of a snag, try as I might I can't seem to find the answer anywhere. I am still new to Flex so please excuse me if this is a basic question, I have been trying to understand more about Flex to make my designs in Catalyst better.
    I found this video on Adobe TV: http://tv.adobe.com/watch/rich-internet-applications-101/ria-stepbystep-16-binding-a-data- service-to-flash-builder-components/
    It's wonderful and I have the datalist I created in Catalyst working with the XML file I generated but I designed my little photogallery a bit diffrent, I created a Custom Component in Catalyst so that when you click an item on the DataList it pop's up a little screen with a larger photo in on it, rather then having an image in the main application. Now my problem seems to be that I can't refrence the valueObject I created with the wizard as it's in my Main.mxml file, is there a way to refrence it from my Custom Component so the larger image will display? Is there a way to let the component know which item on the dataList in the main application is selected and display the correct image?
    I should also say I really enjoy working with the Beta for both Flash Builder / Catalyst, thanks for the hard work!
    Thanks for the help,
    Chris

    I am afraid you cannot bind to static properties in Windows Store Apps. It is simply not supported.
    You could create a proxy class that exposes the static command property and bind to this property of an instance of the proxy object:
    http://stackoverflow.com/questions/14186175/bind-to-a-static-field-in-windows-8-xaml
    http://stackoverflow.com/questions/4708711/how-can-i-use-the-xstatic-extension-for-phone7-silverlight-apps
    You will of course have to create an instance of the proxy object. There is no way around this.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

Maybe you are looking for

  • How to Enforce User Change Password First Time User in Release 2?

    Hi... We discovered in Oracle Directory Manager(in unix is oidadmin), there actualy column to expiry date.(the default is 60). We follow this notes in metalink.. Note:176470.1 Subject: How To Pre-Expire Portal Passwords Even though the note is for Po

  • Missing original filename after export to photoshop

    Hi using the export function to edit a file in photoshop (german "bearbeiten in Photoshop") generates a new file, but without the original filename. Example: Export "my picture 234.nef" as a tiff to photoshop generates a file called "-bearbeitet_1.ti

  • Using Regular Expressions to Find Quoted Text

    I have run into a couple problems with the following code. 1) Slash-Star and Slash-Slash commented text must be ignored. 2) It does not detect backslashed quotes, or if that backslash is backslashed. Can this be accomplished with Regular Expressions,

  • Iphoto won't let me drag photos to a directory

    I've been using iphoto for years to import photos from my camera, now all the sudden it's changed its behavior. After importing the photos, I drag them to the directory of my choice in Finder, but now it won't let me. There's a little icon with a cir

  • Moving cc from one drive to anothe on the same computer

    I have installed a SSD and want to shift cc from the hybrid to the SSD without losing my download allowance, is this possible, and if yes how please?