Values dinamically with custom components

Hi everyone, i have a problem with flex, i developed a main aplication in witch i have added a container (sesionGroup), also i did a custom component witch contains one button and one label. the main application creates several components dinamically using the custom component with values assigned dinamically by an external xml file, this is the code of the main application:
<?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/halo"
minWidth="1024" minHeight="768"
creationComplete="init()">
<fx:Declarations>
<s:HTTPService id="sesionService" url="PHPClases/sesiones.php"
resultFormat="object"  result="sesionService_resultHandler(event)"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import spark.components.VGroup;
public var grupoSesion:sesion;
public var cont:int=0;
[Bindable]
public var sesionDatos:ArrayCollection;
public function init():void
sesionService.send();
protected function sesionService_resultHandler(event:ResultEvent):voi   d
sesionDatos=event.result.sesiones.sesion;
var i:int=event.result.sesiones.sesion.getItemAt(0).fi  las;
while(cont<i)
grupoSesion=new sesion();
grupoSesion.nombreSesion=event.result.sesiones.ses   ion.getItemAt(cont).nombre;
grupoSesion.indexSesion=cont.toString();
grupoSesion.name=cont.toString();
grupoSesion.addEventListener(MouseEvent.CLICK,most  rarEventos);
sesionGroup.addElementAt(grupoSesion,cont);
cont++;
public function mostrarEventos(event:MouseEvent):void
Alert.show();
]]>
</fx:Script>
<s:VGroup id="sesionGroup" x="270" y="150">
<s:Label id="prueba"/>
</s:VGroup>
</s:Application>
And this is the code of the custom component
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" width="400"  height="20">
<fx:Script>
<![CDATA[
[Bindable]
public var nombreSesion:String;
[Bindable]
public var indexSesion:String;
]]>
</fx:Script>
<s:Button id="sesionButton"
label="{nombreSesion}"/>
<s:Label text="{indexSesion}"/>
</s:Group>
Like you can see i have added for each component one event clic, and i want that when a user clic one component the red alert of the main aplication shows him the value of the selected component, for example, if a user clic the first component it must show 0 (or 1), if the user clic the second component it must show 1 (or 2), etc. I have found other ways like getChilindex and others but those give me the same result for all the components, the value of the first or the last component.
If you can help me i thank you much, and thanks for your attention.

I've gotten to where it will display the model values but each tag's components are displaying the value of the first item in the data model.
It looks like there is only one instance of my custom component being constructed. Why would this be happening? I would think that for each row in the datatable, there would be one instance of my custom component. Here's the relevant fragment from the jsp.
<h:panelGrid id="anotherGrid" columns="1">
     <h:dataTable id ="TwoStringList" value="#{TwoStringList.model}" var="twoStringBean">
     <h:column>
          <myTags:twoString value="#{twoStringBean}"/>
     </h:column>
     <h:column>
          <h:commandButton value="#{twoStringBean.simpleResponse}"/>
     </h:column>
     </h:dataTable>
</h:panelGrid>
There is only one 'twoString' component created. The text for the command button is correctly displaying the simpleResponse field for the underlying model row to which it is bound. My component binds to the bean itself, not one of its fields. It does the work of setting the contained standard values.

Similar Messages

  • Subcontracting Flow with Customer Components

    Hi experts,
    I have tricky scenario in our project, that maybe you can help me to solve.The scenario is the following:
    1) Customer X, ask for Material 1
    2) Material 1, is produced by Vendor Y (Subcontractor).
    3) Material 1, has as component Material 2 and Material 3
    4) Material 2, is provided by another vendor Z.
    5) Material 3 is provided by Customer X, Free of Charge.
    6) Components are then sent to Subcontractor.
    This whole process is supported by Scheduling Agreements, which means, that we run MPS and MRP, and from Customer Demand, we get the information about how much we need from Vendor Y (for finished goods), Vendor Z for Material 2, and Customer X (also a Vendor) for Material 3.
    The stock of Material 3 should be non-valuated, since is not our property, but we are legally responsible for it (if pieces are lost, we have to pay the customer).
    The issue we have right now, is that, in order to have this requirement we had to setlle a Scheduling Agreement with 0,01 price...for Customer, when actually there is no price at all.
    We need to:
    1 - Manage Inventory of Customer Components
    2 - This Stock must be unvaluated
    3 - We need to plan how much of components need from Customer
    4 - We need a Free of Charge Order/Schedluling Agreement in order not to have a 0,01 residual value
    Did you have a similar situationbefore? How did you solve it? We thought in have a Vendor consigment, but anyway, we should pay when consuming the materials....and it is the same issue..
    I hope you can help me....Thank you very much in advace!
    Best Regards,
    Lucas

    Hi,
    1. Define your customer materials (both component and finished product) as non valuated material, because these materials not effecting the our inventory.
    2. create Bom for finished product.
    3. Create sales order for service charges with reference to your customer PO.
    4. Receive the component from your customer through 501 E (with out po sales order specific).
    5. Create Production order with reference to sales order through MRP or manual.
    6. confirm the production order and receive the
    finished product.
    7. Delivery to customer as in normal sales process.
    8. Then create performa invoice or billing to your customer.
    You can follow the above process, if have any further quarry please let me know.
    Subrahmanayam

  • Error while accessing application with custom components

    Hi experts,
    I have an application (HAP_MAIN_DOCUMENT) of component FPM_OIF_COMPONENT which uses a Webdynpro component with the same name (HAP_MAIN_DOCUMENT). This Webdynpro component (HAP_MAIN_DOCUMENT) uses 2 other components (HAP_DOCUMENT_BODY and HAP_DOCUMENT_HEADER).
    For my client requirement, i need to create the custom components by copying from standard components as the UI layout changes are quiet huge and not manageable with the enhancements. To accomodate this i have changed the standard configurations by replacing the standard web dynpro components with the custom ones copied. Apart fomr this there are no changes to the standard.
    While trying to access the application, i am getting the error as Null object reference. the details of the error is as below. Please advice.
    Portal Error
    Error when processing your request
    What has happened?
    The URL http://ddrsap12.dubal.domain:8001/sap/bc/webdynpro/sap/HAP_MAIN_DOCUMENT/ was not called due to an error.
    Note
    The following error text was processed in the system DSD : Access via 'NULL' object reference not possible.
    The error occurred on the application server ddrsap12_DSD_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: WDDOINIT of program /1BCWDY/LUR96POELQNL3TIUWPYS==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/LUR96POELQNL3TIUWPYS==CP
    Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
    Method: INIT of program CL_WDR_VIEW_MANAGER===========CP
    Method: INIT_CONTROLLER of program CL_WDR_INTERFACE_VIEW=========CP
    ST22 Dump Analysis
    Short text
        Access via 'NULL' object reference not possible.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "/1BCWDY/LUR96POELQNL3TIUWPYS==CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Information on where terminated
        Termination occurred in the ABAP program "/1BCWDY/LUR96POELQNL3TIUWPYS==CP" -
         in "WDDOINIT".
        The main program was "SAPMHTTP ".
        In the source code you have the termination point in line 4640
        of the (Include) program "/1BCWDY/B_LUXVEOR5WUW66V6QRRNU".
        Termination occurred in a Web Dynpro application
          Web Dynpro Component          ZWD_HAP_DOCUMENT_HEADER
          Web Dynpro Controller         VW_HEADER_MAIN
        The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
        procedure "WDDOINIT" "(METHOD)", but it was neither handled locally nor
         declared
        in the RAISING clause of its signature.
        The procedure is in program "/1BCWDY/LUR96POELQNL3TIUWPYS==CP "; its source
         code begins in line
        4619 of the (Include program "/1BCWDY/B_LUXVEOR5WUW66V6QRRNU ".
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
          Name
       33 METHOD       /1BCWDY/LUR96POELQNL3TIUWPYS==CP    /1BCWDY/B_LUXVEOR5WUW66V6QRRNU       4640
          CL_VW_HEADER_MAIN_CTR=>WDDOINIT
          Web Dynpro Component          ZWD_HAP_DOCUMENT_HEADER
          Web Dynpro Controller         VW_HEADER_MAIN
       32 METHOD       /1BCWDY/LUR96POELQNL3TIUWPYS==CP    /1BCWDY/B_LUXVEOR5WUW66V6QRRNU         70
          CLF_VW_HEADER_MAIN_CTR=>IF_WDR_VIEW_DELEGATE~WD_DO_INIT
          Web Dynpro Component          ZWD_HAP_DOCUMENT_HEADER
          Web Dynpro Controller         VW_HEADER_MAIN
       31 METHOD       CL_WDR_DELEGATING_VIEW========CP    CL_WDR_DELEGATING_VIEW========CM003     3
          CL_WDR_DELEGATING_VIEW=>DO_INIT
       30 METHOD       CL_WDR_CONTROLLER=============CP    CL_WDR_CONTROLLER=============CM00Q     3
          CL_WDR_CONTROLLER=>INIT_CONTROLLER
       29 METHOD       CL_WDR_VIEW===================CP    CL_WDR_VIEW===================CM00K     5
          CL_WDR_VIEW=>INIT_CONTROLLER
       28 METHOD       CL_WDR_CONTROLLER=============CP    CL_WDR_CONTROLLER=============CM002     7
          CL_WDR_CONTROLLER=>INIT
       27 METHOD       CL_WDR_VIEW_MANAGER===========CP    CL_WDR_VIEW_MANAGER===========CM008    70
          CL_WDR_VIEW_MANAGER=>GET_VIEW
       26 METHOD       CL_WDR_VIEW_MANAGER===========CP    CL_WDR_VIEW_MANAGER===========CM005    23
          CL_WDR_VIEW_MANAGER=>BIND_ROOT
       25 METHOD       CL_WDR_VIEW_MANAGER===========CP    CL_WDR_VIEW_MANAGER===========CM00B    17
          CL_WDR_VIEW_MANAGER=>INIT
       24 METHOD       CL_WDR_INTERFACE_VIEW=========CP    CL_WDR_INTERFACE_VIEW=========CM004    11
          CL_WDR_INTERFACE_VIEW=>INIT_CONTROLLER
       23 METHOD       CL_WDR_CONTROLLER=============CP    CL_WDR_CONTROLLER=============CM002     7
          CL_WDR_CONTROLLER=>INIT
       22 METHOD       CL_WDR_VIEW_MANAGER===========CP    CL_WDR_VIEW_MANAGER===========CM008    70
          CL_WDR_VIEW_MANAGER=>GET_VIEW
    Thanks in advance,
    Regards,
    Ravi.

    Hi ,
    How are you able to configure Custom Web dynpro application to Appraisal document instead of HAP_MAIN_DOCUMENT. could you please share the steps. We have created custom application a copy of HAP_MAIN_DOCUMENT and the other two webdynpro components are also copied.
    We dont know how to link this to Appraisal template. BADI HRHAP00_BSP_TMPL is used to change application names for BSP application. How to change application name for Web dynpro ABAP. Please share the stpes which will help us
    Thanks and Regards,
    Kothand

  • JSPs with custom components will not compile

    All,
    I have written a custom component, but am having trouble getting it to work. When i place it in a jsp or jspx and try to run the application using this control, i get compilation errors:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    [javac] C:\Sun\SDK\domains\domain1\generated\jsp\j2ee-modules\CPIDemo\org\apache\jsp\cpiMain_jsp.java:2053: cannot find symbol
    [javac] symbol : method setPageContext(javax.servlet.jsp.PageContext)
    [javac] location: class cpidemo.wpfRenderer
    [javac] jspxth_cpi_wpf_0.setPageContext(_jspx_page_context);
    [javac] ^
    Generated servlet error:
    [javac] C:\Sun\SDK\domains\domain1\generated\jsp\j2ee-modules\CPIDemo\org\apache\jsp\cpiMain_jsp.java:2054: cannot find symbol
    [javac] symbol : method setParent(javax.servlet.jsp.tagext.Tag)
    [javac] location: class cpidemo.wpfRenderer
    [javac] jspxth_cpi_wpf_0.setParent((javax.servlet.jsp.tagext.Tag) jspxth_webuijsf_panelLayout_2);
    [javac] ^
    Generated servlet error:
    [javac] C:\Sun\SDK\domains\domain1\generated\jsp\j2ee-modules\CPIDemo\org\apache\jsp\cpiMain_jsp.java:2063: cannot find symbol
    [javac] symbol : method doStartTag()
    [javac] location: class cpidemo.wpfRenderer
    [javac] int jspxeval_cpi_wpf_0 = jspxth_cpi_wpf_0.doStartTag();
    [javac] ^
    Generated servlet error:
    [javac] C:\Sun\SDK\domains\domain1\generated\jsp\j2ee-modules\CPIDemo\org\apache\jsp\cpiMain_jsp.java:2064: cannot find symbol
    [javac] symbol : method doEndTag()
    [javac] location: class cpidemo.wpfRenderer
    [javac] if (_jspx_th_cpi_wpf_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
    [javac] ^
    Generated servlet error:
    [javac] C:\Sun\SDK\domains\domain1\generated\jsp\j2ee-modules\CPIDemo\org\apache\jsp\cpiMain_jsp.java:2065: reuse(javax.servlet.jsp.tagext.Tag) in org.apache.jasper.runtime.TagHandlerPool cannot be applied to (cpidemo.wpfRenderer)
    [javac] jspxtagPool_cpi_wpf_ttlValue_rendered_paramList_formWidth_formScript_formName_formHeight_detID_nobody.reuse(_jspx_th_cpi_wpf_0);
    [javac] ^
    Generated servlet error:
    [javac] C:\Sun\SDK\domains\domain1\generated\jsp\j2ee-modules\CPIDemo\org\apache\jsp\cpiMain_jsp.java:2068: reuse(javax.servlet.jsp.tagext.Tag) in org.apache.jasper.runtime.TagHandlerPool cannot be applied to (cpidemo.wpfRenderer)
    [javac] jspxtagPool_cpi_wpf_ttlValue_rendered_paramList_formWidth_formScript_formName_formHeight_detID_nobody.reuse(_jspx_th_cpi_wpf_0);
    [javac] ^
    Generated servlet error:
    [javac] Note: C:\Sun\SDK\domains\domain1\generated\jsp\j2ee-modules\CPIDemo\org\apache\jsp\cpiMain_jsp.java uses unchecked or unsafe operations.
    Generated servlet error:
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 6 errors
    at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:94)
    at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:384)
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:461)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:528)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:507)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:530)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:850)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:697)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:532)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:465)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:353)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:413)
    at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:480)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:125)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    After fighting with this for a while, I tried the following:
    1) Copy code from a known-working example into the existing web app
    2) Copy the code for the component et al into the known working example app
    results:
    1) Known working component generates the same compilation errors
    2) everything work correctly
    I have compared the tlds and faces-config.xml files and everything appears to be correct. In both cases, the faces-config.xml files are at version 1.2 and the tlds are at version 2.1
    The only difference i can see is that the not-working web app uses far more libraries than the working example, though i'm not sure why this would be a problem.
    From the not working webapp:
    faces-config.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
    version="1.2">
    <!-- Set default locale and add supported locales here...
    <application>
    <locale-config>
    <default-locale>en</default-locale>
    <supported-locale>de</supported-locale>
    <supported-locale>fr</supported-locale>
    <supported-locale>es</supported-locale>
    </locale-config>
    </application>
    -->
    <component>
    <description>A wrapper for workplace forms viewer</description>
    <display-name>Embedded Form Viewer</display-name>
    <component-type>cpidemo.wpfRenderer</component-type>
    <component-class>cpidemo.wpfRenderer</component-class>
    </component>
    </faces-config>
    cpi.tld
    <?xml version="1.0" encoding="UTF-8"?>
    <taglib version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_1.xsd">
    <tlib-version>1.0</tlib-version>
    <short-name>cpi</short-name>
    <uri>http://www.etechway.com/cpi</uri>
    <!-- A validator verifies that the tags are used correctly at JSP
    translation time. Validator entries look like this:
    <validator>
    <validator-class>com.mycompany.TagLibValidator</validator-class>
    <init-param>
    <param-name>parameter</param-name>
    <param-value>value</param-value>
         </init-param>
    </validator>
    -->
    <!-- A tag library can register Servlet Context event listeners in
    case it needs to react to such events. Listener entries look
    like this:
    <listener>
    <listener-class>com.mycompany.TagLibListener</listener-class>
    </listener>
    -->
    <tag>
    <name>wpf</name>
    <tag-class>cpidemo.wpfRenderer</tag-class>
    <body-content>empty</body-content>
    <attribute>
    <description>A value binding that points to a bean property</description>
    <name>binding</name>
    <deferred-value>
    <type>javax.faces.component.UIComponent</type>
    </deferred-value>
    </attribute>
    <attribute>
    <name>formName</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    <deferred-value>
    <type>String</type>
    </deferred-value>
    </attribute>
    <attribute>
    <name>rendered</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    <deferred-value>
    <type>boolean</type>
    </deferred-value>
    </attribute>
    <attribute>
    <name>formScript</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    <deferred-value>
    <type>String</type>
    </deferred-value>
    </attribute>
    <attribute>
    <name>detID</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    <deferred-value>
    <type>String</type>
    </deferred-value>
    </attribute>
    <attribute>
    <name>ttlValue</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    <deferred-value>
    <type>String</type>
    </deferred-value>
    </attribute>
    <attribute>
    <name>formHeight</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    <deferred-value>
    <type>String</type>
    </deferred-value>
    </attribute>
    <attribute>
    <name>formWidth</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
    <deferred-value>
    <type>String</type>
    </deferred-value>
    </attribute>
    <attribute>
    <name>paramList</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    <deferred-value>
    <type>String</type>
    </deferred-value>
    </attribute>
    </tag>
    </taglib>
    can anyone give me a nudge in the right direction here?
    Thanks in advance!!

    [javac] C:\Sun\SDK\domains\domain1\generated\jsp\j2ee-modules\CPIDemo\org\apache\jsp\cpiMain_jsp.java:2053: cannot find symbol
    [javac] symbol : method setPageContext(javax.servlet.jsp.PageContext)
    [javac] location: class cpidemo.wpfRenderer
    [javac] jspxth_cpi_wpf_0.setPageContext(_jspx_page_context);
    [javac] ^
    Assuming cpidemo.wpfRenderer is your class, does it have the method referenced above?

  • Variable multiple single value filled with customer exit used in FOX form.

    Hi guys, I definitly need your help in the following scenario:
    I have variable (multiple single value) filled in a customer exit and use it in web template. There it is used in the drop down box for selecting a special date in the analysis item. And there comes the first question:Why the results from the customer exit are written in the way "date1; date2; date3" in one line? They should appear line by line in rows. How can I influence that? I tried both data binding types, "variable" and "characteristic".
    Now a button raises a planning function with a fox formula which should write the selected date (from the drop down box) in a customer table using "call function".
    I always get the error, that I need to restrict the variable to "single value". Why do I have to do that and if necessary how can I do that? Other planning functions without the fox formula also work properly with using the selection from the drop down box.
    I appreciate you help.
    Kind regards, Anja.

    Hi Vamsi.,
    Try this code.
    WHEN 'PREVIOUS_YEAR_1'.
    IF I_STEP = 2. "after the popup of user entry
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZCURRENT_YEAR_PERIOD'.
    break-point.
    IF SY-SUBRC EQ 0.
    WA_YEAR = LOC_VAR_RANGE-LOW+0(4). "Year
    WA_MONTH = LOC_VAR_RANGE-LOW+5(3). "Period
    WA_YEAR = WA_YEAR - 1.
    CONCATENATE WA_YEAR wa_month INTO WA_FISC_PERD .
    CONCATENATE WA_YEAR WA_MONTH1 INTO L_S_RANGE-HIGH .
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    ENDIF.
    ENDLOOP.
    endif.
    Assing points if it helps you.
    -- Selva

  • Using Custom Converters with Custom Components?

    Hi,
    I have written a Custom component. I wanted to attach Custom Converters and Custom Validators to this component.
    <custom:comp1 id="test" rendered="true" size="20" value="#{bean1.val}"/>
    I have written the following code in Custom Component class
    public class CustomComponent1 extends UIInput{
    public CustomComponent1(){
    super();
    setConverter(new CustomConverter());
    Converter converter = getConverter();
    if(converter == null){
    addValidator(new CustomValidator());
    @Override
    public String getFamily(){
    return "CCFamily";
    The Validator is working fine, but the converter is not. Please suggest.

    I have tried like this as well as we do for a standard component.
    <<faces-config.xml>>
    <converter>
    <description>
    Converter for credit card
    numbers that normalizes
    the input to a standard format
    </description>
    <converter-id>LongConverter</converter-id>
    <converter-class>
    com.wellpoint.converter.CustomConverter
    </converter-class>
    </converter>
    <custom:comp1 id="test" rendered="true" size="20" value="#{bean1.val}">
    <f:converter converterId="LongConverter"/>
    </custom:comp>
    But, this also did not work for me. Please suggest.

  • Customs components are not updated on the scene

    Hello!
    i am working on a simple component, it is a movie clip.
    On each frames I have a label and an icon.
    In the component properties I set up a list where every itemshas the same title as the frames's labels.
    With this component I can set any icon I want by selecting it in the list.
    This is working fine and I am pretty happy about it.
    The Problem:
    If I change the name of one item in the list, add one or even reorder the list, the changes are not applied on all the components presents on the scene.
    and I have more or less 50 of thoses components in my scene...
    Is there a way to have the components updated ? Or at least update manually all the "old" components?
    this issue occure with Flash CS5 and CS6 all my doccuments are made in AS3.
    thanks a lot !

    Hello guys,
    Does anybody have the same issue with customs components?

  • Building JSF 1.2 Custom Components with EL and standard components

    Hi all,
    I have built custom components in jsf 1.1 with great success but i am finding replicating the same functionality in jsf 1.2 very difficult. I have some conditions for my new custom component.
    - Using jsf 1.2
    - Must use unified EL, i am using a UIComponentELTag
    - iam using jsf standard html components from javax.faces.component.html here in particular i wont HtmlCommandLink.
    Essentially i am constructing a real time command menu. I have a backing bean from which i get command names and descriptions values. I wont to then in real time construct a table of links (using HtmlCommandLink) - all this work is to be processed by a custom component. Basically the commandLink issues a command in my backing bean, a parameter (param) is passed with the commandLink, this is later picked up in the backing bean method.
    I can generate the table, and all the HtmlCommandLinks, i have simply looped throught and encoded each of them.
    What i can do: i can see the table and the HtmlCommandLinks, but the links dont perform any action when i press them.
    What i want help with:
    I want to encode a HtmlCommandLink in my custom component with a param, traditionally i would set the action but this is now deprecated, and i need to use the setActionExpression method. I have tried to do this but the actions are note fired its simply doesnt function.
    Note:
    In jsf 1.1 I use to loop through all the HtmlCommandLink and peform their processDecodes method within my custom components very own processDecodes. The same in jsf 1.2 doesnt seem to yield any results.
    Can someone give be an example or solution to this? I have read articles on the net and they seem to all discuss jsf 1.1 which i have done and it works, but i am using unifed EL and jsf 1.2 now.
    Many Thanks,
    Kev

    Hi all,
    I have built custom components in jsf 1.1 with great success but i am finding replicating the same functionality in jsf 1.2 very difficult. I have some conditions for my new custom component.
    - Using jsf 1.2
    - Must use unified EL, i am using a UIComponentELTag
    - iam using jsf standard html components from javax.faces.component.html here in particular i wont HtmlCommandLink.
    Essentially i am constructing a real time command menu. I have a backing bean from which i get command names and descriptions values. I wont to then in real time construct a table of links (using HtmlCommandLink) - all this work is to be processed by a custom component. Basically the commandLink issues a command in my backing bean, a parameter (param) is passed with the commandLink, this is later picked up in the backing bean method.
    I can generate the table, and all the HtmlCommandLinks, i have simply looped throught and encoded each of them.
    What i can do: i can see the table and the HtmlCommandLinks, but the links dont perform any action when i press them.
    What i want help with:
    I want to encode a HtmlCommandLink in my custom component with a param, traditionally i would set the action but this is now deprecated, and i need to use the setActionExpression method. I have tried to do this but the actions are note fired its simply doesnt function.
    Note:
    In jsf 1.1 I use to loop through all the HtmlCommandLink and peform their processDecodes method within my custom components very own processDecodes. The same in jsf 1.2 doesnt seem to yield any results.
    Can someone give be an example or solution to this? I have read articles on the net and they seem to all discuss jsf 1.1 which i have done and it works, but i am using unifed EL and jsf 1.2 now.
    Many Thanks,
    Kev

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

  • Issue with SSIS Custom Components - 64 bit SQL 2012

    Hello All,
    Our SSIS packages built on SQL 2008 R2 make use of some custom components. These custom components are installed as part of an MSI. The dll's are copied over to the Windows/assemble [GAC Folder] and also to the Program Files(x86)/SQL Server/110/DTS/* folder.
    The installation does not copy the dll's to the 64 bit program files folder.
    X:\Program Files\Microsoft SQL Server\110\DTS
    These packages are executed via SQL Agent jobs on a 64 bit SQL server and there does not seem be any issue.
    Now we are upgrading our servers to SQL 2012 and we have a new installer for the custom components as well. The new custom components use .NET Framework 4.0 and when installed the dll files get copied over to the Ms.NET 32 bit runtime GAC folder and also
    to the SQL Server DTS Folder in x86. The upgraded packages work only when we set the runtime mode to 32 bit. The packages successfully executes within the 32 bit dtexec utility, but when we try to run the same package using a 64 bit dtexec utility the
    process errors out with a component failed to load message. The package moves data between two SQL Server instances.
    The custom components have always been built for 32 bit runtime. I can run a older package through the dtexec utility (from the 64 bit folder in program files) and it does work without any issues. After the upgrade the package will only execute on
    a 32 bit utility. can someone help me understand this issue?
    Regards, Dinesh

    Thank you Arthur.
    i think we got the answer as well, as the .NET framework 3.0 installer copied the files over to the C:\windows assembly the dtexec utility [32 bit/64 bit] was able to load the components.
    Now with the new installer the files are copied to specific runtime gac folders as Arthur has mentioned. The 64  bit  utility does not find the dlls in the GAC whereas the 32 bit version will find them.
    Regards, Dinesh

  • How Can I replace newScale Text Strings with Custom Values?

    How Can I replace newScale Text Strings with Custom Values?
    How can I replace newScale text strings with custom values?
    All  newScale text is customizable. Follow the procedure below to change the  value of any text string that appears in RequestCenter online pages.
    Procedure
    1. Find out the String ID of the text string you would like to overwrite by turning on the String ID display:
    a) Navigate to the RequestCenter.ear/config directory.
    b) Open the newscale.properties file and add the following name-value pair at the end of the file:res.format=2
    c) Save the file.
    d) Repeat steps b and c for the RmiConfig.prop and RequestCenter.prop files.
    e) Stop and restart the RequestCenter service.
    f) Log  in to RequestCenter and browse to the page that has the text you want  to overwrite. In front of the text you will now see the String ID.
    g) Note down the String ID's you want to change.
    2. Navigate to the directory: /RequestCenter.ear/RequestCenter.war/WEB-INF/classes/com/newscale/bfw.
    3. Create the following sub-directory: res/resources
    4. Create the following empty text files in the directory you just created:
    RequestCenter_0.properties
    RequestCenter_1.properties
    RequestCenter_2.properties
    RequestCenter_3.properties
    RequestCenter_4.properties
    RequestCenter_5.properties
    RequestCenter_6.properties
    RequestCenter_7.properties
    5. Add the custom text strings to the appropriate  RequestCenter_<Number>.properties file in the following manner  (name-value pair) StringID=YourCustomTextString
    Example: The StringID for "Available Work" in ServiceManager is 699.
    If you wanted to change "Available Work" to "General Inbox", you  would add the following line to the RequestCenter_0.properties file
         699=General Inbox
    Strings are divided into the following files, based on their numeric ID:
    Strings are divided into the following files, based on their numeric ID:
    String ID  File Name
    0 to 999 -> RequestCenter_0.properties
    1000 to 1999 -> RequestCenter_1.properties
    2000 to 2999 -> RequestCenter_2.properties
    3000 to 3999 -> RequestCenter_3.properties
    4000 to 4999 -> RequestCenter_4.properties
    5000 to 5999 -> RequestCenter_5.properties
    6000 to 6999 -> RequestCenter_6.properties
    7000 to 7999 -> RequestCenter_7.properties
    6. Turn off the String ID display by removing (or commenting out) the line "res.format=2" from the newscale.properties, RequestCenter.prop and RmiConfig.prop files
    7. Restart RequestCenter.
    Your customized text should be displayed.

    I've recently come across this information and it was very helpful in changing some of the inline text.
    However, one place that seemed out of reach with this method was the three main buttons on an "Order" page.  Specifically the "Add & Review Order" button was confusing some of our users.
    Through the use of JavaScript we were able to modify the label of this button.  We placed JS in the footer.html file that changes the value of the butt

  • Error while accessing application with the custom components

    Hi experts,
    I have an application (HAP_MAIN_DOCUMENT) of component FPM_OIF_COMPONENT which uses a Webdynpro component with the same name (HAP_MAIN_DOCUMENT). This Webdynpro component (HAP_MAIN_DOCUMENT) uses 2 other components (HAP_DOCUMENT_BODY and HAP_DOCUMENT_HEADER). For my client requirement, i need to create the custom components by copying from standard components as the UI layout changes are quiet huge and not manageable with the enhancements. To accomodate this i have changed the standard configurations by replacing the standard web dynpro components with the custom ones copied. Apart fomr this there are no changes to the standard.
    While trying to access the application, i am getting the error as Null object reference.
    the details of the error is as below. Please advice.
    Heading 1: h1. P:ortal Error
    The URL http://******************/sap/bc/webdynpro/sap/HAP_MAIN_DOCUMENT/ was not called due to an error.
    Note
    The following error text was processed in the system DSD : Access via 'NULL' object reference not possible.
    The error occurred on the application server ddrsap12_DSD_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: WDDOINIT of program /1BCWDY/LUR96POELQNL3TIUWPYS==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/LUR96POELQNL3TIUWPYS==CP
    Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
    Method: INIT of program CL_WDR_VIEW_MANAGER===========CP
    Method: INIT_CONTROLLER of program CL_WDR_INTERFACE_VIEW=========CP
    Heading 2: h2. ST22 - Dump Analysis
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
         caught in
        procedure "WDDOINIT" "(METHOD)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component.
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    Information on where terminated
        Termination occurred in the ABAP program "/1BCWDY/LUR96POELQNL3TIUWPYS==CP" -
         in "WDDOINIT".
        The main program was "SAPMHTTP ".
        In the source code you have the termination point in line 4640
        of the (Include) program "/1BCWDY/B_LUXVEOR5WUW66V6QRRNU".
        Termination occurred in a Web Dynpro application
          Web Dynpro Component          ZWD_HAP_DOCUMENT_HEADER
          Web Dynpro Controller         VW_HEADER_MAIN
        The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
        procedure "WDDOINIT" "(METHOD)", but it was neither handled locally nor
         declared
        in the RAISING clause of its signature.
        The procedure is in program "/1BCWDY/LUR96POELQNL3TIUWPYS==CP "; its source
         code begins in line
        4619 of the (Include program "/1BCWDY/B_LUXVEOR5WUW66V6QRRNU ".
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
          Name
       33 METHOD       /1BCWDY/LUR96POELQNL3TIUWPYS==CP    /1BCWDY/B_LUXVEOR5WUW66V6QRRNU       4640
          CL_VW_HEADER_MAIN_CTR=>WDDOINIT
          Web Dynpro Component          ZWD_HAP_DOCUMENT_HEADER
          Web Dynpro Controller         VW_HEADER_MAIN
       32 METHOD       /1BCWDY/LUR96POELQNL3TIUWPYS==CP    /1BCWDY/B_LUXVEOR5WUW66V6QRRNU         70
          CLF_VW_HEADER_MAIN_CTR=>IF_WDR_VIEW_DELEGATE~WD_DO_INIT
          Web Dynpro Component          ZWD_HAP_DOCUMENT_HEADER
          Web Dynpro Controller         VW_HEADER_MAIN
       31 METHOD       CL_WDR_DELEGATING_VIEW========CP    CL_WDR_DELEGATING_VIEW========CM003     3
          CL_WDR_DELEGATING_VIEW=>DO_INIT
       30 METHOD       CL_WDR_CONTROLLER=============CP    CL_WDR_CONTROLLER=============CM00Q     3
          CL_WDR_CONTROLLER=>INIT_CONTROLLER
       29 METHOD       CL_WDR_VIEW===================CP    CL_WDR_VIEW===================CM00K     5
          CL_WDR_VIEW=>INIT_CONTROLLER
       28 METHOD       CL_WDR_CONTROLLER=============CP    CL_WDR_CONTROLLER=============CM002     7
          CL_WDR_CONTROLLER=>INIT
       27 METHOD       CL_WDR_VIEW_MANAGER===========CP    CL_WDR_VIEW_MANAGER===========CM008    70
          CL_WDR_VIEW_MANAGER=>GET_VIEW
       26 METHOD       CL_WDR_VIEW_MANAGER===========CP    CL_WDR_VIEW_MANAGER===========CM005    23
          CL_WDR_VIEW_MANAGER=>BIND_ROOT
       25 METHOD       CL_WDR_VIEW_MANAGER===========CP    CL_WDR_VIEW_MANAGER===========CM00B    17
          CL_WDR_VIEW_MANAGER=>INIT
       24 METHOD       CL_WDR_INTERFACE_VIEW=========CP    CL_WDR_INTERFACE_VIEW=========CM004    11
          CL_WDR_INTERFACE_VIEW=>INIT_CONTROLLER
       23 METHOD       CL_WDR_CONTROLLER=============CP    CL_WDR_CONTROLLER=============CM002     7
          CL_WDR_CONTROLLER=>INIT
       22 METHOD       CL_WDR_VIEW_MANAGER===========CP    CL_WDR_VIEW_MANAGER===========CM008    70
          CL_WDR_VIEW_MANAGER=>GET_VIEW
    Thanks In advance,
    Regards,
    Ravi.

    Hi, I'm closing this thread and opening the same in another as the content got pasted in reader un friendly format and i'm unable to change the format.
    Thanks,
    Ravi.

  • Does Apple Numbers allow pop-up menu values to be overwritten with custom values?

    Hi team,
    I've built a s/s in Excel with Drop-down lists.  I can select from the list, a value as required.  I can change it by reselecting from the list or I make it a value other than what is in the list, just by overtyping  the value.
    In Numbers '09 v2.1 (436) I can create the pop-up menus as required and they work fine; however, I cannot edit the cell to insert a custom value.
    The s/s is used on an iPad to provide a form selection with specified options.  Now we need to provide a form with custom measurements.
    How do I override the selected value and insert an custom value?
    Failing a solution to Numbers; is there any way to use an Excel spreadsheet with data lookups on an iPad.   Or is there a forms design package which will achieve the same thing?
    Cheers
    Bernard

    You can edit a pop-up using the cells inspector:
    There are no dynamic pop-ups.
    For more details regarding this feature review the free Numbers Users' guide which you can download here:
    http://support.apple.com/manuals/#productivitysoftware

  • Mixing Components with Custom Drawing

    I have to come up with a JPanel where components are drawn
    in a certain order but! they are interlaced with custom drawing.
    A JLayeredPane wont work because the JPanel always draws itself
    (and the custom drawing in paintComponent()) before it draws the children.
    Overriding paintChildren doesnt work and neither does the disasterous:
    paintComponent(Graphics g){
    super...
    jcomponent.paint(g);
    which results in:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.BufferStrategyPaintManager.flushAccumulatedRegion(BufferStrategyPaintManager.java:406)
    at javax.swing.BufferStrategyPaintManager.endPaint(BufferStrategyPaintManager.java:370)
    How would a system like this work?
    jpanel.paint(g) -->
    component1.paint(g)
    custom drawing with g
    component2.paint(g)
    custom drawing with g

    The get/setComponentZOrder methods are new in j2se 1.5
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class OverPaint extends JPanel {
        public OverPaint() {
            setPreferredSize(new Dimension(400,400));
            setLayout(null);
            addComponents();
            setZOrder();
            //checkDepths();
        private void addComponents() {
            // key:  panel color           layer disc color      r  c
            addPanel(Color.red,            Color.green.darker(), 0, 0);
            addPanel(Color.green.darker(), Color.magenta,        0, 1);
            addPanel(Color.blue,           Color.red,            1, 0);
            addPanel(Color.orange,         Color.cyan,           1, 1);
        private void addPanel(Color c1, Color c2, int row, int col) {
            JPanel panel = new JPanel();
            panel.setBackground(c1);
            panel.setBorder(BorderFactory.createEtchedBorder());
            int w = 150;
            int h = 150;
            Dimension d = getPreferredSize();
            double xInc = (d.width  - (2*w))/3.0;
            double yInc = (d.height - (2*h))/3.0;
            int x = (int)(xInc + col*(w+xInc));
            int y = (int)(yInc + row*(h+yInc));
            panel.setBounds(x, y, w, h);
            add(panel);
            // Each layer covers its companion panel.
            addLayerComponent(panel, c2);
        private void addLayerComponent(JPanel panel, Color color) {
            LayerComponent layer = new LayerComponent(panel, color);
            Dimension d = getPreferredSize();
            layer.setBounds(0, 0, d.width, d.height);
            add(layer);
        private void setZOrder() {
            Component[] c = getComponents();
            for(int j = c.length-1, k = 0; j >= 0; j--, k++) {
                setComponentZOrder(c[j], k);
        private void checkDepths() {
            Component[] c = getComponents();
            for(int j = 0; j < c.length; j++) {
                Component comp = c[j];
                Color color = comp.getBackground();
                int depth = getComponentZOrder(comp);
                System.out.printf("c[%d] depth = %d  color = [%d, %d, %d]%n",
                                  j, depth, color.getRed(), color.getGreen(),
                                  color.getBlue());
        public boolean isOptimizedDrawingEnabled() {
            return false;
        public static void main(String[] args) {
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new OverPaint());
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    class LayerComponent extends JComponent {
        JPanel companion;
        Color color;
        Ellipse2D.Double e;
        public LayerComponent(JPanel p, Color c) {
            companion = p;
            color = c;
        protected void paintComponent(Graphics g) {
            if(e == null)
                initE();
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(color);
            g2.fill(e);
        private void initE() {
            Rectangle r = getBounds();
            double cx = r.getCenterX();
            double cy = r.getCenterY();
            Rectangle cb = companion.getBounds();
            double x = cb.getCenterX();
            double y = cb.getCenterY();
            double distance = Point2D.distance(cx, cy, x, y);
            int maxDepth = getParent().getComponentCount();
            int depth = getParent().getComponentZOrder(this);
            double scale = (double)depth / ((maxDepth-2)*2);
            double radius = distance/2 + scale*distance;
            e = new Ellipse2D.Double(cx-radius, cy-radius,
                                     2*radius, 2*radius);
            //System.out.printf("depth = %d  scale = %5.3f  " +
            //                  "radius = %5.1f  distance = %5.1f%n",
            //                   depth, scale, radius, distance);
    }

  • Can I dinamicly load a class with custom class loader ?

    Can I dinamicly load a class with custom class loader ?

    Hi,
    I was wondering if you found answer to your question, and also were you using your custom class loader inside a signed applet as I am in a similar situation, and was wondering if you could help me. An example would be great...
    Thanks a lot.
    Regards.

Maybe you are looking for

  • How to add byte[] array based Image to the SQL Server without using parameter

    how to add byte[] array based Image to the SQL Server without using parameter.I have a column in table with the type image in sql and i want to add image array to the sql image column like below: I want to add image (RESIM) to the procedur like shown

  • Query in regard to different datas in SD

    Dear Friends, May be this is a simple question...I am not exactly clear about the difference of all the 3 tables in LO Cockpit. Could somebody explain me clearly with examples stating: What is Document Header, Document Item and Document Schedule line

  • Can't get some videos into Movies folder

    I have a bunch of mp4 and mpeg video clips that will not import into my Movie file in iTunes. Most are clips from the internet and some are podcast videos. Is there a conversion I need to do to see them in the Movie file (ie in the iTunes library on

  • My macbook air keeps getting adds on every website

    I have a 2014 macbook air and every time I go onto a website on safari an add pops up in another window when I click on a link on the website(the links I click on are not adds). I close out of the adds multiple times and they still keep popping up. M

  • Directory Status on Login window slow to go green but not on Airport!

    Dear everyone, I have a 10.6.2 server with a mix of 10.5 and 10.6 clients on a Gigabit LAN and some on Airpot 802.11n wireless. I like to display the Directory Status at the login screen but the computers on the wired Gigabit LAN can take about 60-12