Focus in a custom component

Hi, how can I create a component with one TextArea and
two button and have a focus arround all components, just
like DateField ?
Thanks in advance.

Any idea in how to make a comboBase component with 2
buttons?

Similar Messages

  • How can I make a custom component focusable?

    Hi all,
    I'm using a custom made component that consists of a JLabel
    and a JTextField. I want to make this component focusable,
    and when it's in focus I want the JTextField to have the
    focus so that the user can start typing immediately.
    I've looked at the java tutorial
    (http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html#focusable).
    When my component gets the focus I request the focus to the
    JTextField. The problem is: whenever i check if my custom
    component has the focus, it hasn't because JTextField has it
    (the focus, i mean :-) ) Which isn't strange i think, but
    how can i solve this problem?

    I want to make this component focusable, and when it's in focus I want the JTextField to have the focus
    The problem is: whenever i check if my custom component has the focus, it hasn't because JTextField has it (the focus, i mean :-) So whats the problem the textField has focus as desired.
    You don't need to make the containing panel focusable in order for the text field to receive focus. The FocusManager is smart enough to place focus on the first focusable component contained in the panel. If you make the panel focusable then you will need to use the tab key twice, once to move focus to the panel and a second time to move focus to the text field.

  • Losing Focus in an ItemRendered custom component

    I have a custom component that is composed of multiple TextAreas and displayed on the screen with other identical components via itemRenderer where useVirtualLayout="true".
    After I have clicked on a TextArea to give it focus, I want to be able to Tab to the next TextArea. But instead of focussing there, the focus is set to the parent of the itemRenderer, requiring me to click in the TextArea in my component to give it focus.
    I have tried to use focusManager.setFocus(parm) - where parm is the TextArea id that I want to assume focus,  but if I follow that up with focusManager.getFocus(), I find the parent now has focus.
    I have also attempted providing each TextArea with a tabIndex (instead of using focusManager.setFocus). But this seems to be ignored.
    Any ideas?

    You may have to get the keyFocusChange event and cancel it.

  • How to manage focus in custom component

    Hallo. As you know some flex components have native focus, like buttons, textinput etc.. I have created a custom component which is a borderContainer.. As you know, by default, if user press TAB my BorderContainer will never receive the focus.. I tryied to set some property like setFocus() and tabFobusEnabled to true but i still have some focus problems with my borderContainer .. It is like my App knows that my Custom component is not a native component.. Is there a way for my component to receive focus without problems??.. Which is the best way for doing that??
    Thx a lot
    Max

    Components must implement IFocusManagerComponent in order to receive focus.

  • FocusOut in a custom component

    Hi.
    I made a custom component using a Canvas with a TextInput and a Button inside.
    I need to make a focusOut event to be called when the focus go out of my custom component, but not be called when the focus change beetween the inputtext and the button inside the canvas.
    How can I do that?
    Tanks.

    Hi this is simple.Please try this sample.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application 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:Cn="*" creationComplete="Init()">
        <fx:Script>
            <![CDATA[
            import flash.events.Event;
            import mx.controls.Alert;
            private function Init():void
                objTemp.addEventListener("FocusOut", FocusOutHandler);
            private function FocusOutHandler(event:Event):void
                trace("CanCom's focus out");
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
    <s:HGroup>
        <s:TextInput></s:TextInput>
        <Cn:CanCom id="objTemp"></Cn:CanCom>
        <s:TextInput></s:TextInput>
    </s:HGroup>
    </s:Application>
    _____________________________________ CanCom.mxml ______________________________________
    <?xml version="1.0" encoding="utf-8"?>
    <s:HGroup xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/halo">
        <fx:Script>
            <![CDATA[
            import flash.events.Event;   
            private function FocusOutHandler(event:Event):void
                try{
                if (this.getFocus() == btnTemp || this.getFocus().parent.parent == txtTemp)
                    return;
                }catch (err:Error) { }
                dispatchEvent(new Event("FocusOut"));
            ]]>
        </fx:Script>
        <s:TextInput id="txtTemp" focusOut="FocusOutHandler(event)"></s:TextInput>
        <s:Button id="btnTemp" focusOut="FocusOutHandler(event)"></s:Button>   
    </s:HGroup>

  • 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.

  • Jsf custom component issue

    I am creating a custom component and extending the renderer like the following. My custon component is similar to h:messages but inaddition to that it has hyperlink(clicking error focuses individual input box). I have extended the renderer as follows, every thing works fine but the problem is the form gets null or looses its all value when error occured, however the component works fine. I dont know why is that hapening.
    Any help would be highly appreciated.
    public class CustomErrorRenderer extends Renderer {
    @Override
    public void encodeEnd(FacesContext context,
    UIComponent component) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    writer.startElement("div", component);
    writer.writeAttribute("id", component.getClientId(context), "id");
    writer.writeAttribute("style", "color: red", null);
    writer.startElement("ul", null);
    Iterator<String> clientIds = context.getClientIdsWithMessages();
    while (clientIds.hasNext()) {
    String clientId = clientIds.next();
    Iterator<FacesMessage> messages = context.getMessages(clientId);
    if (!messages.hasNext()) { continue; }
    String javaScript = "var field = document.getElementById('"
    +clientId+ "');" +"if(field == null) return false;"+
    "field.focus(); return false;";
    writer.startElement("li", null);
    writer.startElement("a", null);
    writer.writeAttribute("onclick", javaScript, null);
    writer.writeAttribute("href", "#", null);
    while (messages.hasNext()) {
    writer.writeText(messages.next().getSummary(), null);
    writer.endElement("a");
    writer.endElement("li");
    writer.endElement("ul");
    writer.endElement("div");
    }

    The problem is, the form values that are tied to input boxes are null once validation error occurs.
    I think when I am overriding that encodeEnd, this is causing the problem for the form values getting null.
    IF I want to see, what are the submitted values then isn't this the way, I am getting null here also:
              FacesContext context = FacesContext.getCurrentInstance();     
                  UIViewRoot viewRoot= context.getViewRoot();
                 HtmlInputText input = (HtmlInputText)viewRoot.findComponent("formId:InputboxId");
              System.out.println("input  sub value" + input.getSubmittedValue());

  • Button in custom component not showing

    I made a very simple custom component with a TextField and Button but when I add multiple instances of it to a Layout, only the first Button shows up while the other show only when I focus the corresponding TextField. I'm quite new to fx and I'm not sure I did everything correctly but I don't see any obvious error in my code.
    The component:
    public class TestComponent extends BorderPane {
        @FXML
        private Button browseButton;
        @FXML
        private TextField textField;
        public TestComponent() {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("TestComponent.fxml"));
            fxmlLoader.setRoot(this);
            fxmlLoader.setController(this);
            try {
                fxmlLoader.load();
            } catch (IOException exception) {
                throw new RuntimeException(exception);
    The fxml
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.HBox?>
    <fx:root type="javafx.scene.layout.BorderPane" xmlns:fx="http://javafx.com/fxml/1"
        xmlns="http://javafx.com/javafx/2.2">
        <center>
            <TextField fx:id="textField" prefWidth="200.0" />
        </center>
        <right>
            <Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"
                minHeight="-Infinity" prefHeight="${textField.height}" text="Browse"
                textAlignment="CENTER"  />
        </right>
    </fx:root>
    and the test code
    @Override
        public void start(Stage primaryStage) {
            VBox box = new VBox(5);
            box.setPadding(new Insets(5));
            TestComponent a = new TestComponent();
            TestComponent b = new TestComponent();
            TestComponent c = new TestComponent();
            box.getChildren().addAll(a, b, c);
            Scene scene = new Scene(box);
            primaryStage.setScene(scene);
            primaryStage.show();
    I'm running on Ubuntu with jdk-8-ea-bin-b111-linux-i586-10_oct_2013. I tested with jdk 1.7.0_40 and the buttons don't show.
    I'd include screenshots but the button to add images is disabled.
    Thanks for the help

    The issue is with the bind definition in the FXML, if you remove that definition, the buttons will display.
       prefHeight="${textField.height}"
    I think the binding is working, but when there is some kind of error (bug) in the layout process such that the scene is not automatically laid out correctly when the binding occurs.
    You can get exactly the same behaviour by removing the binding definition in FXML and placing it in code after the load.
                browseButton.prefHeightProperty().bind(textField.heightProperty());
    When the scene is initially displayed, the height of all of the text fields is 0, as they have not been laid out yet, and the browser button prefHeight gets set to 0 through the binding.
    That's OK and expected.
    Then the scene is shown and a layout pass occurs, which sets the height of the text fields to 26 and the prefHeight of all of the browser buttons adjust correctly.
    That's also OK and expected.
    Next the height of one of the buttons is adjusted via a layout pass.
    That's also OK and expected.
    But the height of the other buttons is not adjusted to match their preferred height (probably because a layout pass is not run on them).
    That is not OK and not expected (and I think a bug).
    If you manually trigger a layout pass on one of the components which did not render completely, the button will be displayed - but that should not be necessary.
    You can file a bug against the Runtime project at:
       https://javafx-jira.kenai.com/
    You will need to sign up at the link on the login page, but anybody can sign up and log a bug.
    Here is some sample code.
    import javafx.application.Application;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class ComponentTestApp extends Application {
      @Override
      public void start(Stage primaryStage) {
        VBox box = new VBox(5);
        box.setPadding(new Insets(5));
        TestComponent a = new TestComponent();
        TestComponent b = new TestComponent();
        TestComponent c = new TestComponent();
        box.getChildren().addAll(a, b, c);
        Scene scene = new Scene(box);
        primaryStage.setScene(scene);
        primaryStage.show();
        b.requestLayout(); // I don't understand why this call is necessary -> looks like a bug to me . . .
      public static void main(String[] args) {
        launch(args);
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.fxml.FXML;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.control.Button;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.BorderPane;
    import java.io.IOException;
    public class TestComponent extends BorderPane {
        private static int nextComponentNum = 1;
        private final int componentNum = nextComponentNum;
        @FXML
        private TextField textField;
        @FXML
        private Button browseButton;
        public TestComponent() {
          nextComponentNum++;
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("TestComponent.fxml"));
            fxmlLoader.setRoot(this); 
            fxmlLoader.setController(this); 
            try { 
                fxmlLoader.load();
                browseButton.prefHeightProperty().bind(textField.heightProperty());
                System.out.println(componentNum + " " + browseButton + " prefHeight " + browseButton.getPrefHeight());
                textField.heightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + textField + " height " + newValue);
                browseButton.prefHeightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + browseButton + " prefHeight " + newValue);
                browseButton.heightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + browseButton + " height " + newValue);
                    new Exception("Not a real exception - just a debugging stack trace").printStackTrace();
            } catch (IOException exception) {
                throw new RuntimeException(exception); 
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.HBox?>
    <fx:root type="javafx.scene.layout.BorderPane" xmlns:fx="http://javafx.com/fxml/1"
             xmlns="http://javafx.com/javafx/2.2">
        <center>
            <TextField fx:id="textField" prefWidth="200.0" />
        </center>
        <right>
            <Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"
                    minHeight="-Infinity" text="Browse"
                    textAlignment="CENTER"  />
            <!--<Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"-->
                    <!--minHeight="-Infinity" prefHeight="${textField.height}" text="Browse"-->
                    <!--textAlignment="CENTER"  />-->
        </right>
    </fx:root>
    Here is the output of the sample code:
    1 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    2 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    3 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    1 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    1 TextField[id=textField, styleClass=text-input text-field] height 26.0
    2 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    2 TextField[id=textField, styleClass=text-input text-field] height 26.0
    3 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    3 TextField[id=textField, styleClass=text-input text-field] height 26.0
    2 Button[id=browseButton, styleClass=button]'Browse' height 26.0
    java.lang.Exception: Not a real exception - just a debugging stack trace
      at testcomponent.TestComponent$3.changed(TestComponent.java:69)
      at testcomponent.TestComponent$3.changed(TestComponent.java:65)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:347)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyDoubleWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:177)
      at javafx.beans.property.ReadOnlyDoubleWrapper.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:143)
      at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:113)
      at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:146)
      at javafx.scene.layout.Region.setHeight(Region.java:915)
      at javafx.scene.layout.Region.resize(Region.java:1362)
      at javafx.scene.layout.BorderPane.layoutChildren(BorderPane.java:583)
      at javafx.scene.Parent.layout(Parent.java:1063)
      at javafx.scene.Parent.layout(Parent.java:1069)
      at javafx.scene.Scene.doLayoutPass(Scene.java:564)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2341)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:329)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
      at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    java.lang.Exception: Not a real exception - just a debugging stack trace
      at testcomponent.TestComponent$3.changed(TestComponent.java:69)
      at testcomponent.TestComponent$3.changed(TestComponent.java:65)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:347)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyDoubleWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:177)
      at javafx.beans.property.ReadOnlyDoubleWrapper.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:143)
      at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:113)
      at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:146)
      at javafx.scene.layout.Region.setHeight(Region.java:915)
      at javafx.scene.layout.Region.resize(Region.java:1362)
      at javafx.scene.layout.BorderPane.layoutChildren(BorderPane.java:583)
      at javafx.scene.Parent.layout(Parent.java:1063)
      at javafx.scene.Parent.layout(Parent.java:1069)
      at javafx.scene.Scene.doLayoutPass(Scene.java:564)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2341)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:329)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
      at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    1 Button[id=browseButton, styleClass=button]'Browse' height 26.0

  • 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.

  • How to handle custom component data on overviewset save button CRM UI

    Hi,
    I have added a custom component to a standard view which is enchanted.
    I can handle any data with my buttons on the component but after editing data
    i need the save the data when the save button on the overview(top) is pressed.
    I have redefined save button of overview but i cant get my data.
    My node name is Root. I think i couldnt bind it to overview.
    How can i do that?
    Thank you

    Probably it can be done by
    http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebUITechnical-CreatingTableViewInWebUI
    i am trying
    Thank you

  • Custom Component UI not displaying in 11G

    Hi All,
       We have a custom component in 10G where we have added new link in the UCM Home Page, it will be displayed beside Administration tab with name Edit Tables, under this we have sub links Alldistr_RVS, Distprod, Distuser, Prdstate, Products_RVS, State_RVS, Stateusr. When we deployed this code in 11G it is not working. Could any one please provide me code to make it work in 11G instace. Appreciate your help on this.
    Below is the code used in 10G in resource file
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
    ampfRVSEditTables htmlIncludeOrString
    </title>
    </head>
    <body>
    <@dynamichtml custom_finish_layout_init@>
    <$include super.custom_finish_layout_init$>
      <$include how_to_components_menu$>
      <$include vbis_edit_tables_link$>
    <@end@>
      <@dynamichtml how_to_components_menu@>
      <$if not how_to_components_menu_included$>
      //add a drop-down menu, or a tray to the UI
      navBuilder.addChildNodeTo('NAVTREE', 'collection', 'id==EDIT_Tables', 'label==Edit Tables');
      if (navBuilder.menuB)
      navBuilder.menuB.addTopLevelNode("EDIT_Tables");
      else if (navBuilder.trayA)
      navBuilder.trayA.addTopLevelNode("EDIT_Tables");
      <$EDIT_Tables_menu_included=1$>
      <$endif$>
      <@end@>
    <@dynamichtml vbis_edit_tables_link@>
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==ALLDISTR_RVS',
    'label==Alldistr_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_ALLDISTR_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==DISTPROD',
    'label==Distprod', 'url==<$HttpCgiPath$>?IdcService=GET_DISTPROD_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==DISTUSER',
    'label==Distuser', 'url==<$HttpCgiPath$>?IdcService=GET_DISTUSER_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==PRDSTATE',
    'label==Prdstate', 'url==<$HttpCgiPath$>?IdcService=GET_PRDSTATE_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==PRODUCTS_RVS',
    'label==Products_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_PRODUCTS_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==STATE_RVS',
    'label==State_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_STATE_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==STATEUSR',
    'label==Stateusr', 'url==<$HttpCgiPath$>?IdcService=GET_STATEUSR_PAGE');
    <@end@>
    </body>
      </html>
    Thanks.
    Ashok

    Hi Jiri,
       I from the sample example I tried to develop component to display HOW_TO_COMPONENTS as Menu item under which there is sub item Annuity_Dispname_Mapping, but it is not displaying. I am afraid where it went wrong. Below is the code i used, please help me to fix this. Thank you
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
    MenuExample htmlIncludeOrString
    </title>
    </head>
    <body>
    <@dynamicdata CoreMenuItems@>
    id,           label,       linkType, linkData
    HOW_TO_COMPONENTS, How To Components, YuiDev,
    ANNUITY_DISPNAME_MAPPING, Annuity_Dispname_Mapping, YuiDev, <$HttpCgiPath$>?IdcService=GET_DATA_ACCESS_PAGE
    <@end@>
    <@dynamicdata CoreMenuItemRelationships@>
    <?commatable mergeKey="primaryKey"?>
    parentId,    id,           loadOrder
    MENU_A,      HOW_TO_COMPONENTS,  1000
    HOW_TO_COMPONENTS, ANNUITY_DISPNAME_MAPPING, 10
    <@end@>
    <@dynamicdata CoreMenuItemsFlags@>
    id,           flags
    HOW_TO_COMPONENTS, isLoggedIn
    ANNUITY_DISPNAME_MAPPING, isLoggedIn
    <@end@>
    <@dynamicdata CoreMenuItemsImages@>
    id,           image,                imageOpen
    HOW_TO_COMPONENTS,     ScsPageItem.gif,
    ANNUITY_DISPNAME_MAPPING,     ScsPageItem.gif,
    <@end@>
    <@dynamicdata ampcustom_menu_items_template_data@>
    <?commatable indexedColumns="id"?>
    id,                  parentId,    linkType,        flags
    HOW_TO_COMPONENTS_LINK_TEMPLATE, HOW_TO_COMPONENTS, external,
    <@end@>
    <@dynamichtml custom_navigation_menu_items@>
    <$include super.custom_navigation_menu_items$>
      <$urlCount = 0$>
      <$if utLoadResultSet("pne_portal", "PersonalURLS")$>
      <$if rsFirst("PersonalURLS")$>
      <$loop PersonalURLS$>
      <$ddAppendIndexedColumnResultSet("ampcustom_menu_items_template_data", "NavigationMenuItems", "id", "HOW_TO_COMPONENTS_LINK_TEMPLATE")$>
      <$rsLast("NavigationMenuItems")$>
      <$NavigationMenuItems.id = "HOW_TO_COMPONENTS_" & urlCount$>
      <$NavigationMenuItems.label = js(title)$>
      <$NavigationMenuItems.linkData = js(website)$>
      <$NavigationMenuItems.loadOrder = urlCount$>
      <$urlCount = urlCount + 1$>
      <$endloop$>
      <$endif$>
    <$endif$>
    <@end@>
    </body>
    </html>
    Thanks

  • Decode-method for custom component isn't called

    Hi,
    i have writen a custom component which gets some information by command-link. To make the data from the link accessible, i wrote a decode method in my renderer and in me component. But both method are not called from the faces framework.
    Dows anybody knows what i made wrong???
    Thanks, Sebastian

    Hi,
    thank you for your reply.
    Unfortunately the processDecodes(...) of my component is also not called from the framework. Does anybody knows what i'm making wrong???
    Thanks!

  • Problem with attributes in custom component

    Hi All,
    I am creating a simple jsf PanelGrid custom component....in that component I am adding two new attributes....
    when I use that tag in my jsf application it is rendering fine in the client side....but the parent class that is PanelGrid component's attributes are not inheriting to my custom panelgrid....
    can any one tell me how can I use the attributes of the super class PanelGrid??
    Thanks...

    Have you configured the attributes in the tag library descriptor?

Maybe you are looking for

  • Default hierarchy not getting selected in the GOTO report.

    Hi friends,              I am facing a weird problem in a jump query(GoTo query). I am giving an input for the main query. The input values are week and Organization(it is a hierarchy). I am executing the report and after that i am going into the jum

  • Home wireless network help!

    Ok... So I recently moved to a new house, and moved my Internet service. Im with AT&T and I had DSL. I was supposed to have next day installation because I work from home and take classes from home and every day I go without Internet costs me money.

  • Performance with select in Start routine

    Hi, I open a request because i have some troubles in a update rules. In this update rule i have several select function on master data and i takes just 3-4 minutes by packets (which is OK for my daily extraction). But my users needs now a data taht i

  • Randomising order of elements in vectors

    hi i have a vector containing vectors containing Doubles (nightmare, i know!). Just wondering if there's an easy way of randomising the order or the elements in the main vector. thanks, al

  • Workbench - Message Monitor

    Hi, I've got a question on the Message Monitor on the Runtime Workbench. If I select a message and choose the details button it pops up a window with the message details. Yesterday this pop-up window had 3 tabs on it which among other things displaye