Shared data in custom component and FPM_FORM_UIBB

Hi all,
is it possible to share data between a form UIBB and a custom building block context. It probably can be done with shared classes, but is it possible to use the shared data interface and how?
kind regards,
Pieter

>
Pieter Troost wrote:
> Hi all,
>
> is it possible to share data between a form UIBB and a custom building block context. It probably can be done with shared classes, but is it possible to use the shared data interface and how?
>
> kind regards,
>
> Pieter
Hi Pieter,
As you already said , it is possible by shared classes, i am afraid that it is not possible  to have the Shared Component, interface to get worked the way you would like to have.

Similar Messages

  • Is  Creating a Custom Component and Custom UIComponent are same in Flex ??

    Hi ,
    I am getting confusion in the terminology of words  with respect to Custom  Components .
    Please let me know whether  Creating a Custom Component and Custom UIComponent are same in Flex ??
    Because i have created some  Custom Components based on Form Container based on my business screens .
    Does they both Custom Component and Custom UIComponent mean the same ??
    Please tell me .
    Thanks in advance

    There seems to be a little confusion here. Think of it this way:
    A basic UIComponent by itself is not visible; you can add something you can see to it to make a visual custom component. For example, a ComboBox component is a UIComponent with a ComboBox added to it.
    The UIComponent is the lightest weight component available from which you can create other components. I use it as the base for custom components that the user cannot see, like a data manager.
    HTH,
    Carlos

  • Access data in custom component.

    Hi Everyone,
                    I am new to Flex soo pardon me if my questions are quite basic. I have searched a lot before posting here, might be I was not looking in the right direction. Please redirect me to the path that leads to the solution of the problem. I really appreciate any help that I can get.
    I'm followiing this video tutorial.
    http://www.gotoandlearn.com/play.php?id=100
    All was going fine, until the tutor wanted to add custom component in the application. He added the HBox which I couldn't find in Flash Builder  4.6 so I added HGroup instead in my new component. Now when I want to use the data that was fetched in the parent component in custom component it gives me error. Here is the code and their file names.
    File: SearchHomeView.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Twitter Search">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <s:HTTPService result="onResult(event)" id="service" url="http://search.twitter.com/search.atom?q=adobe">
            </s:HTTPService>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import flash.utils.flash_proxy;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.ResultEvent;
                [Bindable]
                private var ac:ArrayCollection;
                private function onResult(event:ResultEvent):void
                    ac = event.result.feed.entry as ArrayCollection;
                    trace(data);
                    trace(ac);
                private function doSearch(event:MouseEvent):void
                    //service.url = "http://search.twitter.com/search.atom?q=" + tearch.text;
                    service.url = "http://search.twitter.com/search.atom?q=adobe";
                    service.send();
            ]]>
        </fx:Script>
        <s:TextInput x="25" y="26" width="146" id="tearch"/>
        <s:Button x="224" y="26" height="33" label="Search" click="doSearch(event)" />
        <s:List dataProvider="{ac}" itemRenderer="tweet" x="25" y="92" width="274" height="278"></s:List>
    </s:View>
    File: tweet.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:HGroup xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns:s="library://ns.adobe.com/flex/spark" width="400" height="300">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:Image width="50" height="50" source="{parentDocument.data.link.getItemAt('1').href}">
        </s:Image>
        <s:TextBase width="100%" text="">
        </s:TextBase>
    </s:HGroup>
    When I use source to be source="{parentDocument.data.link.getItemAt('1').href} ... it removes the error, but displays nothing on the resulting app.
    When I use source to be source="{data.link[1].href} ... it gives the error,
    Multiple markers at this line:
    -1120: Access of undefined property data.
    -parentDocument
    What needs to be done to use the item renderer right in custom component ? Please tell me the solution to it... I'm stuck on it for quite a few time.
    Thanks
    Bilal Ahmad

    Hello Ravi,
    one option is the create a public attribute to share your value note data with other components.
    Another option is a function group with two function modules "SET_" and "GET_".
    I´m sure one of the webclient UI Gurus here in this forum could share less "dirty" ways with you.
    Kind regards
    Manfred

  • Custom component and custom event problem

    hello , i have a strange problem since one week , is that i can't handle the events becoming from my custom component , here is my code :
    Event Class :
    package events
         import flash.events.Event;
         public class Ev extends Event
              public static const UPDATE:String="update";
              public var data:String;
              public function Ev(type:String,data:String)
                   super(type);
                   this.data=data;
              override public function clone():Event
                   return new Ev(type,data);
    MXML component :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx">
         <fx:Metadata>
              [Event(name="onMenuChange",type="events.Ev")]
         </fx:Metadata>
         <fx:Script>
              <![CDATA[
                   import events.Ev;
                   import mx.events.IndexChangedEvent;
                   protected function accordion1_changeHandler(event:IndexChangedEvent):void
                        dispatchEvent(new Ev(Ev.UPDATE,event.newIndex.toString()));
              ]]>
         </fx:Script>
         <fx:Declarations>
              <!-- Placer ici les éléments non visuels (services et objets de valeur, par exemple). -->
         </fx:Declarations>
         <mx:Accordion width="200" height="200" change="accordion1_changeHandler(event)">
              <s:NavigatorContent label="Menu 1" width="100%" height="100%">
              </s:NavigatorContent>
              <s:NavigatorContent label="Menu 2" width="100%" height="100%">
              </s:NavigatorContent>
              <s:NavigatorContent label="Menu 3" width="100%" height="100%">
              </s:NavigatorContent>
         </mx:Accordion>
    </mx:VBox>
    the main container :
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
         <fx:Script>
              <![CDATA[
                   import events.Ev;
                   import mx.controls.Alert;
                   protected function comp1_onMenuChangeHandler(event:Ev):void
                        Alert.show(event.data,"notice");
              ]]>
         </fx:Script>
         <local:Comp onMenuChange="comp1_onMenuChangeHandler(event)"/>
    </s:Application>
    any help will be welcome !

    hi,
    Not sure why your custom event is not working, I tend not to worry about 'custom' events unless I need to transfer a lot of information.
    Here is a way to 'simplify' event management.
    I just declare a new event in the meta data and then send it to notify that a change has been made. Although the parent can find the index value easily enough I also use two-way bind the navigators index so that it is directly available for the application to manipulate/read .
    http://gumbo.flashhub.net/events/  source included
    David.

  • Custom component and non-primitive types of attributes

    Dear programmers
    I try to develope a custom UI component that one of its attribute is an ArrayList. For example:
    <productFile:Matrix images="#{MyBean.imagesArray}"/>Unfortuanetly I get the following exception:
    [Unable to convert string &#39;#{MyBean.imagesArray}&#39; to class java.util.ArrayList for attribute images: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager]: org.apache.jasper.JasperException: Unable to convert string '#{MyBean.imagesArray}' to class java.util.ArrayList for attribute images: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    The attribute images is an ArrayList in the custom component.
    I have also specifieded it as an ArrayList in the tld file:
    <tag>
           <name>Matrix</name>
           <tag-class>org.sii.productfilejsf.tags.MatrixTag</tag-class>
           <body-content>JSP</body-content>
           <attribute>
                <name>images</name>
                <required>false</required>
                <rtexprvalue>false</rtexprvalue>
                <type>java.util.ArrayList</type>
           </attribute>
      </tag>Does anyone has an idea what can be the problem?
    How can I convert the expression?

    so how will I be able to convert it?Only your converter knows it.
    By the way, is your Matrix component fully completed including its children components?
    If yes, you should know how to implement a converter, or its equivalent code for them.
    For example, in the <h:dataTable> component, if its value attribute points an array of object,
    then it is automatically converted to an appropriate DataModel used by its column children.
    We may need to see your MyBean bean and related code set, if we have enough time.

  • A Custom Component and the JSP source that get's generated

    I'm writing a Custom Component library and I'm at a point where I need to understand how the JSP source that gets generate when my component is dragged from the palete is created and how it relates to the properties I define in the Metadata files.
    In particular I have a component that is an extension of the DataTable component and I'd like to control what get's dropped onto the page when the user drags over my component.
    Don

    See the "Building and Customizing JavaServer Faces Technology Components" technology theme page at http://developers.sun.com/prodtech/javatools/jscreator/reference/themes/buildingjsf/index.html. The Hands-On Examples and "Design-Time API User Guide (pdf)" linked from that page should help.

  • How to get an event both in custom component and into its instance

    I have a custom component that extends a Jtree
    I want to know when a node is clicked both , into my component and after into the component sited into Jpanel
    now, I can only detect it into the component, but I dont know how to detect it at the component I have in my Jpanel
    I have 'addTreeSelectionListener' in both places ...
    xxxxx.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
    public void valueChanged(javax.swing.event.TreeSelectionEvent e) { .....
    Any help ?
    Thanks

    tonnot wrote:
    Thank you.
    I think that a good answer can be ' Revise your code, because there must be a problem' Well, that's the life of a programmer. If you want to post an SSCCE, I'm sure somebody can help if you get stuck.
    And ...
    Why are you extending JTree? I'd bet you shouldn't be.Why not ? ....
    Why SUN develop the 'extends' functionality ? You should use extends if you're changing the behavior of an existing class. An example of this is extending JPanel and overriding the paintComponent() method to do some custom painting.
    You should not use extends if you just need an instance of an existing class. An example of this is extending JFrame instead of simply creating a JFrame instance.
    Without seeing your code, I can't be sure you're misusing extends. But many people do.
    Here's an example.
    Bad:
    public class MyProgram extends JFrame{
       public MyProgram(){
          setSize(200, 200);
          setVisible(true);
       public static void main(String [] args){
          new MyProgram();
    }Better:
    public class MyProgram{
       public MyProgram(){
          JFrame frame = new JFrame();
          frame.setSize(200, 200);
          frame.setVisible(true);
       public static void main(String [] args){
          new MyProgram();
    }

  • Key Date a Customer Exit and Variant use

    Hello,
      I have a query and it includes time dependent data. The key date uses a  variable that is filled with the current date in a customer exit. Works nicely when the query is executed. However, if I save a variant with various values for variables on the starting/selection screen, the date is saved as a constant date and not dynamic based on the current date so that when the variant is selected to be used on a different day, the key date is the date the variant was saved and not the current date. This can be handled in R/3 ABAP report variants but I've not found a way to do it in BEx. Any help?
    Thanks,
    Diane

    Hi,
    If you are running on BI 7.0 you can maintain variants with the below code. make data sy-datum instead of user input.
    You can also chect the document. It also contains a method for bw 3.5 variants.
    You can schedule this program in a process chain or make variations of this as needed.
    [How To… Troubleshoot Information Broadcasting (BEx Workbooks)|http://www.sapadvisors.com/resources/HowtoInformationBroadcasting.pdf]
    *& Report Z_MASS_VARIANT_MAINTENANCE *
    *& Program to mass update BEx Variants within SAP NetWeaver 2004s *
    REPORT Z_MASS_VARIANT_MAINTENANCE.
    parameter variable like RSRVARIANT-VARI.
    parameter vname like RSRVARIANT-VNAM.
    parameter sign_01 like RSRVARIANT-SIGN.
    parameter opt_01 like RSRVARIANT-OPT.
    parameter low_01 like RSRVARIANT-LOW.
    parameter high_01 like RSRVARIANT-HIGH.
    tables: RSRVARIANT.
    select * from RSRVARIANT.
    if rsrvariant-VARI = variable AND rsrvariant-vnam = vname.
    rsrvariant-SIGN = sign_01.
    rsrvariant-OPT = opt_01.
    rsrvariant-LOW = low_01.
    rsrvariant-HIGH = high_01.
    elseif rsrvariant-vnam = vname.
    rsrvariant-SIGN = sign_01.
    rsrvariant-OPT = opt_01.
    rsrvariant-LOW = low_01.
    rsrvariant-HIGH = high_01.
    endif.
    update rsrvariant.
    if sy-subrc <> 0. insert rsrvariant. endif.
    endselect.
    regards,

  • How to bind table data to datatable component and show all the table data??

    I bind table to datatable component !
    The datatable has four rows,
    but the datatable alway show the first row data in its four rows,why??

    do you mean at design time or at runtime?
    at design time, the datatable uses generic fields to
    show if data type is numeric, text, date, etc...
    If this is at runtime,
    - what driver are you using?
    - how did you bind the data to the table?
    - what is the resulting code in the Java backing file?
    hth,
    -Alexis

  • Sharing data between a bean and a jsp

    I have a bean that is being used as a helper class for a jsp page. I can call functions in the bean and display what is returned but I can't test the state of the bean in the jsp page. Is this possible?
    my code is below:
    jsp: a form posts info to this page
    <HTML>
    <BODY>
    <jsp:useBean id='portal' class='portal.portal'/>
    <%-- set the username and password --%>
    <jsp:setProperty name="portal" property="*" />
    <jsp:getProperty name="portal" property="dbconnection"/>
    <Center>
    <H1>Welcome to the Portal
    <jsp:getProperty name="portal" property="firstName"/>
    </H1>
    <br>
    <table border="0">
    <%-- while loop grabs all the services --%>
    <%-- case tests for special services (links) --%>
    <%
    String url = "";
    int ServiceID = 0;
    //I CAN'T PULL THE VALUES FOR THESE VARIABLES SO THE WHOLE WHILE LOOP IS SKIPPED!
    while (url.length() != 0)
    switch (ServiceID)
    case 69:
    %>
    <tr valign="top" height="45">
    <td>
    <center>
    " TARGET="new_window"><IMG SRC="images\MEDS TAPE LOG.gif" BORDER=white></A><br>
    </center>
    </td>
    </tr>
    <%
    break;
    case 41:
    %>
    <tr valign="top" height="45">
    <td>
    <center>
    <A HREF="<jsp:getProperty name="portal" property="url"/>" TARGET="new_window"><IMG SRC="images\Lan Support Website.gif" BORDER=white></A><br>
    </center>
    </td>
    </tr>
    <%
    break;
    case 1:
    %>
    <tr valign="top">
    <td>
    <center>
    <form name="loginfrm" action="http://204.104.185.139/pls/WLOG/login.ValidateUser" method="post" target=_parent>
    <INPUT TYPE=hidden NAME=TXTUSERNAME VALUE="<jsp:getProperty name="portal" property="name"/>">
    <INPUT TYPE=hidden NAME="TXTPASSWORD" VALUE="<jsp:getProperty name="portal" property="password"/>">
    <input TYPE="submit" VALUE="<jsp:getProperty name="portal" property="serviceName"/>" style="width: 120px;" >
    <input type="reset" name="reset" value="">
    </Form>
    </center>
    </td>
    </tr>
    <%
    break;
    default:
    %>
    <tr valign="top">
    <td>
    <center>
    <Form method='post' action='<jsp:getProperty name="portal" property="url"/>' name='loginfrm'>
    <INPUT TYPE=hidden NAME="TXTPASSWORD" VALUE="<jsp:getProperty name="portal" property="password"/>">
    <INPUT TYPE=hidden NAME="TXTUSERNAME" VALUE="<jsp:getProperty name="portal" property="name"/>">
    <INPUT TYPE=hidden NAME="firstname" VALUE="<jsp:getProperty name="portal" property="firstName"/>">
    <INPUT TYPE=hidden NAME="lastname" VALUE="<jsp:getProperty name="portal" property="lastName"/>">
    <INPUT TYPE=hidden NAME="id" VALUE="<jsp:getProperty name="portal" property="userID"/>">
    <INPUT TYPE=hidden NAME="role" VALUE="<jsp:getProperty name="portal" property="roleID"/>">
    <input type='submit' name='submit' value='<jsp:getProperty name="portal" property="serviceName"/>'>
    </Form>
    </center>
    </td>
    </tr>
    <%
    break;
    %>
    <jsp:getProperty name="portal" property="nextForm"/>
    <%
    %>
    </table>
    </Center>
    </Body>
    </Html>
    here is the bean:
    //bean for portal
    package portal;
    import java.io.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.util.Enumeration;
    import java.sql.*;
    import java.util.*;
    public class portal {
    private ResultSet userInfo;
    private Statement stmt;
    private String pw;//password from the database
    private String FirstName;
    private String LastName;
    private String UserName=""; //network login name
    private String UserPassword="";//password supplied by the form
    private int UserID; // temp variable while pulling the services from the databases
    private int RoleID; // temp variable while pulling the services from the databases
    private String ServiceName=""; //temp variable while pulling the services from the database
    private int ServiceID;
    private String url ="";
    //String Message=""; //testing
    private String Message2=""; //string that sends the correct html back to the jsp
    public int getServiceID(){
    return ServiceID;
    public void setName(String Name){
    UserName = Name;
    public String getName(){
    return UserName;
    public void setPassword(String Password){
    UserPassword = Password;
    public String getPassword(){
    return UserPassword;
    public String getFirstName(){
    return FirstName;
    public String getLastName(){
    return LastName;
    public String getUrl(){
    return url;
    public int getUserID(){
    return UserID;
    public int getRoleID(){
    return RoleID;
    public String getServiceName(){
    return ServiceName;
    public String getDbconnection() {
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    DriverManager.setLoginTimeout(60);//time out after 1 min.
    Connection con = DriverManager.getConnection("jdbc:odbc:Portal");
    stmt = con.createStatement();
    String query = "SELECT EMP_TABLE.EMP_PASS, MGR_SERVICES.SERVICE_ID,";
    query = query +" MGR_SERVICES.DEFAULT_URL, EMP_TABLE.EMP_USER_ID, *";
    query = query +"FROM (EMP_TABLE LEFT JOIN MGR_USER_SERVICES ON";
    query = query +" EMP_TABLE.EMP_USER_ID = MGR_USER_SERVICES.USER_ID)";
    query = query +" LEFT JOIN MGR_SERVICES ON MGR_USER_SERVICES.SERVICE_ID =";
    query = query +" MGR_SERVICES.SERVICE_ID WHERE (((EMP_TABLE.EMP_LAN_ID)='" + UserName+ "'))";
    //String query = "SELECT EMP_TABLE.EMP_PASS, MGR_SERVICES.SERVICE_ID,";
    //query = query +" MGR_SERVICES.DEFAULT_URL, EMP_TABLE.EMP_USER_ID, *";
    //query = query +"FROM (EMP_TABLE LEFT JOIN MGR_USER_SERVICES ON";
    //query = query +" EMP_TABLE.EMP_USER_ID = MGR_USER_SERVICES.USER_ID)";
    //query = query +" LEFT JOIN MGR_SERVICES ON MGR_USER_SERVICES.SERVICE_ID =";
    //query = query +" MGR_SERVICES.SERVICE_ID WHERE (((EMP_TABLE.EMP_LAN_ID)='landwla'))";
    //String query = "SELECT * FROM EMP_TABLE WHERE EMP_LAN_ID ='landwla'";
    userInfo = stmt.executeQuery(query);
    if(userInfo.next())
    pw = userInfo.getString("EMP_PASS");
    if (UserPassword.equals(pw))
    //Message = "Your logged in";
    //Message = Message + "Luke you sly devil";
    FirstName = userInfo.getString("EMP_FIRST");
    LastName = userInfo.getString("EMP_LAST");
    UserID = userInfo.getInt("EMP_USER_ID");
    RoleID = userInfo.getInt("ROLE_ID");
    url=userInfo.getString("DEFAULT_URL");
    ServiceName = userInfo.getString("SERVICE_NAME");
    ServiceID = userInfo.getInt("Service_ID");
    else
    Message2 = "<Script Language=JavaScript>";
    Message2 = Message2 + "alert('Your Password Information is incorrect');";
    Message2 = Message2 + "window.location.href = 'Login.html'";
    Message2 = Message2 + "</Script>";
    else
    Message2 = "<Script Language=JavaScript>";
    Message2 = Message2 + "alert('Your Login Information is incorrect');";
    Message2 = Message2 + "window.location.href = 'Login.html'";
    Message2 = Message2 + "</Script>";
    catch (InstantiationException i)
    {return (i.toString());}
    catch (ClassNotFoundException c)
    {return (c.toString());}
    catch (SQLException sql)
    {return (sql.toString());}
    catch (Exception e)
    {return (e.toString());}
    return Message2;
    public String getNextForm() {
    try
    url="";
    ServiceName="";
    if(userInfo.next())
    url=userInfo.getString("DEFAULT_URL");
    ServiceName = userInfo.getString("SERVICE_NAME");
    RoleID = userInfo.getInt("ROLE_ID");
    ServiceID = userInfo.getInt("Service_ID");
    catch (SQLException sql)
    {return (sql.toString());}
    return Message2;

    Of course you can.
    <%
    String url = protal.getUrl();
    %>

  • EncodeBegin and encodeEnd, or getChildren.add in a custom component?

    which is considered a better practice in JSF custom composite components?

    just insert the script tags in the custom component and place
    your actionscript within those script tags. So in your case just
    insert the following script tags above the image control...
    <mx:Script>
    <![CDATA[
    // actionscript goes here
    ]]>
    </mx:Script>
    - Tony

  • JSF Custom component for table pagination and sorting

    hi
    i want such a custom component that render a table and table has the features of pagination and column sorting.
    any one know from where i can get such a custom component.
    (if this component is available with source then it would be more help full for me)
    thnks & regards,
    Haroon
    Message was edited by:
    HaroonAnwarPADHYAR

    I know two companies that offer JSF component for table pagination and sorting and AJAX based :
    http://www.teamdev.com/quipukit/demo/datatable/DataTable_filteringAndPaging.jsf
    http://java.samples.infragistics.com/NetAdvantage/JSF/2006.1/
    The problem? They are not open source..
    And I am too looking forward on this subject, because I want to develop my own custom component and add some features. If someone has any tips, references or samples of their own, it would be really appreciated.
    Thank you.
    Paul

  • How to handle value change events of select list in custom component?

    My HelloUIComp code...How to handle events for "Select"...if i choose option1 from select then one text box is to be displayed in custom component and if i choose another option then some other text box is to be displayed in custom components...
    public class HelloUIComp extends UIComponentBase {
        public static final String account="custom.account";
        public static final String RENDERER_TYPE = null;
        HtmlCommandButton button = createButton();
        //HtmlSelectOneMenu select=createSelect();
        public void processDecodes(FacesContext context) {
             Calling the lifecycle method "processDecodes" on the
             internal button is absolutely critical to create action events
             button.processDecodes(context);
             super.processDecodes(context);
        private HtmlCommandButton createButton() {
             FacesContext context = FacesContext.getCurrentInstance();
             HtmlCommandButton newButton = new HtmlCommandButton();
             newButton.setId("Add");
             newButton.setValue("Add");
             newButton.setType("submit");
             //newButton.setOnclick("return func_1(this,event);");
             MethodBinding binding = context.getApplication().createMethodBinding("#{pc_MyProjectView.go}", null);
             newButton.setAction(binding);
                  newButton.setParent(this);
             return newButton;
      /*  private HtmlSelectOneMenu createSelect()
             HtmlSelectOneMenu selectCategory=createSelect();
             return selectCategory;
         public void encodeBegin(FacesContext context) throws IOException {
              String style = (String)getAttributes().get("style");
              String startdate = (String)getAttributes().get("startdate");
              String enddate = (String)getAttributes().get("enddate");
              //String add=(String)getAttributes().get("add");
              ResponseWriter writer = context.getResponseWriter();
             writer.startElement("table", this);
            writer.writeAttribute("border","2","2");
            writer.startElement("tbody", this);
            writer.startElement("tr", this);
            writer.startElement("td", this);
            writer.writeText("Account Category", null);
            writer.endElement("td");
              writer.startElement("td", this);
              writer.writeText("Reg-No", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("Account-No", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("Start-Date", null);
              writer.endElement("td");
              writer.startElement("td", this);
            writer.writeText("End-Date", null);
              writer.endElement("td");
              writer.endElement("tr");
              writer.startElement("tr",this);          
              writer.startElement("td", this);
              writer.startElement("select", this);
            if (style!=null)
                   writer.writeAttribute("style", style, null);
            writer.writeAttribute("name","category","category");
            writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              //to access data
              Account accountObj;
              AccountData accountDataobj;
              List listOfAccounts;
              int noOfAccounts;
              accountDataobj=new AccountData();
              listOfAccounts=accountDataobj.getAccounts();
              noOfAccounts=listOfAccounts.size();
              for(int i=0;i<noOfAccounts;i++)
              writer.startElement("option", this);     
              accountObj=(Account) listOfAccounts.get(i);
              writer.writeText(accountObj.getCategory(), null);
              writer.endElement("option");
              //System.out.println(accountObj.getRegNo());
              //System.out.println(accountObj.getAccountNo());
              writer.endElement("select");
              writer.endElement("td");
            writer.startElement("td", this);
              writer.startElement("select", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("name","regno","regno");
              writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              for(int i=0;i<noOfAccounts;i++)
              accountObj=(Account) listOfAccounts.get(i);     
              writer.startElement("option", this);
              writer.writeText(""+accountObj.getRegNo(), null);
              writer.endElement("option");
              writer.endElement("select");
              writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("select", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("name","accno","accno");
              writer.startElement("option", this);
              writer.writeText("Select", null);
              writer.endElement("option");
              for(int i=0;i<noOfAccounts;i++)
              accountObj=(Account) listOfAccounts.get(i);
              writer.startElement("option", this);
              writer.writeText(accountObj.getAccountNo(), null);
              writer.endElement("option");
              //writer.startElement("option", this);
              //writer.writeText("00200155", null);
              //writer.endElement("option");
              writer.endElement("select");
              writer.endElement("td");
              writer.startElement("td", this);
              button.encodeBegin(context);
             button.encodeChildren(context);
             button.encodeEnd(context);
            writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("input", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("type","text","text");
              writer.writeAttribute("name","startdate","startdate");
              writer.writeAttribute("value",startdate,startdate);
              writer.writeAttribute("readonly", "","");
              //writer.endElement("input");
              writer.endElement("td");
              writer.startElement("td", this);
              writer.startElement("input", this);
              if (style!=null)
                   writer.writeAttribute("style", style, null);
              writer.writeAttribute("type","text","text");
              writer.writeAttribute("name","enddate","enddate");
              writer.writeAttribute("value",enddate,enddate);
              writer.writeAttribute("readonly", "","");
              writer.endElement("td");
              writer.endElement("tr");
              writer.endElement("tbody");
              writer.endElement("table");
         public String getFamily() {
              return "HelloFamily";
         }

    NewEclipseCoder wrote:
    How to handle events for "Select"...if i choose option1 from select then one text box is to be displayed in custom component and if i choose another option then some other text box is to be displayed in custom components...Two ways:
    1) submit the form to the server and render the desired textbox depending on the option.
    or
    2) render all textboxes and use Javascript/DOM to display/hide them depending on the option.

  • Actionscript in a Custom Component

    Can anyone tell me if you can put actionscript inside of a
    custom component? It throws errors anytime I try to do it.
    I have a horizontallist component that is being populated
    with an itemrenderer which holds an image component. The
    horizontallist takes fifteen images and loads them into the
    itemrenderers, creating a scrollable image slideshow.
    I am trying to get it to check to see if the image loaded
    successfully, and if not, either set the visibility of that image
    component to false, or remove it.
    Here is the code for the horizontallist:
    <mx:HorizontalList
    id="imageBar"
    itemRenderer="listingImage"
    height="330"
    width="925"
    paddingLeft="5"
    paddingRight="5"
    rollOverColor="#FFFFFF"
    selectionColor="#FFFFFF"
    >
    And the code for the custom component.....
    <mx:Canvas
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="320"
    width="400"
    verticalScrollPolicy="off"
    horizontalScrollPolicy="off"
    >
    <mx:Image
    source="
    http://www.urladdress.com/idx/rmls/images/resimages/{data.id}_{data.imageNum}.jpg"
    height="300" scaleContent="true"
    />
    </mx:Canvas>
    I'm pretty new to Flex, so any help would be great!

    just insert the script tags in the custom component and place
    your actionscript within those script tags. So in your case just
    insert the following script tags above the image control...
    <mx:Script>
    <![CDATA[
    // actionscript goes here
    ]]>
    </mx:Script>
    - Tony

  • Execute UCM Service in custom component

    Hi ,
    I was looking for information how to execute the UCM service in custom component and found a couple of blogs regarding the same :
    http://jonathanhult.com/blog/2012/06/execute-a-service-from-a-java-filter/
    http://jonathanhult.com/blog/2012/10/who-created-that-site-studio-section/
    http://www.redstonecontentsolutions.com/5/post/2012/05/executing-a-service-from-aservicehandler.html#sthash.X31M6ZCS.tvlE83Km.dpbs
    I am new to webcenter content and couldn't understand above blog stuff properly. Queries :
    1. We may need to call the UCM service in filter, Service or ServiceHandler. Is there any difference in code required to execute a service ?
    2. What is the correct code to execute the UCM service ?

    Ad 1) the reason why the same service might be executed slightly differently from e.g. a filter or another service/service handler is that classes Service, ServiceHandler, and the interface FilterImplementor provide slightly different attributes. Note that you may also execute a service from iDocScript (via the executeService command - see http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c08_config_ref.htm#i1078100)
    Ad 2) There is no 'correct' or 'incorrect' way/ Simply, from a filter you will do it this way, and from a service that way. I think you should ask, what is the correct way to implement my custom service - should it be a filter? Or rather a service handler? Will I need Java, or is iDocScript enough? Unfortunately, you have not shared anything about what your component should do.

Maybe you are looking for