Two components in one cell

I have a situation where I need to display two textboxes in one cell (no, a text area will not do). I was wondering if anyone knew how to do this? Also, at what time would you set the data and would you do it with the TableModel. I posted a question similar to this and the only response I got was I should be able to do this by extending the renderer and editor classes. I have tried.
I need this example to show data in one line item so the I do not have to scroll to the right so much. It will also give me more real estate on the screen to show other important data.
Should I embed a JPanel in the cell and associate text boxes inside? What should I do? I know there are some vary savy programmers who can whip up a simple example. I appreciate any help.

I don't think I can solve your problem, but may be I can help you on your way...
check out
http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
for some good examples of table use and other swing components.
Adding a panel could be an option, but I'm not sure why you say you couldn't do it with a TextArea... I'll give it a try myself and show you some code if it works..
-Phil

Similar Messages

  • How to add two lines in one cell in smartforms

    Hi All,
    can anyone help me to implement the following format in smartforms?
    i have create one line type in table, one of the cell in the line type need to split two small line, the upper line is summary and the lower line still split into three small cell. how can i do?
    ?|????|___sum____|
    ?|????|aaa|bbb|cccc|
    Edited by: wei fang on Oct 21, 2008 2:19 PM

    Hi Wei Fang,
    You can try by creating a 2 line template (1 Template, 2 linetype) under a loop note.
    So your smartform tree structure will be shown like this:
    LOOP
        TEMPLATE1.
    On the LOOP part, pass the internal table of your data to the working areas.
    On the template put all the data of the summary on your first linetype, and put
    the detail data on your second linetype.
    Good luck and hopefully this will solve the problem
    Edited by: Prawira Fadjar on Oct 22, 2008 10:04 AM

  • Two components per cell on a web dynpro table

    Hi all,
    I've been working with SAP Netweaver JAVA Stack. Now i'm trying to display two components on a cell of a table, but i can't...
    I've been looking to CellVariants, but that only allows me to display another type of component (always one) on a certain condition.
    What i want is to display on the same cell a Textview and a InputLink for all the rows.
    I've tried to add a Panel to the TableCellEditor, hoping i can next add a textview and a inputlink to the panel, but that isn't allowed.
    How can i add the components at the same time on the same cell?
    Can anybody help me?

    Please don't give up, there's hope
    Context
    + Items (node, c=0:n, s=0:n)
      + CategoryData (node, c=0:1, s= 0:1, singleton=false)
         + categoryName (string)
      + ProjectData (node, c=0:1, s=0:1, singleton=false)
         + projectName (string)
      + StandByData (node, c=0:1, s=0:1, singleton=false)
         + standByName (string)
      + TaskData (node, c=0:1, s=0:1, singleton=false)
         + taskName (string)
      + Children (recursion -> Items)
      + childrenLoaded (boolean)
      + expanded (boolean)
      + isLeaf (boolean)
      + type(string)
    The type can have the values "ProjectCategory", "TaskCategory", "StandByCategory", "Project", "Task", "StandBy". This context structure gives you the tree hierarchy and for each type of node you can store different type-specific data. The "CategoryData" represents the data for the top level which shows the categories "Products", .... The meaning of the other subnodes should be clear.
    The UI element hierarchy looks like this:
    Table (dataSource = Items)
      + TreeByNestingTableColumn
        (childrenLoaded = Items/@childrenLoaded, expanded = Items/@expanded, isLeaf = Items/@isLeaf)
        + Caption (text = Items/CategoryData/@categoryName)
      + NameColumn (selectedCellVariant = Items/@type)
         + TextView (standard cell editor, not used)
      + ProjectNameEditor (CellVariant, variantKey = "Project")
         + TextView (text = Items/ProjectData/@projectName)
      + TaskNameEditor (CellVariant, variantKey = "Task")
         + InputField (value= Items/TaskData/@taskName)
      + StandByNameEditor (CellVariant, variantKey = "StandBy")
         + InputField (value= Items/StandByData/@standByName, readOnly=true)
    To be continued...

  • Event Listening across two components?

    Let's say I have two components. One of them has a button.
    The other will post an Alert once it detects that the button has
    been pressed.
    How can the Alert component detect the button press of the
    other component? I figured an eventListener would been needed, but
    I am not sure how to write it.

    Something like that might work, but from a programming
    standpoint, your components should be designed in such a way that
    they know absolutely nothing about the outside world (parent or
    other components). For all it knows, it's the only component in
    existence. But, using events, he could send out a message (event),
    that if someone else (another component) happened to hear it, they
    could do something in response to it. Think of the movie "Contact"
    (if you've ever seen it).
    Anyway, your best bet is to make a custom event that is able
    to encapsulate an ArrayCollection. Then when the button is clicked,
    you wrap up the AC in the event and send it out. Your other
    component will be listening for events that are of that type (your
    custom event). Then he can unwrap the AC in it and use it. If you
    do not know how to create custom events and/or send data in events,
    look up a tutorial on it. It's not that difficult to implement if
    you can follow the concept I just talked about. However, I've also
    personally tried to make a custom event to pass an ArrayCollection,
    and for some reason it never worked (even though I followed some
    tutorials down to the letter).

  • Display two fields in one single cell in a BEx report.

    In a BEx 7 query, we need to display 'First name' and 'Last name' in one cell/column called "Name". The 'First name' and 'Last name' are two different info objects in the multiprovider on which the query is built. These are navigational attributes for Char - Employee. The entire flow is in 7.0 version.
    Any pointers to how this can be done in the query designer?
    Thanks.

    Hi,
    Follow the following steps:
    1. Create a Variable and in General Tab Set Processing By As Customer Exit.
    2. Now go to CMOD & Write the following code doing some custom changes specific to your requirement:
    WHEN "Variable Name"
    "Here you can write a code to select the value from Infocube table and Loop it in a work area"    
    Loop it_tab INTO wa
         concatenate S_date  s_tstmp into s_val_new separated by space.
          l_s_range-low = s_val_new.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
    END LOOP
    Note: l_s_range is a structure and holds a single line whereas E_T_range stands for internal table and have multiple values . in customer exit (used for variable ) holds the derived value for the variable .
    You can go to query and there u can drag this Characteristic on which you created this custom exit variable

  • How to set two different UIE in one cell in ALV table

    Hi all,
    I have a hierachy ALV table. For some reason I want to have two UI elements in one column. For example, the text and a menu next to the text. Is it possiable to do that?
    best regards,
    Wenwen

    Hi,
    thank you for your answer. Yes, now I also find the class CL_SALV_WD_MULTI_CELL_EDITOR which could be used to set different UIE in one cell. But it is quite limited, just the following UIE could be used
    - LinkToAction 
    - LinkToURL    
    - FileDownload 
    - Button       
    - ToggleButton 
    best regards,
    Wenwen

  • Numbers: two sets of numeric data in one cell. Delete, clear all deletes one set only. Cell is not "locked"  Ideas?

    Numbers: two sets of numeric data in one cell. Delete, clear all deletes one set only. Cell is not "locked"  Ideas?

    You will really need to explain in a little more detail what you mean by "two sets of numeric data in one cell".
    Also, is this Numbers for OS X? You are in the iOS forum.

  • How to merge two WD components in one WD application?

    Hi SDN,
    Can any one tell me How to merge two WD components in one WD application?
    suppose i have two WD componets z_comp1 & z_comp2 now i want to use both these components in one WD application.
    Regards,
    Rahul.

    hi rahul...........
              you can use any number of wd components into one component.
    eg:
            consider you are having 2 components 'A' and component 'B' and you want to embed both into component 'C'.
           You can just click the 'Create' icon which will be present in the properties tab of the component controller.
           you mention the name of bothe components 'A' and 'B'.
            So now the interface controller of both the components are created in component 'C'.
           Now you can use the views present in both the components in component'C'.
    --regards,
      alex b justin

  • How to color more than one cell in an ALV line ???

    Hi SDN community,
    I have the following problem:
    I display an internal table with the 'REUSE_ALV_GRID_DISPLAY' function and want to color two cells, not only one cell.
    Coloring one cell is no problem with...
    cell_color1 TYPE lvc_t_scol, " cell color
    DATA  gs_cellcolor    TYPE          lvc_s_scol. " to color a cell
    gs_cellcolor-fname = 'TNAME'.
    gs_cellcolor-color-col = '6'.
    gs_cellcolor-color-int = '1'.
    gs_cellcolor-color-inv = '0'.
    LOOP AT it_result.
      IF it_result-trend EQ 'fast-growing'.
        APPEND gs_cellcolor TO it_result-cell_color1.
        IF sy-subrc EQ 0.
          MODIFY it_result.
        ENDIF.
      ENDIF.
    ENDLOOP.
    and
    ls_layout-coltab_fieldname = 'CELL_COLOR1'.
    , the last one is in the layout building form.
    My problem is that in
    ls_layout-coltab_fieldname = 'CELL_COLOR1'.
    , I can only type in ONE fieldname, but I would like to color more than one field/cell, you got my problem?
    Thank you very much,
    Marius

    I'm pretty sure that the color would be controlled by what records are appended to the CELL_COLOR1 table inside IT_RESULT. . So move the code inside the IF statement, and add addition logic.
    LOOP AT it_result.
      IF it_result-trend EQ 'fast-growing'.
       gs_cellcolor-fname = 'TNAME'.
       gs_cellcolor-color-col = '6'.
       gs_cellcolor-color-int = '1'.
       gs_cellcolor-color-inv = '0'.
        APPEND gs_cellcolor TO it_result-cell_color1.
        IF sy-subrc EQ 0.
          MODIFY it_result.
        ENDIF.
    else.
       gs_cellcolor-fname = 'OTHER_FIELD'.
       gs_cellcolor-color-col = '5'.
       gs_cellcolor-color-int = '1'.
       gs_cellcolor-color-inv = '0'.
        APPEND gs_cellcolor TO it_result-cell_color1.
        IF sy-subrc EQ 0.
          MODIFY it_result.
        ENDIF.
      ENDIF.
    ENDLOOP.
    Regards,
    Rich Heilman

  • Compare text in one cell to a range of cells, get interger count of values

    Hi there,
    Basically what I'd like to do is, as a value in one cell, compare the text in a second cell to a range of third cells, and get a count of "hits".
    EXACT(second,third) will compare two cells, return a boolean. How do I batch run EXACT, and force boolean values into integers.
    Conceptually:
    For each J2:J14;$X=$X+INT(EXACT(B2,$_);return $X
    Can this be done in Numbers?

    Nevermind; the following works:
    =COUNTIF(($J2:$J14),B1)

  • Combining two messages into one

    Hello,
    I have a mapping issue, I have a business process in which I have to combine two messages into one.
    To do so, I have defined a message mapping in which there are two source message types, and one target message type.
    When testing the message mapping in the IR, it works fine, but when I define and test an interface mapping with that same message mapping, I receive this error message:
    "Cannot produce target element /ns0:Messages/ns0Message1/MY_IDOC_TYPE/MY_SEGMENT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd."
    What am I doing wrong ?
    How am I supposed to combine two messages into one ?
    Thanks,
    Elad.

    Hi Elad,
    Just see if you have included both you source message interfaces and one target nessage interface correctly in while doing your interface mapping.....
    The most common mistake made when we do scenarios which include combination of two source message types into one target type are:
    - we forget to include both the source message interfaces.
    - or we interchange between one of the source message interface with the target.
    Just see if either of the 2 is aplicable in your case and just activate all components as and when you create them..
    Regards,
    abhy

  • Skin two components differently, based on styleClass

    Hi. I'm doing some skinning of my ADF 11g app, and I'm having some trouble using the ADF selectors to achieve exactly what I want. Applying style rules that affect all components of a given type is working brilliantly with the various ADF selectors, however I'm having trouble when I need to style one component in one way, and another component (of the same type) a different way.
    Imagine I have two af:panelBox components. One I want skinned with red header (and rounded corners), the other I want skinned with green header (and rounded corners). If I apply styleClass values to the panelBox tags like MyGreenBox and MyRedBox, how do I then use these classes to achieve what I need?
    I know I can attach a class to the panelBox selector like:
    af|panelBox.MyRedBox
    However for the corners I need to use a selector like:
    af|panelBox::header-start
    So naturally, I tried:
    af|panelBox::header-start.MyRedBox
    but this doesn't seem to work :(
    As far as I can tell, the MyRedBox/MyGreenBox class that I set in the styleClass property only gets set (in the output html) on the very top-most div of the component. Knowing that, I'm not sure whether the styleClass value is really of use here at all. Should I be differentiating using the component Id?

    Doh! Got it now:
    af|panelBox.MyRedBox::header-start
    Thanks Lucas Jellema:
    [http://technology.amis.nl/blog/5722/using-adf-faces-11g-skinning-for-setting-the-styles-of-specific-component-instances-or-groups-of-instances]
    :)

  • Can Partial Trigger Work between Two Components Which Are in Two Pages?

    Scenario: Some output text components in page one while a SelectOneChoice and a InlineFrame are in page two. At first the resource attribute of inlineFrame was set to point to page one. When changing the value of SelectOneChoice, the values of those output text will be expected to change accordingly. I tried to make SelectOneChoice to be the trigger of those output text components, but found that SelectOneChoice can't be seen when attempt to edit the value of PartialTrigger attribute of those output text components. Then I tried to set the ID of SelectOneChoice as the value of the InlineFrame component, but failed getting the wanted result again.
    Problem: How to get a partial refreshing effect between two components that are in two different pages? Can partial trigger work in this scenario?
    Thanks for your interest!

    Hi,
    Sorry, you can't achieve that the way you're doing it. If you're using 11g, however, you could do that using regions.
    Regards,
    ~ Simon

  • Commmunication Between two Components

    Hi ,
    I am developing a project of having two components in it.  I want to communicate each component with other one. Both components should be communicating with each other.
    I am able to communicate from Component one to Component two . But !  unable to do the same from Component Two to Component one.  It shows the following error.
    Component ComponentOne: Cycle in component usage definitions: ComponentTwo
    Regards,
    Jyothi.

    Hallo Jyothi,
    Parent2Child-component-communication: apply interface method invocation (parent component with component usage relation to child component invokes interface controller method of child component --> IExternal-API)
    Child2Parent-component-communication: apply interface eventing (child component exposes interface controller event, child component defines NO cyclic component usage dependency to parent component, parent component subscribes own event handler to event of child component's interface controller, child component fires interface controller event at runtime and can also pass object references as event parameters).
    For data transfer across component borders apply interface-context-mapping
    1) exernal context mapping: data context in parent component, child component externally maps its interface context to it.
    2) interface context mapping: data context in child component, parent component maps own context to interface context of used child component.
    Regards, Bertram

  • Two components do PublishedStaticFiles over the same file, who wins?

    Hi,
    I use UCM 11G PS4.
    Does anyone knows how PublishedStaticFiles is working, I know it publish
    resources into the weblayout/resources/wcm/custom.
    But does anyone knows what happens if two components try to publish same file?
    I will expect that Content Server to merge the 2 published files into one
    depending by loadOrder.
    Can anyone tell me what is the difference between PublishedStaticFiles and PublishedWeblayoutFiles?
    Regards,
    Cipi

    The PublishedStaticFiles and PublishedWeblayoutFiles tables are essentially the same thing, in that they both define where to publish in the Weblayout folder/directory. However, PublishedStaticFiles is used to publish static items like images, while PublishedWeblayoutFiles is generally used to publish dynamic items like layouts. When you're in the config manager, the "Publish static layout files" and "Publish dynamic layout files" publish those tables, respectively. A brief overview can be read on Kyle's post.
    As far as merging published files, no, that is not possible. The Content Server publishes all component files, but if any have the same file name, the component with the bigger (higher) loadOrder will "win" and its file will override the other.
    For instance, in the .hda file of the component you want to be loaded, you'll have:
    @ResultSet MergeRules
    4
    fromTable
    toTable
    column
    loadOrder
    SSOPublishedStaticFiles <-- your table that defines where in the weblayout directory you want to publish your files to
    PublishedStaticFiles
    null
    500 <--loadOrder (set the value to something big like 500)

Maybe you are looking for

  • How to install a new jdbc driver and get it in a list to select.

    I have placed the driver in the directory with the rest of the drivers. and followed the instructions below. The HUGE missing part is typing in the driver name. WHERE? I there isn't a field that I can edit to add the name. The URL and connection stri

  • Showing image from database

    Hi, can anyone tell/give me an example/tutorial of how to retrieve the image from the database into forms? so i have a table names EMPLOYEES for example, and i added a clob type column, named "photo". in forms, when i show the informations for each p

  • Dump when run J2I5 - Excise Registers Extraction

    Hi, When we run the J2I5 - Excise Registers Extraction (with Register RG23D), it is giving the run time error  The ABAP/4 Open SQL array insert results in duplicate database records. This error is showing after 04.08.2009 to till date..But before til

  • Screen exit for Transaction  /SAPAPO/SNP02

    Hello Everybody, Is there any screen exit available for the transaction /SAPAPO/SNP02? Many thanks in advance. Best Regards, Rahul Malani

  • Filtering ETW Events

    Is there any way to filter ETW Event callbacks? I am getting all of the events I need by starting a trace with a keyword; unfortunately some keywords enable many many event ids (for example, FILEIO keyword for Microsoft-Windows-Kernel-File provider g