Component Creation - how to work the VALUE property

Hey all,
Have an 80% working component to solve one of my problems (reference http://swforum.sun.com/jive/thread.jspa?threadID=53379&tstart=30, yeah not much there ;-).
*Taglib class
*TLD
*Component class
*faces-config.xml
*Renderer
DT:
*sun-faces-config.xml
*BeanInfoBase classes generated with Rave tools.
Now, my problem is I want to pass the value/data from one object to my object (bind the data). I'm not having much success with this one piece. Can anyone point me to an example or show an example of how to pass **value** property in such a way that the data from, say a textbox, can be shown all the way through to the Renderer?
A full example would be best, I've added the value attribute into the TLD, and is-bindable in the sun-faces-config, and various coding attempts but still missing some pieces.
p.s. yes, I've examined the calendar example, the datedisplayer/datepicker example, and half a dozen other ones...still looking :-)
thanks!
-D

In case I'm not making it clear:
Creating a custom component. I want to bind to a database field, a bean field, or to another JSF component the data. The only way I have found to 'bind' is through the value property located in Java Studio Creator (i.e., you click on the ... or the arrow beside 'value' for the object, and you can select what you want to bind).
How does one take that 'value' bound information and show the real value in the Renderer class?
example:
Bind custom-object 'value property' to an HtmlTextInputBox that has the value "This is a test".
Render "this is a test" or whatever is entered in the text box to the webpage with the custom-object.
Bind custom-object 'value property' to a Sessionbean property called 'myNum'.
Render the value of 'myNum' to the webpage with the custom-object.
Bind custom-object 'value property' to the field 'mydbdata' in a database.
Render the value of mydbdata to the webpage with the custom-object.
USECASE:
Starting with the tld, how does one accomplish this 'complex' feat?
*TLD
*Taglib class
*faces-config.xml
*component class
*renderer class
so the end result is:
RENDERER:
encodeEnd(....
writer.write("my bound value is: " + howtogettheboundvalue);
...

Similar Messages

  • I'm using referential costraints in table creation.how to insert the value

    Hi,
    This is the table Script.
    CREATE TABLE Trn_Invest_DividendSU(
              DividendSU_ID               NUMBER(10)     DEFAULT 0,     
                   DividendSU_LedgerType     CHAR(1)          DEFAULT ' ',
                   DividendSU_EntryDate          DATE,     
                   DividendSU_SU_Code          VARCHAR2(20)     DEFAULT ' ',     
                   Scheme_Code           VARCHAR2(20) References Mst_Invest_Scheme(Scheme_Code),
                   Share_Code           VARCHAR2(20) References Mst_Invest_Share(Share_Code),
                   DividendSU_SchemeTypeID     NUMBER(4)     DEFAULT 0,
                   InvstMaster_ID          NUMBER(4)     DEFAULT 0,
                   DividendSU_DividentDate     DATE,     
                   DividendSU_EligibleSU          NUMBER(10,5)     DEFAULT 0,
                   DividendSU_NoSUTobe     NUMBER(10,5)     DEFAULT 0,
                   DividendSU_AverageSU     NUMBER(10,5)     DEFAULT 0,
                   DividendSU_Narration          VARCHAR2(300)     DEFAULT ' ',     
                   DividendSU_BRVDate          DATE,     
                   DividendSU_DividendSU     NUMBER(5,4)     DEFAULT 0,
                   DividendSU_MJVStatus     CHAR(1)          DEFAULT ' ',
                   DividendSU_TotalDividend     NUMBER(5,4)     DEFAULT 0,
                   SalSU_Brokerage          NUMBER(3,2)     DEFAULT 0,
                   SalSU_STT          NUMBER(4,6)     DEFAULT 0,
                   DividendSU_RequestId     NUMBER(8)     DEFAULT 0,
                   DividendSU_Timestamp     VARCHAR2(25)     DEFAULT ' '
    ALTER TABLE Trn_Invest_DividendSU ADD (CONSTRAINT Trn_Inv_DivSU_DividendSUID_PK PRIMARY KEY (DividendSU_ID));
    ALTER TABLE Trn_Invest_DividendSU ADD (CONSTRAINT Trn_Inv_DivSU_SchemeType_Id_FK FOREIGN KEY (DividendSU_SchemeTypeID) REFERENCES Mst_Invest_SchemeType (SchemeType_ID));
    ALTER TABLE Trn_Invest_DividendSU ADD (CONSTRAINT Trn_Inv_DivSU_InvID_FK FOREIGN KEY (InvstMaster_ID) REFERENCES Mst_Invest_Master (InvstMaster_ID));
    ALTER TABLE Trn_Invest_DividendSU ADD CONSTRAINT Check_Id2_FK check
    ((Scheme_Code Is Null and Share_Code Is Null) OR
    (Scheme_Code Is Not Null and Share_Code Is Null) OR
    (Scheme_Code Is Null and Share_Code Is Not Null));
    Note:
    Scheme_Code is primary key in Sheme Master
    Share_Code is primary key in Share Master
    SH01 is available in Share Master.but insert statement will not accept.
    insert into TRN_Invest_DividendSU(DIVIDENDSU_ID,DIVIDENDSU_SU_CODE,SCHEME_CODE,SHARE_CODE) values (1,'SH01',null,null)
    The Following will be coming
    ORA-02291: integrity constraint (SBNPINV.TRN_INV_DIVSU_INVID_FK) violated - parent key not found
    Pls very urgent.
    Thanks,
    V.Nagarajan

    Hi,
    I can not understand the need for this constraint excatly
    ALTER TABLE Trn_Invest_DividendSU
    ADD CONSTRAINT Check_Id2_FK check(
       (Scheme_Code Is Null and Share_Code Is Null) OR
       (Scheme_Code Is Not Null and Share_Code Is Null) OR
       (Scheme_Code Is Null and Share_Code Is Not Null)
    );If I am reading it correctly, you do not want value for both Scheme_code and Share_code at the same time. Only one of the values should be present for a particular row.
    If I read it correctly, then this constraint needs to be modified so that you can specify values for both these fields in your INSERT statement.
    Thanks,
    Ankur

  • How to set the value of something in a component from the main application?

    Hi,
    Maybe I've been working on this too long, but I can't figure
    out how to set the value of the text property of a text input field
    in a component from my main application in an mx:Script block. I
    have a component called Login in the components folder, and I need
    to set the text value of empNum. In my mxml declaration at that the
    top, I've declared these components as xmlns:c="components.*" So
    logically, the property I'm trying to set is c.Login.empNum.text. I
    can't figure out the correct syntax to get this to work, and I've
    tried everything I can think of. Does anyone have any suggestions?
    I'm thinking this should be an easy one, and I'm just missing
    something.
    Thanks!
    Holli

    Did you try giving it an id ?
    <c:MyLogin id="loginScreen" /c>
    So later you can do loginScreen .empNum.text = "my text"
    Laurent,

  • How to assign a dynamic value to the value property of a button ?

    Hi Folks,
    I have a need, can i know how to assign a dynamic value to the value property of a button. Scenario is like follows...
    This is a struts based web application
    1. I have a file which consists of login user details (user name and his previlages) for a web application.
    2. I got those user details, into a List.
    3. When a user logged into the web app, in the home page there are few buttons. The type and number of buttons shown depends on the type of user/ user. (Buttons have different combination and the number of buttons available are not constant, they will vary from user to user).
    4. for each button, there will be a different action. I can pass the value of a button to an action class, but here button must have a dynamic value.
    Here is my test code:
    <%
    if (List != null)
    for (int i = 0; i <List.length; i++)
    %>
    <html:submit property="rduname" value= "<%=List%>" onclick="return submitRdu('<%=List[i] %>');"/>
    <%
    %>
    But my problem is how to assign a dynamic value to the value property of the button ( i know 'value= "<%=List[i]%>" ' will not work, just wanted show you guys).
    Thanks in advance,
    UV
    Edited by: UV_Dev on Oct 9, 2008 2:15 PM

    Let me try i know am not good at JSP but do we need double quotes here
    value= <%=List%>i think JSTL should help you about the dynamic thing                                                                                                                                                                                                                                                                                                                       

  • How to get the 'text' property value of a button in coding?

    Hi Experts,
    I'm using 10 buttons all are having common action('click'). when i click a button the 'text' value of the button should pass to a function.So the action is same but the passed value will be the 'text' value of the corresponding button.  I don't know how to get the 'text' property of a button in coding. Kindly help me to solve this problem.
    Thanks and Regards
    Basheer

    Hi,
    My event is like this.
    public void onActionclick(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
         String s =  ?  ; // should get the 'text' property of clicked button
         fillInput(s);     // function to be called
    The called function is,
    public void fillInput( java.lang.String id )
        String str=wdContext.currentContextElement().getNum();
        str = str + id;
        wdContext.currentContextElement().setNum(str);
    How can i get the 'text' property value of the corresponding button. Click action should be common to all buttons.
    Thanks and Regards,
    Basheer

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • Unable to use correctly the value property node in a re-entrant VI

    Hi everybody,
    I am using labview 6.1 and developing an application which call a reentrant SubVI. However when I use the Value Property Node (which I need : the use of local terminal isn't possible in my final application) in the re-entrant SubVI, i get the initial value of the control, not the current value !?
    Is there anybody to explain me why and how to solve this problem ?
    I have attached 3 VIs for a better explanation.
    Thanks.
    Attachments:
    Master.vi ‏9 KB
    Slave.vi ‏23 KB
    globales.vi ‏7 KB

    You just need to create a local variable instead of a property node to read the value of the control that was passed in. Popup on the control and select Create >> Local Variable. Or just wire the control to where you need it. Data flow is still working; Feroz just explained an idosyncracy of how property nodes work in reentrant VIs.
    BTW - I don't mean to turn this into a sales opportunity, but you might want to check out the VI Analyzer Toolkit. It reports the following for a reentrant VI that uses property nodes:
    "You are using an implicit property node in this reentrant VI. This can result in unexpected block diagram behavior, as a reentrant VI will occupy multiple data spaces but will maintain only a single front panel. You should consid
    er either making this VI non-reentrant, or eliminating the use of implicit property nodes."
    I'm not sure how many people would know what the message means, but they would be forewarned and hopefully check into it further (e.g. test with this specifically in mind).
    I filed a bug report to have this investigated further and at least documented better.
    Roy

  • How to access the value of a dynamic checkboxes

    Hello,
    I have a userform with a dynamic set of checkboxes. 
    Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox_" & counter & "_" & i)
    I'm giving the name of each checkbox multiple parts because there will be multiple rows of checkboxes.
    How can I know if checkbox_1_1 is checked or not?
    I have tried
    For Each cont In Me.Controls
    If cont.Name = strCtrlName Then
    'cont.Value doesn't exist
    End If
    Next cont
    The value property is not showing up.
    Thank you for any help

    Maybe you've got your strCtrlName wrong, this worked for me
    Private Sub UserForm_Initialize()
    Dim i As Long
    Dim counter As Long
    counter = 5
    Dim chkBox As MSForms.CheckBox
    For i = 1 To 3
    Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox_" & counter & "_" & i)
    chkBox.Left = 9
    chkBox.Top = i * 20
    chkBox.Caption = chkBox.Name
    Next
    End Sub
    Private Sub UserForm_Click()
    Dim i As Long
    Dim counter As Long
    counter = 5
    Dim chkBox As MSForms.CheckBox
    For i = 1 To 3
    Set chkBox = Me.Controls("Checkbox_" & counter & "_" & i)
    s = s & i & "=" & chkBox.Value & " "
    Next
    Me.Caption = s
    End Sub
    Paste the above into an empty userform and run it. Tick a couple of checkboxes and click the form.
    Maybe look into WithEvents in a class module to trap and act on checkbox changes in real time.

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to Get the value in a new created view.

    Hi Experts,
    I have create a view along with the fields: Street No. , Street name, apt no,
    how should i capture these values . in a current situation i entering the value but when i check in the debugging mode : in a collection_wrapper (context node class) i am not able the see the value which i have entered. please help me out. it is  very urgent.
    Rohit

    Hi Ashish,
    Thanks for replying. i have already create the context node and in the using the request from field method ,i am getting the value in my work area but how to store the value in the custom fields of that particular order  as well as store the value in the crmd_customer_i table...
    Regards,
    Rohit

  • How to set the value of an array element (not the complete array) by using a reference?

    My situation is that I have an array of clusters on the front panel. Each element is used for a particular test setup, so if the array size is three, it means we have three identical test setups that can be used. The cluster contains two string controls and a button: 'device ID' string, 'start' button and 'status' string.
    In order to keep the diagrams simple, I would like to use a reference to the array as input into a subvi. This subvi will then modify a particular element in the array (i.e. set the 'status' string).
    The first problem I encounter is that I can not select an array element to write to by using the reference. I have tried setting the 'Selection s
    tart[]' and 'Selection size[]' properties and then querying the 'Array element' to get the proper element.
    If I do this, the VI always seems to write to the element which the user has selected (i.e. the element that contains the cursor) instead of the one I am trying to select. I also have not found any other possible use for the 'Selection' properties, so I wonder if I am doing something wrong.
    Of course I can use the 'value' property to get all elements, and then use the replace array element with an index value, but this defeats the purpose of leaving all other elements untouched.
    I had hoped to use this method specifically to avoid overwriting other array elements (such as happens with the replace array element) because the user might be modifying the second array element while I want to modify the first.
    My current solution is to split the array into two arrays: one control and one indicator (I guess that's really how it should be done ;-) but I'd still like to know ho
    w to change a single element in an array without affecting the others by using a reference in case I can use it elsewhere.

    > My situation is that I have an array of clusters on the front panel.
    > Each element is used for a particular test setup, so if the array size
    > is three, it means we have three identical test setups that can be
    > used. The cluster contains two string controls and a button: 'device
    > ID' string, 'start' button and 'status' string.
    >
    > In order to keep the diagrams simple, I would like to use a reference
    > to the array as input into a subvi. This subvi will then modify a
    > particular element in the array (i.e. set the 'status' string).
    >
    It isn't possible to get a reference to a particular element within an
    array. There is only one reference to the one control that represents
    all elements in the array.
    While it may seem better to use references to update
    an element within
    an array, it shouldn't really be necessary, and it can also lead to
    race conditions. If you write to an element that has the
    possibility of the user changing, whether you write with a local, a
    reference, or any other means, there is a race condition between the
    diagram and the user. LV will help with this to a certain extent,
    especially for controls that take awhile to edit like ones that use
    the keyboard. In these cases, if the user has already started entering
    text, it will not be overwritten by the new value unless the key focus
    is taken away from the control first. It is similar when moving a slider
    or other value changes using the mouse. LV will write to the other values,
    but will not rip the slider out of the user's hand.
    To completely avoid race conditions, you can split the array into user
    fields and indicators that are located underneath them. Or, if some
    controls act as both, you can do like Excel. You don't directly type
    into the cell. You choose w
    hich cell to edit, but you modify another
    location. When the edit is completed, it is incorporated into the
    display so that it is never lost.
    Greg McKaskle

  • How to delete the values from TKOMV at runtime after creating PO

    Hi,
      How to delete the values from TKOMV at runtime after creating PO from IDOC. I am creating PO through IDOC, subsequently need to create Sales order and again need to create 2nd PO with reference of Purchase Requestion(created with sales order). At the time creation of 2nd PO the Header conditions are appearing twice and net price value is appearing wrong.
    Thanks in advance.

    Hi Padma
    Can you do this activity once the company code is in to production. I guess you can not do this activity, if the company code is already in to live. Setting or resetting of the recon accounts will hinder the previous actitivity. Infact resetting of the company code is also not a good option.
    Any how, thanks for the inputs. Please let me know whether i can do this activity only at the subledger level which will not impact other modules. The one solution i can figured out is , reverse all the transactions for the corresponding asset in the year of takeover and pass the entries again in the same year correctly which will have effect in Subledger and also in general ledger. But the business people will not allow this, since for a big client it will require lot of authorizations and approvals. Infact the vendor also, is cleared. So we have to reverse the cleared documents as well which is again a task and require approvals as well.
    Thanks and regards
    Seshu.

  • How to get the value assigned in dropdowmlistbox as well as radio button

    Hi Everybody,
       Please help me to find the solution for the following:
       1. How to get the value assigned in dropdowmlistbox?
       2. How to get the value assigned in radio button?
      I am waiting for the answer and reply...
      Thanks & Regards,
      ShanthaKumar.KA.

    The radio button has a name attribute. That name attribute should be the same as the bean property. Then you just need a
    <jsp:setProperty name="mybean" property="*"/>
    and the bean's set method will be called for the value of that radio button.
    so...
    <input type="radio" name="doit"/>
    class MyBean
    public void setDoit( boolean yes )
    //do whatever here
    }

  • How to get the value of Selected Dimension in a Pie Chart ?

    Hi All,
    Here is an example i'm working on ,
    JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    I'm using selectData event to fire when any data is selected in the chart. How to get the value of dimension, in my case country which has been selected ?
    Thanks & Regards
    Sakthivel

    Hi,
    I added below code
    var oSelectData = oEvent.getParameter("data");
    // let the dataset convert the event coordinates back to a UI5 model context
    var oContext = this.getDataset().findContext(oSelectData[0].data[0].ctx.path);
                   console.log(oContext);
    in console  I am able to get the path of selected dimention.
    JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    you can figure out how to get the data from this information.
    Regards,
    Chandra

  • Problem with the Value property node (MacOS)

    As far as I have tested it, Value Property nodes (and Value (signaling)) don't work in MacOS : The value property appears as a boolean, the value(signaling) as a cluster (width, height).
    Even with boolean controls, the node is not working.
    No such problem in LV 8.6.
    Am-I missing something ? Is that some "intended use"  ? Or simply a bug ?
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Solved!
    Go to Solution.

    That sounds like some sort of indexing problem with the property nodes like somesort of corrupted installation.  What if you just delete the property node and recreate it?
    I dropped a numeric control and looked at the shortcut menu for the list of property nodes.  Right below Value and Value (signalling) are Visible (which would be a boolean) and Xcontrol, which when you step down through the submenus, the first choice is Container bounds, a cluster of Width and Height.  So these 2 datatypes that are 2 lower on the list match the ones you are getting.
    What happens if you pick another property node a few elements up or down on the shortcut menu?  Does is happen for some other properties, and if so, are thereany properties that are okay?
    Here is what my property nodes look like for a numeric and I draggged the box up and down to show the natural order of the property nodes.  Note that I have scripting installed, so there are a few more property nodes (and the blue box at the top) that you might not have.
    PS.  Check you signature.  The Kudos button is now moved to the left since the forum upgrade. 
    Attachments:
    Example_VI_BD.png ‏4 KB

Maybe you are looking for