Custom ui component with default layout

Hello,
I am trying to develop custom swing components with default layout set.
Both component class and its BeanInfo are written with NetBeans 6.1
However, when trying to put this custom swing component into interface builder (matisse) of
NetBeans 6.1, the default layout is always replaced with GroupLayout.
Is there any way to correctly specify default layout manager used in a custom
swing component?
thanks a lot!

Hi Jacek
You can embed your custom component with IFrame element in WebDynpro view. IFrame element loads a content by URL which can be bound to controller's context. You can store your custom HTML content in MIME folder of the WebDynpro component. At runtime you can get the URL to the MIME content and initialize the IFrame with the URL.
However, IFrame element is being reloaded by WebDynpro framework too often during each request/response cycle. This is a disadvantage of the solution.
BR, Siarhei

Similar Messages

  • Custom JSF component with custom value datatype

    I've created a simple custom JSF component with a decode, encodeBegin as follows:
    public void decode(FacesContext context) {
        Map<String, String> requestParameters = context.getExternalContext().getRequestParameterMap();
        String clientId = getClientId(context);
        String value = requestParameters.get(clientId);
        setSubmittedValue(value);
        super.decode(context);
    public void encodeBegin(FacesContext context) throws IOException {
        ResponseWriter response = context.getResponseWriter();
        String clientId = getClientId(context);
        response.startElement("input", this);
        response.writeAttribute("name", clientId, "id");
        response.writeAttribute("type", "text", null);
        String value = (String) getValue();
        if (null != value) {
             response.writeAttribute("value", value, "value");
        response.endElement("input");
    }With also:
    setRendererType(null);as part of the constructor.
    This component works just fine both inside and outside of a dataTable component, as expected.
    What I would like to do now is to replace the String value datatype with a custom class, for example MyDataType. For this I do:
    public void decode(FacesContext context) {
        Map<String, String> requestParameters = context.getExternalContext().getRequestParameterMap();
        String clientId = getClientId(context);
        String value = requestParameters.get(clientId);
        MyDataType myData = (MyDataType) getValue();
        MyDataType newData = (MyDataType) myData.clone();
        newData.setValue(value);
        // copy old object and only update the changed field of this object
        setSubmittedValue(newData);
        super.decode(context);
    public void encodeBegin(FacesContext context) throws IOException {
        ResponseWriter response = context.getResponseWriter();
        String clientId = getClientId(context);
        response.startElement("input", this);
        response.writeAttribute("name", clientId, "id");
        response.writeAttribute("type", "text", null);
        MyDataType value = (MyDataType) getValue();
        if (null != value) {
             response.writeAttribute("value", value.getValue(), "value");
        response.endElement("input");
    }Now this works perfect outside of a dataTable component, but inside it fails to update the property on the BB.
    Are there somewhere examples on how to properly use custom datatypes as values for UIInput components? Also how to only partially update the value (like I do, I only want to update the value field of the MyDataType object)

    Even if I encode the entire MyDataType via hidden input elements and decode it again (i.e. not using a cloned getValue) it's still not working side a dataTable.
    Could it have to do something with me using Facelets?

  • Custom Tilelist Component With Special Effects

    I am trying to create a custom tilelist component which incorporates some special visual effects I need for my app. What I'm trying to do is replace the blue themed rollover color which shows when each item is rolled over with an effect which applies the glow effect to each hovered over items image and label and also converts the image to color whilst the item is hovered over (the tilelist itself is converted to greyscale upon application complete). At the moment I have it set so the blue them is completely removed but I want to instead alter the rolover them e to how I've described above. Here's what I mean below, which I made using static images and text (the social item is being hovered over in that picture), followed by the code for my custom tilelist so far:-
    http://i223.photobucket.com/albums/dd147/jimmyoneshot/theicons.jpg
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TileList xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:itemRenderer>
        <mx:Component>
         <mx:Canvas width="125" height="145">
          <mx:Image source="{data.icon}" height="64" width="64" top="10" horizontalCenter="0"/>
          <mx:Label text="{data.label}" bottom="1" horizontalCenter="0" color="#FFFFFF" fontWeight="bold" fontSize="12"/>
         </mx:Canvas>   
        </mx:Component>
        </mx:itemRenderer>
    <mx:Script>
    <![CDATA[
      import mx.core.EdgeMetrics;
      import mx.core.IFlexDisplayObject;
      import mx.skins.halo.ListDropIndicator;
      import mx.events.DragEvent;
      import mx.controls.listClasses.IListItemRenderer;
      use namespace mx_internal;
      override protected function drawSelectionIndicator(
        indicator:Sprite, x:Number, y:Number,
        width:Number, height:Number, color:uint,
        itemRenderer:IListItemRenderer):void
      // Remove the Selection indicator
      override protected function drawHighlightIndicator(
       indicator:Sprite, x:Number, y:Number,
       width:Number, height:Number, color:uint,
       itemRenderer:IListItemRenderer):void
      ]]>
    </mx:Script>
    </mx:TileList>

    I'm unstuck :)  The key to getting this to work is to import the packages you are going to use in your component.xml.
    So, for me..I had to add the following:
            com.adobe.idp.workflow.dsc.type
            com.adobe.idp.taskmanager.form
            com.adobe.idp.taskmanager.form.impl
            com.adobe.idp.taskmanager.form.impl.xfa

  • Custom text component with different start and end points for each line

    I'm trying to create a custom component extending textArea in which each individual line in the textArea would have different start and end points.  For example, the start/end points for line 1 might be 20 pixels in the front and 35 pixels at the end but start/end points for line 2 might be 25 pixels in front and 20 pixels at the end, etc.  These boundary values would be passed in.  The width of the entire textArea component would be a fixed size.  The result would be something like this:
         Jack and Jill
              ran up the hill
      to fetch a pail of water
    depending on the boundary values of each individual line of course.  The custom component would take a string and render it in the text component with the appropriate individual line start and end points.  I'm trying to do this by adding the text component to the display with the passed in string and then adding in spaces in the beginning of each line and adding a "/n" at the end of the line wherever appropriate based on the start and end values for that line.
    Just wondering if I'm on the right track and if anyone has any advice on this.

    > Applying the marker places the same icon on all lines of the graph and I need a different one for each
    What do you have selected when you assign the marker? It
    shouldn't apply to all the markers on the whole graph unless you have all the existing markers selected when you apply the new one.
    Assigning marker designs is exactly analogous to assigning bar graph designs.
    If you have a single marker selected when you assign the new design, it will apply to only that graph data point.
    If you use the group select tool (or option-click with the direct select tool) to reclick on an already-selected marker until all the markers for the same line are selected, and then assign a design, the new design will apply only to the selected line. (You can extend the graph by adding more rows, and the new data points will inherit the marker for the line they are on.)
    The thread linked to below demonstrates in more detail how the marker designs are scaled:
    http://www.adobeforums.com/cgi-bin/webx/.3bc10970/0

  • Custom template component with Spark ?

    Hi there, everyday's got its own (silly?) question :
    I'm trying to develop a new component I've called "Drawer", made of a handle (button) and two skinnable containers displayed when the drawer is "opened" and hidden when it is closed.
    So here is my AS class:
    package nova.style
         import flash.events.MouseEvent;
         import spark.components.Button;
         import spark.components.SkinnableContainer;
         import spark.components.supportClasses.SkinnableComponent;
         [SkinState("closed")]
         [SkinState("opened")]
         public class Drawer extends SkinnableComponent
              // Define skin parts
              [SkinPart(required="true")]
              public var handle:Button;
              [SkinPart(required="true")]
              public var track:SkinnableContainer;
              [SkinPart(required="true")]
              public var drawerContent:SkinnableContainer;
              // Define component data
              [Bindable]
              public var drawerLabel:String;
              [Bindable]
              public var isOpen:Boolean=false;
              [Bindable]
              public var handleX:Number=500;
              public function Drawer()
                   super();
                   isOpen = false;
              override protected function getCurrentSkinState():String {
                   if (isOpen) {
                        return "opened";
                   } else {
                        return "closed";
              override protected function partAdded(partName:String, instance:Object):void
                   super.partAdded(partName,instance);
                   if( instance == handle)
                        handle.addEventListener(MouseEvent.CLICK,handle_clickHandler);
              override protected function partRemoved(partName:String, instance:Object):void
                   super.partRemoved(partName,instance);
                   if( instance == handle)
                        handle.removeEventListener(MouseEvent.CLICK,handle_clickHandler);
              private function handle_clickHandler(event:MouseEvent):void {
                   isOpen=!isOpen;
                   invalidateSkinState();
    and the associated skin :
    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/halo">
         <s:states>
              <s:State name="closed"/>
              <s:State name="opened"/>
         </s:states>
         <!-- host component -->
         <fx:Metadata>
              [HostComponent("nova.style.Drawer")]
         </fx:Metadata>
         <s:layout>
              <s:BasicLayout />
         </s:layout>
         <s:VGroup width="100%" height="100%" gap="-1">
              <s:Group includeIn="opened" width="100%" height="100%">
                   <s:SkinnableContainer id="drawerContent" width="100%" height="100%">
                   </s:SkinnableContainer>
                   <s:SkinnableContainer id="track" x="{hostComponent.handleX}" width="{handle.width}">
                   </s:SkinnableContainer>
              </s:Group>
              <s:Button id="handle" label="{hostComponent.drawerLabel}" x="{hostComponent.handleX}" skinClass="nova.style.skins.DrawerHandleSkin"/>
              </s:VGroup>
         </s:VGroup>
    </s:SparkSkin>
    I have defined my drawerContent and track parts as SkinnableContainer be cause I want them to be able to hold child elements that the user of my component would specify later on. Actually, I was hoping that I could instanciate my drawer's content in this way :
    <nova:Drawer isOpen="true" drawerLabel="Alarms" skinClass="nova.style.DrawerSkin" handleX="100" width="100%">
              <nova:drawerContent>
                   <s:Panel>
                             <s:Button label="drawer content button"></s:Button>
    </s:Panel>
    </nova:drawerContent>
    <nova:track>
    <s:Panel>
    <s:Button label="track button">
    </s:Button>
    </s:Panel>
    </nova:track>
    </nova:Drawer>
    Unfortunately, neither of the inner buttons are showing at runtime. I guess I've missed a point in my skin class to indicate that my skinnablecontainers can have a content, but I can't find out what.
    Any clue much appreciated !
    Thanks
    Matt

    Hey Matt,
    I took a look at your skinnable approach, and you're pretty close.  You're just missing the part where the properties get pushed in to the skin parts.  For instance, in a button, we have a skin part, called labelDisplay, and a property called label.  When someone sets the label property, you need to push that in to the labelDisplay skin part.  If you were to look at the label setter in Button, you'd see something like:
    if (labelDisplay)
            labelDisplay.text = label;
    For your component, you need a track skin part, and then a trackContent property. When the trackContent gets set, you'd push that in to the track skin part. This is similar to what we do in Panel with controlBarContent and controlBarGroup.  Here's some code snippets from Panel to get you started (I modified the code a bit to make it easier to understand):
    //  controlBarGroup
    [SkinPart(required="false")]
    *  The skin part that defines the appearance of the
    *  control bar area of the container.
    *  By default, the PanelSkin class defines the control bar area to appear at the bottom
    *  of the content area of the Panel container with a grey background.
    *  @see spark.skins.spark.PanelSkin
    *  @langversion 3.0
    *  @playerversion Flash 10
    *  @playerversion AIR 1.5
    *  @productversion Flex 4
    public var controlBarGroup:Group;
    //  controlBarContent
    [ArrayElementType("mx.core.IVisualElement")]
    *  The set of components to include in the control bar area of the
    *  Panel container.
    *  The location and appearance of the control bar area of the Panel container
    *  is determined by the spark.skins.spark.PanelSkin class.
    *  By default, the PanelSkin class defines the control bar area to appear at the bottom
    *  of the content area of the Panel container with a grey background.
    *  Create a custom skin to change the default appearance of the control bar.
    *  @default null
    *  @see spark.skins.spark.PanelSkin
    *  @langversion 3.0
    *  @playerversion Flash 10
    *  @playerversion AIR 1.5
    *  @productversion Flex 4
    public function get controlBarContent():Array
        if (controlBarGroup)
            return controlBarGroup.getMXMLContent();
        else
            return _controlBarContent;
    *  @private
    public function set controlBarContent(value:Array):void
        if (controlBarGroup)
            controlBarGroup.mxmlContent = value;
        _controlBarContent = value;
    *  @private
    override protected function partAdded(partName:String, instance:Object):void
        super.partAdded(partName, instance);
        if (instance == controlBarGroup)
            if (_controlBarContent !== undefined)
                controlBarGroup.mxmlContent = _controlBarContent
    *  @private
    override protected function partRemoved(partName:String, instance:Object):void
        super.partRemoved(partName, instance);
        if (instance == controlBarGroup)
            _controlBarContent = controlBarGroup.getMXMLContent();
            controlBarGroup.mxmlContent = null;
    As I said, I modified the code snippet a bit to make it easier to understand, but that should get you started.
    As per the template component pattern, that stuff should still work, but I think you'd be better off following this new pattern which splits it up in tot he SkinnableComponent and the Skin.
    -Ryan

  • Tool bar dock problem with grid layout

    I have a tool bar with grid layout. When i dock it to vertical location(west or east) the buttons inside tool bar keep one row. I want to know how do i do to make the buttons arraged vertically like the tool bar with default layout when dock it at west or east position.

    I had started a custom layout manager for toolbars a few months ago that I found a little easier to use than the default BoxLayout. I just modified it to allow optionally matching the button sizes (width, height, or both), so you can get the same effect as GridLayout. Note that this one doesn't collapse the toolbar like the one in the other thread. Here's the source code as well as a simple test app to demonstrate how to use it. Hope it helps.
    //     TestApp.java
    //     Test application for ToolBarLayout
    // package ***;
    import java.awt.*;
    import javax.swing.*;
    public class TestApp extends JFrame
         /////////////////////// Main Method ///////////////////////
         public static void main(String[] args)
              try { UIManager.setLookAndFeel(
                   UIManager.getSystemLookAndFeelClassName()); }
              catch(Exception ex) { }     
              new TestApp();
         public TestApp()
              setTitle("ToolBarLayout Test");
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              setSize(400, 300);
              setLocationRelativeTo(null);
              JToolBar tbar = new JToolBar();
              ToolBarLayout layout = new ToolBarLayout(tbar);
              // Comment these two lines out one at a time to see
              // how they affect the toolbar's layout...
              layout.setMatchesComponentDepths(true);
              layout.setMatchesComponentLengths(true);
              tbar.setLayout(layout);
              tbar.add(new JButton("One"));
              tbar.add(new JButton("Two"));
              tbar.add(new JButton("Three"));
              tbar.addSeparator();
              tbar.add(new JButton("Musketeers"));
              Container c = getContentPane();
              c.setLayout(new BorderLayout());
              c.add(tbar, BorderLayout.NORTH);
              setVisible(true);
    //     ToolBarLayout.java
    //     A simple layout manager for JToolBars.  Optionally resizes buttons to
    //     equal width or height based on the maximum preferred width or height
    //     of all components.
    // package ***;
    import java.awt.*;
    import javax.swing.*;
    public class ToolBarLayout implements LayoutManager, SwingConstants
         private JToolBar     oToolBar = null;
         private boolean     oMatchDepth = false;
         private boolean     oMatchLength = false;
         private int          oGap = 0;
         public ToolBarLayout(JToolBar toolBar)
              oToolBar = toolBar;
         public ToolBarLayout(JToolBar toolBar, boolean matchDepths)
              oToolBar = toolBar;
              oMatchDepth = matchDepths;
         public ToolBarLayout(JToolBar toolBar,
                        boolean matchDepths,
                             boolean matchLengths)
              oToolBar = toolBar;
              oMatchDepth = matchDepths;
              oMatchLength = matchLengths;
         // If true, all buttons in the row will be sized to
         // the same height (assuming horizontal orientation)
         public void setMatchesComponentDepths(boolean match)
              oMatchDepth = match;
         // If true, all buttons in the row will be sized to
         // the same width (assuming horizontal orientation)
         public void setMatchesComponentLengths(boolean match)
              oMatchLength = match;
         public void setSpacing(int spacing)
              oGap = Math.max(0, spacing);
         public int getSpacing()
              return oGap;
         ////// LayoutManager implementation //////
         public void addLayoutComponent(String name, Component comp) { }
         public void removeLayoutComponent(Component comp) { }
         public Dimension minimumLayoutSize(Container parent)
              return preferredLayoutSize(parent);
         public Dimension preferredLayoutSize(Container parent)
              synchronized (parent.getTreeLock())
                   int orientation = getOrientation();
                   Component[] components = parent.getComponents();
                   int w = 0, h = 0;
                   int totalWidth = 0, totalHeight = 0;
                   int maxW = getMaxPrefWidth(components);
                   int maxH = getMaxPrefHeight(components);
                   Dimension ps = null;
                   if (orientation == HORIZONTAL)
                        for (int i=0; i < components.length; i++)
                             ps = components.getPreferredSize();
                             if (oMatchLength) w = maxW;
                             else w = ps.width;
                             if (oMatchDepth) h = maxH;
                             else h = ps.height;
                             if (components[i] instanceof JSeparator)
                                  w = ps.width;
                                  h = 0;
                             totalWidth += w;
                             if (i < components.length - 1)
                                       totalWidth += oGap;
                             totalHeight = Math.max(totalHeight, h);
                   else
                        for (int i=0; i < components.length; i++)
                             ps = components[i].getPreferredSize();
                             if (oMatchDepth) w = maxW;
                             else w = ps.width;
                             if (oMatchLength) h = maxH;
                             else h = ps.height;
                             if (components[i] instanceof JSeparator)
                                  w = 0;
                                  h = ps.height;
                             totalHeight += h;
                             if (i < components.length - 1)
                                       totalHeight += oGap;
                             totalWidth = Math.max(totalWidth, w);
                   Insets in = parent.getInsets();
                   totalWidth += in.left + in.right;
                   totalHeight += in.top + in.bottom;
                   return new Dimension(totalWidth, totalHeight);
         public void layoutContainer(Container parent)
              synchronized (parent.getTreeLock())
                   int orientation = getOrientation();
                   Component[] components = parent.getComponents();
                   Insets in = parent.getInsets();
                   int x = in.left, y = in.top;
                   int w = 0, h = 0, maxW = 0, maxH = 0;
                   Dimension ps = null;
                   if (orientation == HORIZONTAL)
                        maxW = getMaxPrefWidth(components);
                        maxH = Math.max( getMaxPrefHeight(components),
                             parent.getHeight() - in.top - in.bottom );
                        for (int i=0; i < components.length; i++)
                             ps = components[i].getPreferredSize();
                             if (oMatchLength) w = maxW;
                             else w = ps.width;
                             if (oMatchDepth) h = maxH;
                             else h = ps.height;
                             if (components[i] instanceof JSeparator)
                                  w = ps.width;
                                  h = maxH;
                             components[i].setBounds(
                                  x, y + (maxH-h)/2, w, h);
                             x += w + oGap;
                   else
                        maxH = getMaxPrefHeight(components);
                        maxW = Math.max( getMaxPrefWidth(components),
                             parent.getWidth() - in.left - in.right );
                        for (int i=0; i < components.length; i++)
                             ps = components[i].getPreferredSize();
                             if (oMatchDepth) w = maxW;
                             else w = ps.width;
                             if (oMatchLength) h = maxH;
                             else h = ps.height;
                             if (components[i] instanceof JSeparator)
                                  w = maxW;
                                  h = ps.height;
                             components[i].setBounds(
                                  x + (maxW-w)/2, y, w, h);
                             y += h + oGap;
         //// private methods ////
         private int getOrientation()
              if (oToolBar != null) return oToolBar.getOrientation();
              else return HORIZONTAL;
         private int getMaxPrefWidth(Component[] components)
              int maxWidth = 0;
              int componentWidth = 0;
              Dimension d = null;
              for (int i=0; i < components.length; i++)
                   d = components[i].getPreferredSize();
                   componentWidth = d.width;
                   if (components[i] instanceof JSeparator)
                        componentWidth = Math.min(d.width, d.height);
                   maxWidth = Math.max(maxWidth, componentWidth);
              return maxWidth;
         private int getMaxPrefHeight(Component[] components)
              int maxHeight = 0;
              int componentHeight = 0;
              Dimension d = null;
              for (int i=0; i < components.length; i++)
                   d = components[i].getPreferredSize();
                   componentHeight = d.height;
                   if (components[i] instanceof JSeparator)
                        componentHeight = Math.min(d.width, d.height);
                   else maxHeight = Math.max(maxHeight, componentHeight);
              return maxHeight;

  • Wrong default layout for a new customer

    Hi all,
    I hope somebody can share inputs with regards to this issue.
    I'm assigning a default layout to one customer group (layout1 for all Group1).  When this was done, a list of customer codes were included in the list and each were ticked from that list.
    Second layout called layout2 for the setting 'Set &as Default for all BPs (for Whom a Default Layout Has Not Been Assigned).
    Scenario:  A new customer code is created belonging to Group1.
    Issues: 
                a.  This new customer code does not automatically follow the setting on default layout which is layout1.  When the layout1 default setting was double  
                     checked, the new customer code was part of the list, but it was not ticked. 
                b.  When document was previewed, it uses the wrong layout2.
                c.   The user still has to update the layout1 default setting, ticking the tick box from the list for the new customer code, then clicking update in then
                      layout designer window.
    Question:  Is this a normal behaviour of the system?  I thought that setting it as default for certain customer group will be applicable even to newly created ones under that group.
    Regards,
    Cathy

    Hi,
    I am afraid that it is your SAP B1 version current behavior but you may check using demo database. What is your SAP B1 version anyway ? what is your database localization ?
    You may try the solution part from one of these notes below:
    993486  - 'Set as Default for All BPs' doesn't affect specific BP
    Version   5   Validity: 21.01.2011 - active
    Language   English (Master)
    Portuguese 
    Content:      Summary    |    Header Data    |    References    |    Validity 
    Symptom
    Specific printing template for Business Partner can not be changed in attempt to define printing template as a default template for all Business Partners.
      Cause
    Functionality description
      Solution
    In order to change a specific default printing template for Business Partner follow the steps below:
    1. Choose the required template and press on the 'Set as Default' button.
    2. Choose the 'Set as Default for Specified BP' and 'Set as Default for Current User' option.
    3. Uncheck the box near the BP name and press on the 'Update' button.
    4. Choose the required default template (new template) and press on the 'Set as Default' button.
    5. Choose the 'Set as Default for all BP' option.
      Other terms
    Print Layout Designer, Default Template, Set as Default for All Users,
    Set as Default for Current User, Set as Default for All BPs, Set as Default for Specific BP
            Header Data
    Released On
    24.02.2011 20:52:30   
    Release Status
    Released for Customer   
    Component
    SBO-GEN-PLD Print Layout Designer  
    Other Components
    SBO-SH-PLD-A2 Tips and tricks for building PLD templates
    Priority
      Recommendations/additional info   
    Category
      Consulting   
           References
    This document refers to:  SAP Business One Notes
    861088
    Cannot set a template as default for all users
    This document is referenced by:   SAP Business One Notes (1) 
      861088
      Cannot set a template as default for all users
           Validity
    Software Component
    Version
    SAP BUSINESS ONE
    2005 A
    2005 A SP01
    2005 B
    2007 A
    2007 B
    8.8
    2nd note:
      861088  - Cannot set a template as default for all users
    Version   4   Validity: 04.08.2009 - active
    Language   English 
    Content:      Summary    |    Header Data    |    References    |    Validity 
    Symptom
    When print previewing,the template used is not default template.
      Cause
    A template has been defined as default for all users, when previewing this it is not the template which has been set as default for document.
      Solution
    In order to change to a different default template for all users and all business partners please do the following:
    a) "Set as default for specified Business Partner" and "set as default for current user"
    b) Add tick for this Business Partner
    c) Update by ticking again the specific Business Partner
    d) Change set as default for all users and all Business Partner's
      Other terms
    Print Layout Designer, Default Template, All users, Set as Default template, SAP Business One
            Header Data
    Released On
    04.08.2009 11:28:58   
    Release Status
    Released for Customer   
    Component
    SBO-GEN-PLD Print Layout Designer  
    Other Components
    SBO-SH-PLD-A1 Print Layout Designer known Issues
    Priority
      Recommendations/additional info   
    Category
      Consulting   
           References
    This document refers to:  SAP Business One Notes
    993486
    'Set as Default for All BPs' doesn't affect specific BP
    This document is referenced by:   SAP Business One Notes (1) 
      993486
      'Set as Default for All BPs' doesn't affect specific BP
           Validity
    Software Component
    Version
    SAP BUSINESS ONE
    2004 A
    2005 A
    2005 A SP01
    2005 B
    2007 A
    2007 B
    JM

  • How does one define a default style for a custom Flex component?

    How does one define a default style for a custom Flex component?
    hello
    I created a new set of Flex component library slib.swc (Flex 4.5). Would also like to have a default style. defaults.css file, making it the default style of the component library.
    Like flex the builder install directory of sdks \ 4.5.0 \ frameworks out \ libs directory has a spark.swc file, open with Winrar will see defaults.css this file. Defaults.css file defines the default style of the flex spark components.
    How can it be achieved?
    As follows
    slib.swc contains a CLabelEx components, and a defaults.css file
    defaults.css source file as follows:
    @ namespace s "library :/ / ns.adobe.com / flex / spark";
    @ namespace mx "library :/ / ns.adobe.com / flex / mx";
    @ namespace cn "http://os.slib.cn";
    cn | CLabelEx
            styBackgroundAlpha: 1;
            styBackgroundColor: # 569CC0;
            styBorderAlpha: 1;
            styBorderColor: # 569CC0;
            styBorderWeight: 1;
            styCornerRadius: 3;
    In slib.swc the application MyLabel.mxml of the source file as follows:
    <? xml version = "1.0" encoding = "utf-8"?>
    <s: Application, the 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 = "http://os.slib.cn
                               the minWidth = "955" The minHeight = "600">
            <fxeclarations>
            </ fxeclarations>
            <cn:CLabelEx x="67" y="112"/>
    </ s: Application>
    I hope CLabelEx default use cn | CLabelEx, style to display its appearance.
    I refer to above approach, but failed to achieve. Can you please re-Detailed
    Thanks!

    dj is right. Any Folder can be a picture folder.
    Create a root level folder and add it to your Pictures Library in Windows.  It will show up with all the scattered pictures from other programs. It can even be a different dirve if you like.  You  can even specify one to be the default save location for pictures in this dialog.
    Navigate to Pictures in your Libraries in Windows Explorer Right Click and select Properties.
    Message was edited by: Rikk Flohr forgot the instructions...

  • Custom JSF Component tags ignored after converting to Facelets layout

    I am currently using JDeveloper 10.1.3.3.
    I have a project consisting of .jspx pages. These pages mainly use components from ADF faces core. I also created my own custom JSF component that I use in several of these pages.
    Then, I needed to use Facelets so that I could apply a standard layout to all my .jspx pages. I looked at all the tutorials, and I created a layout.xhtml for my .jspx pages to use. This worked great for my .jspx pages that don't have my custom JSF component.
    Now, when I run my page with my custom component <img:newimage ...etc >
    the tag is ignored and it appears in the page's source as is when it should render as <img.src=...etc>. Attributes of newimage are changed on the page appropriately like width and height, but my component's tag, component, and servlet java files are never accessed.
    How can I fix this? Please help!
    Thanks.

    Hi,
    did you post this issue to the Facelets open source site ? Sounds like an issue with using Facelets
    Frank

  • Flex 4 custom component with children inserted directly into view stack

    I give up. Hopefully I am just missing something easy, but I feel like I am pulling teeth trying to get this to work. All I want is a custom 'wizard' component whose children are placed within a ViewStack and beneath the ViewStack there is a next and back button. Here are some code excerpts to illustrate my approach:
    WizardGroup.as:
    [SkinPart(required="true")]
    public var nextBt:Button = new Button();
    [SkinPart(required="true")]
    public var backBt:Button = new Button();
    [SkinPart(required="true")]
    public var stack:ViewStackSpark = new ViewStackSpark();
    WizardGroupSkin.mxml:
    <s:VGroup width="100%" height="100%"
              paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10">
         <container:ViewStackSpark id="stack" width="100%" height="100%">
              <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0"/>
         </container:ViewStackSpark>
         <s:HGroup horizontalAlign="right" width="100%">
              <s:Button id="nextBt" label="Next" enabled="{hostComponent.permitNext}" enabled.last="false"/>
              <s:Button id="backBt" label="Back" enabled="{hostComponent.permitBack}" enabled.first="false"/>
         </s:HGroup>
    </s:VGroup>
    While this comes very close to working, the major problem is that the children of the WizardGroup component are not added as children of the viewstack. Instead, they are added as children of the contentGroup. So the viewstack will always only have one child: contentGroup.
    I also tried the approach of binding the contents of the view stack to the children of contentGroup, but with Spark containers, there is no way to access an array of children or array of elements (ie, there is no contentGroup.getChildren() or contentGroup.getElements()).  Finally, I tried making the id of the ViewStackSpark "contentGroup" but since the ViewStackSpark inherits from BorderContainer, Flex complains at runtime that it can't cast the BorderContainer to Group.
    Help would be greatly appreciated.
    Thanks everyone.
    Josh

    I finally figured it out. The trick is to set the default property of the WizardGroup to a public member array I am calling "content"
    [DefaultProperty("content")]
    public class WizardGroup extends TitleWindow
        [SkinPart(required="true")]
        public var nextBt:Button = new Button();
        [SkinPart(required="true")]
        public var backBt:Button = new Button();
        [Bindable]
        public var content:Array;
    And then within the skin, bind the content of the viewstack to the hostComponent's content array:
            <s:VGroup width="100%" height="100%"
                      paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10">
                <container:ViewStackSpark id="stack" width="100%" height="100%" content="{hostComponent.content}"/>
                <s:HGroup horizontalAlign="right" width="100%">
                    <s:Button id="nextBt" label="Next" enabled="{hostComponent.permitNext}" enabled.last="false"/>
                    <s:Button id="backBt" label="Back" enabled="{hostComponent.permitBack}" enabled.first="false"/>
                </s:HGroup>
            </s:VGroup>

  • Problem to set the custom layout as the default layout in std. transaction

    Hi all,
    I want to change the standard layout that is displayed in a standard transaction (EL31) as default. I want few more fields of the structure also to be displayed in the default layout of the standard transaction. I have made a custom layout that i want to be displayed but cant make that layout as the default layout for all users. Please suggest me some way to make the custom layout as the default layout for a standard transaction.

  • Custom component with additional tags

    Hi. I need to write complicated custom JSF component.
    I know how to write simple custom components, and receive String variables from tag attributes e.g.
    https://github.com/devalentino/temp/blob/master/src/main/java/net/monopolyclub/components/component/UserData.java
    But now I need to write custom component with additional tags (for example like dataTable and column tags).
    How can I write such component? How can I receive collections in my component? How can I work with additional tags in my component.
    for example I need something like:
    <m:chat>
         <m:tab value="#{UserList}" />
         <m:message value="#{MesageMap}" />
    </m:chat>
    where UserList - Collection with current users and MessageMap is Map with User as key and message as value.

    Iam using pt:ptdata.joincurrcommunitydata
    here is some code
    <pt:ptdata.joincurrcommunitydata pt:id="menutabsjoin" />
    <pt:logic.foreach pt:var="temp2" pt:data="menutabsjoin">
    <span class="CommunityPage">
    <pt:core.html href="$temp2.url" pt:tag="a">
    <pt:core.html pt:tag="img" src="$temp2.img" alt="$temp2.title" border="0" align="absmiddle" height="$temp2.imgheight"      width="$temp2.imgwidth" />
                        <pt:logic.value pt:value="$temp2.title" />
                             </pt:core.html>
                             </span>
                             </pt:logic.foreach>
    But the URL that is generated is not having the CommunityID, hence it errors out saying object not found.
    Any help would be appreciated?
    Thanks
    kartik

  • JSF-Custom Component with EventHandling

    Dear All,
    I wanted to write my own component with event handling.
    This is my requirement:
    In my JSP, I'll put my cusom component tag for displaying 10 records and with prev and next buttons. after clicking prev button, i should get previouse 10 records and if i click next button, i should get next 10 records.
    so, my component should render
    1. 10 records
    2. Prev button
    3. Next button.
    After clicking prev button it should render previouse 10 records and also prev and next button.
    I do not know whether it is possible with JSF or not and also i'm not finding any example which explaining above situation.
    My jsp should contain only my custom tag like
    <mine:listRecords/>
    Tag Handler of listRecords tag should render 10 records and prev and also next button. After clicking prev, i should get 10 previouse records and and both the buttons and so on.
    advanced thanks,
    ram

    It is certainly possible to write a component that embeds its own navigation and paging as you describe. On the other hand, you can also assemble this kind of functionality out of a combination of the existing simple components. The "repeater" example illustrates exactly the kind of application you are talking about (and the same techniques will work fine with the standard <h:dataTable> component as well).
    Craig

  • Remove component from JFrame with absolute layout

    I have a JFrame and JPanel inside the JFrame with absolute layout. I wanted to have a button when clicked the JPanel will be removed. I called jFrame.remove(jPanel);
    jFrame.repaint();
    jFrame.validate();
    I can't call jFrame.revalidate(), since JFrame doesn't provide revalidate() method. I try everything, but I can't get that JPanel removed. Could somebody help me please. Oh I tried jPanel.setBounds( 0,0,0,0); and the jPanel is disappeared, but I don't think this is the right solution. Is my problem with the absolute layout?
    Thanks

    public class MainGame
         public void game()
              GridBagLayout gridBagLayout = new GridBagLayout();
              GridBagConstraints constraints = new GridBagConstraints();
              final MainFrame mainFrame = new MainFrame();
              mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              mainFrame.setLayout( gridBagLayout );
              JPanel mainGamePanel = new JPanel();
              mainGamePanel.setLayout( new BorderLayout() );
              mainGamePanel.setBackground( Color.black );
              final Room mainEntrance = new Room( "at the main entrance of the deep forest" );
              mainEntrance.setBackground( Color.white );
              mainEntrance.setLayout( null );
              mainEntrance.setExit( Direction.UP, null );
              mainGamePanel.add( mainEntrance, BorderLayout.CENTER );
    //          c.fill = GridBagConstraints.CENTER;
              constraints.ipady = 800;      //make this component tall
              constraints.ipadx = 600;
              constraints.anchor = GridBagConstraints.WEST;
              constraints.gridx = 0;
              constraints.gridy = 0;
              gridBagLayout.setConstraints( mainGamePanel, constraints );
              mainFrame.getContentPane().add( mainGamePanel );
              thePlayer = new Human( "Cloud" , "The player" );
              thePlayer.setMaximumWeight( MAXIMUM_WEIGHT );
              thePlayer.setImage( Constants.CHARACTER_FRONT );
              thePlayer.setBounds(0 , 0, 40, 30 );
              thePlayer.setBorder( BorderFactory.createLineBorder( Color.black ) );
              mainEntrance.add( thePlayer );
              apple = new EdibleItem( "apple" , "Give more 10 HP" );
              apple.setHp( 100 );
              apple.setImage( Constants.APPLE );
              apple.setBounds( 40, 0, 40, 30 );
              apple.setBorder( BorderFactory.createLineBorder( Color.black ) );
              mainEntrance.add( apple );
              thePlayer.addItem( apple );
              apple1 = new JPanelWithBackground();
              apple1.setImage( Constants.APPLE );
              apple1.setBounds( 80, 60, 40, 30 );
              apple1.setBorder( BorderFactory.createLineBorder( Color.black ) );
              mainEntrance.add( apple1 );
    //          final Room forest = new Room( "at the main entrance of the deep forest" );
    //          forest.setBounds( 0, 0, 800, 600 );
    //          forest.setBackground( Color.white );
    //          forest.setLayout( null );
    //          forest.setExit( Direction.UP, null );
    //          // Add to list
              listOfItems.add( apple );
              listOfItems.add( apple1 );
               * Main Control Panel to control character and actions
              JPanel controlPanel = new JPanel();
              controlPanel.setBackground( Color.black );
              controlPanel.setBounds( 1000, 0, 600, 600 );
              controlPanel.setLayout( new GridLayout( 0, 1 ) );
              JButton eatButton = new JButton( "EAT" );
              // Set this button to setFocusable(false) to prevent this button being focused
              // So the focus will stay at JFrame
              eatButton.setFocusable( false );
              eatButton.addActionListener( new ActionListener()
                   @Override
                   public void actionPerformed(ActionEvent e)
                        JPanelWithBackground currentObject = mainGame.getFacingObject();
                        if( currentObject instanceof EdibleItem )
                             //EdibleItem apple = ( EdibleItem )currentObject;
              controlPanel.add( eatButton );
              JButton attackButton = new JButton( "ATTACK" );
              attackButton.setFocusable( false );
              attackButton.addActionListener( new ActionListener()
                   @Override
                   public void actionPerformed(ActionEvent e)
                        System.out.println( "Remove" );
                        mainFrame.getContentPane().remove( mainEntrance );
                        mainEntrance.setBounds( 0,0,0,0);
    //                    mainFrame.add( forest );
                        mainFrame.validate();
                        mainFrame.repaint();
              controlPanel.add( attackButton );
              mainFrame.setVisible( true );
              mainFrame.requestFocusInWindow();
    }I know that my code is a mess, because it is connected with many classes and the quality of the format is not very good. But I will refactor it later when I solved the problem.
    The problem is I have a JPanel with a character and an apple in it. I could not use any other layout, I have to use absolute layout, because I the user can control the character but arrow keys. And the character moves in pixels.
    Here what I wanted to do.
    final Room mainEntrance = new Room( "at the main entrance of the deep forest" );
              mainEntrance.setBackground( Color.white );
              mainEntrance.setLayout( null );
              mainEntrance.setExit( Direction.UP, null );Room extends JPanel, I wanted to delete this panel when I clicked this button
              JButton attackButton = new JButton( "ATTACK" );
              attackButton.setFocusable( false );
              attackButton.addActionListener( new ActionListener()
                   @Override
                   public void actionPerformed(ActionEvent e)
                        System.out.println( "Remove" );
                        mainFrame.getContentPane().remove( mainEntrance );
                        mainEntrance.setBounds( 0,0,0,0);
    //                    mainFrame.add( forest );
                        mainFrame.validate();
                        mainFrame.repaint();
              controlPanel.add( attackButton );Like I said before, I tried validate, repaint and setBounds to all 0s. Nothing happened with the Room class. How do I delete that Room.
    Thank you so much.

  • Problem integrating own javascripts in a Custom build component

    Hi all,
    I have created an own component and included in the IC WebClient (CRM 2007). The component contains a view with a custom layout implemented directly in the related *.htm page in the respective BSP Application.
    This works great if I just add standard htmlb / thtmlb /... BSP Extensions to this view. But if I try to include javascript into this view things don't work any more. Especially if I try to include scripts loaded from an external file via the script... src= tag.
    This should normally be done in the header of an html page but I am not able to access the real header of the rendered html page in the component's view. So my question is: Are there any BSP Extensions or special tags I could use to integrate own scripts?
    The problem is that the javascript running quite perfect in a standalone BSP Application does not work properly inside the IC WebClient Component with strange JavaScript errors or no errors at all.
    Any help would be greatly appreciated.
    Many thanks.
    Jochen

    Hello Jochen,
    JS in the webclient is possible. SAP does make extensive use of this scripting language.
    If your scripts are important on a global scale you can include them in SCRIPTS.JS of BSP application THTMLB_SCRIPTS.
    I do not know why your scripts on the page do not work. Usually they should when you include them directly in the page. Have a look at component GS_CM in page DocTree.htm. Make sure they do not interfere with all the stuff SAP has put in there.
    My JS coding in WebClient has been limited to two simple functions. This worked fine when put directly on the page.
    cheers Carsten

Maybe you are looking for

  • Oracle 9iAS Orion Server Crashes on Running RWSERVLET

    We are developing a product with JSP as front end,EJB as middle tier and Oracle as DB.Oracle 9iAS is the deployment environment.We are using the RWSERVLET configuration. We have configured Orion to communicate with RWSERVLET.Rwservlet copied to web-i

  • Solaris 8: Error "access exceeded protections" - SEGV

    Hello: I getting this error " access exceeded protections" - SEGV, when I am doing a memset. The structure which is being memset is of 2M size. Code Snipets: abc_t abc; memset((char*)&abc, '\0', sizeof(abc_t)); The abc_t struct consists of many varia

  • Opposite of Previous function in webi 4.0

    Hi All, I have to compare current cell value to next cell value in webi report to fulfill one the requirements. Any Suggestions. Thanks Arvind Shukla

  • Using spry datasets with Googlemaps

    I am using googlemaps with XML as the data source. I want to have a spry data grid under my map that shows all of the map points. I am already parsing the map point's XML into a javascript array. Is it possible to use this array to populate a spry da

  • Need help with PreparedStatement...

    I have a Java aplication connected witn my hsqldb. So the Java aplication is a screen in wich the user can click on buttons and insert, delete, edit, search, data on the database. For example, I trying to use PreparedStatement for use with INSERT INT