Jsf custom component issue

I am creating a custom component and extending the renderer like the following. My custon component is similar to h:messages but inaddition to that it has hyperlink(clicking error focuses individual input box). I have extended the renderer as follows, every thing works fine but the problem is the form gets null or looses its all value when error occured, however the component works fine. I dont know why is that hapening.
Any help would be highly appreciated.
public class CustomErrorRenderer extends Renderer {
@Override
public void encodeEnd(FacesContext context,
UIComponent component) throws IOException {
ResponseWriter writer = context.getResponseWriter();
writer.startElement("div", component);
writer.writeAttribute("id", component.getClientId(context), "id");
writer.writeAttribute("style", "color: red", null);
writer.startElement("ul", null);
Iterator<String> clientIds = context.getClientIdsWithMessages();
while (clientIds.hasNext()) {
String clientId = clientIds.next();
Iterator<FacesMessage> messages = context.getMessages(clientId);
if (!messages.hasNext()) { continue; }
String javaScript = "var field = document.getElementById('"
+clientId+ "');" +"if(field == null) return false;"+
"field.focus(); return false;";
writer.startElement("li", null);
writer.startElement("a", null);
writer.writeAttribute("onclick", javaScript, null);
writer.writeAttribute("href", "#", null);
while (messages.hasNext()) {
writer.writeText(messages.next().getSummary(), null);
writer.endElement("a");
writer.endElement("li");
writer.endElement("ul");
writer.endElement("div");
}

The problem is, the form values that are tied to input boxes are null once validation error occurs.
I think when I am overriding that encodeEnd, this is causing the problem for the form values getting null.
IF I want to see, what are the submitted values then isn't this the way, I am getting null here also:
          FacesContext context = FacesContext.getCurrentInstance();     
              UIViewRoot viewRoot= context.getViewRoot();
             HtmlInputText input = (HtmlInputText)viewRoot.findComponent("formId:InputboxId");
          System.out.println("input  sub value" + input.getSubmittedValue());

Similar Messages

  • Custom component issue

    Custom component issue
    According to customer requirements, we want to get such an effect in the development of custom components:
    Drag and drop custom components to the Flex builder work area, it can generate more than the default properties, not just generate "x", "y" attribute.
    【Details are as follows】
    We design a custom panel "CustomPanel.mxml" in the project development, then drag it into the workspace in the Flex builder development environment.
    View the source code found that it can only generate "x", "y" attribute in default. That is:
    <ns2:CustomPanel x="105" y="74">
    </ns2:CustomPanel>
    【Issue】
    How can we do that when drag the 'custom component' into Flex builder workspace,  we can generate "layout" attribute in addition to "x", "y" attributes?
    That is:
    <ns2:CustomPanel x="105" y="74" layout="absolute">
    </ns2:CustomPanel>
    【Note】
    The following code will be generated when the "panel component comes with Flex builder environment" is dragged into workspace.
    <mx:Panel x="121" y="134" width="250" height="200" layout="absolute">
    </mx:Panel>
    How it is done?

    I am sorry to bother you again.
    I have tried the web site content, but it can't helped!
    There is a custom component called 'Basket', source code is as follows:
    package picnic
    import mx.containers.Panel;
    public class Basket extends Panel
      public function Basket()
       super();
       layout = "vertical";
       setStyle("backgroundColor", 0x00FFFF);
       setStyle("horizontalAlign", "center");
    Here it is worked when the attribute "layout" is set to "vertical", but it isn't when "layout" is set to "absolute" !
    When the property is set to "absolute" phenomenon is as follows:
    Drag component such as 'Button' into "picnic component". It will automatically go to the top left corner position,
    just like the 'layout-attribute' is not set.
    Why is there such a phenomenon?

  • Can't instantiate JSF Custom Component

    I'm hoping some of you expert (or at least seasoned) JSF custom component developers might be able to lend some insight into the "Can't instantiate class" problem. I have a custom component which extends another component (which happens to be Oracle ADF's panelGroup), and I've verified that everything is in place:
    1. Component class uses correct component type referenced by faces-config.xml and tag class
    2. Renderer type referenced in faces-config.xml matches that of the renderer type in component class
    3. There is a default constructor (no args) for the component class, which also sets the renderer type
    4. TLD with tag is correct
    All classes are definitely in the classpath, as I have another custom component in the same packages which loads and is used just fine.
    Any ideas would be appreciated.
    Thanks,
    Shawn Bertrand
    Tyco Electronics

    So, is no one else having any problems when using the new JSF components from Java Studio Creator 2 in their existing projects? I can make simple projects in Creator and run them on PointBase and Tomcat and can deploy and run from Eclipse using MyEclipse but I cannot get my existing project working and I am wondering if their is some sort of conflict between the new JSF components and legacy Struts stuff in that project or if perhaps Spring is someone interferering. Kind of at a loss right now...

  • JSF custom component

    Hi
    I have created a JSF cutom component , which has some javascript files. If i use the component within the same project my path for accessing the JS files is :- js/task.js (Its in public/html folder) .
    My problem is that when I use this custom component in some other project i am not able to access the js file ( Js file are deployed with other source file in ADF Library Jar) . As I have to hard code the path of JS files in the render can any one please tell me what will be the path for accessing the JS files.
    i heard ADFLibraryFilter is used for the purpose. Anyone please shed more light on it.

    Thanx Frank for your help .
    I am generating html from the rendererm, in the encodeBegin method i have now written <script type="text/javascript" src="adflibResources/js/task.js"></script>
    But still the script isn't loading on the page
    I added the following code in web.xml but Jdeveloper (Studio Edition Version 11.1.1.1.0) is complaining that "refernce oracle.adf.library.webapp.LibraryFilter and oracle.adf.library.webapp.ResourceServlet not found. I am using Fusion Web Application (ADF) as the application template.
    <filter>
    <filter-name>ADFLibraryFilter</filter-name>
    <filter-class>oracle.adf.library.webapp.LibraryFilter</filter-class>
    <init-param>
    <param-name>provider-lazy-inited</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ADFLibraryFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>adflibResources</servlet-name>
    <servlet-class>oracle.adf.library.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>adflibResources</servlet-name>
    <url-pattern>/adflib/*</url-pattern>
    </servlet-mapping>

  • 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

  • Validation Error - JSF Custom Component

    I am trying to create a Custom Component. It is a pre-populated list of selection items. So all that the page author would have to do is use a tag like
    <jsfcust:mySelectOneComponent  value="#{requestScope.selectedItem}/>and this should display a drop-down list from which only one item can be selected. I got this working except for the final stretch.
    I created the following...
    1. tag in the .tld file
    2. CustSelectOneTag.java (set the value as a ValueBinding in setProperties() method)
    3. CustSelectComponent.java
    4. CustSelectRenderer.java (In the decode() method, called setSubmittedValue(value) on the component)
    5. updated the faces-config.xml file
    The display seems to be working fine. The problem is when I click on a Submit button and go to the next page where I want to display the selected value. It shows up as null. All that I want to do is be able to select an item from the custom drop down and display it in the next page after hitting submit.
    What is the proper way to send the value back in the response? In my case, I was merely trying to pass the value so that the next page can access it from the request scope and display it.
    I was not sure if I had to implement the getConvertedValue() method in my renderer. Can someone help?
    Thanks,
    JM

    Thanks for your reply! Your answer fixed my problems, so definitely thanks! I need to use escaped values for things like "<,&,#, etc", like the pound "amp" semicolon stuff. If I try to type out strings like these the forum unescapes them - fun part of posting forum questions about HTML escaping on HTML-based forums! :) I didn't realize an escaped querystring would still work as expected in a <a href ... />. You actually fixed both of my problems, and I... I do feel appropriately foolish now :) Had a feeling this might be a slaps forehead one. Thanks for the quick answer!,
    Jim

  • 1st jsf custom component.. getting nullpointer Ex, what's wrong?

    hi guys
    I'm following this ex to create a custom component
    http://today.java.net/pub/a/today/2004/07/16/jsfcustom.html
    but I'm having problems like
    java.lang.NullPointerException
         at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
         at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
         at org.apache.jsp.Simple_jsp._jspx_meth_f_view_0(org.apache.jsp.Simple_jsp:114)
         at org.apache.jsp.Simple_jsp._jspService(org.apache.jsp.Simple_jsp:89)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)do you know what's the problem
    thanks ;)

    hi guys
    I'm following this ex to create a custom component
    http://today.java.net/pub/a/today/2004/07/16/jsfcustom.html
    but I'm having problems like
    java.lang.NullPointerException
         at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
         at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
         at org.apache.jsp.Simple_jsp._jspx_meth_f_view_0(org.apache.jsp.Simple_jsp:114)
         at org.apache.jsp.Simple_jsp._jspService(org.apache.jsp.Simple_jsp:89)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)do you know what's the problem
    thanks ;)

  • JSF custom component: value not binding to component

    I have a custom UIInput component which is not able to bind to the value of the component from a backing bean. Here is the JSF code snippet:
    <tw:validateInputText id="locationIdStopInput" table="location" column="location" styleClass="wideSingleInput" value="#{currentStop.customer.customer}" rendered="#{loadTypeView.renderWarehouse or (currentStop.stopNumber gt 1 and loadTypeView.renderOutbound) or (currentStop.stopNumber eq 1 and loadTypeView.renderInbound)}"/>
    tw is the custom tag and validateInputText is the custom UiInput component.
    On posting the form the decode method is not able to get the value from the requestParameter map. Following is the decode() I wrote:
    public void decode(FacesContext context,
    UIComponent component) {
    // assertValidInput(context, component);
    if (context == null || component == null) {
    throw new NullPointerException();
    ValidateInputTextComponent map = (ValidateInputTextComponent) component;
    String key = map.getId();
    if (component instanceof UIInput) {
    UIInput input = (UIInput) component;
    String clientId = input
    .getClientId(context);
    Map requestMap = context
    .getExternalContext()
    .getRequestParameterMap();
    String newValue = (String) requestMap
    .get(clientId);
    if (null != newValue) {
    input.setSubmittedValue(newValue);
    Also providing the setProperties() from the custom tag class:
    protected void setProperties(UIComponent component){
    super.setProperties(component);
    if (getValue()!=null){
    if (isValueReference(getValue())){
    ValueBinding vbTarget = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getValue());
    component.setValueBinding(VB_VALUE, vbTarget);
    System.out.println(component.getValueBinding("value").getValue(FacesContext.getCurrentInstance()));
    } else{
    ((UIInput) component).setValue(value);
    // component.getAttributes().put("value",getValue());
    if (getCompValue()!=null){
    if (isValueReference(getCompValue())){
    ValueBinding vbCompTarget = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getCompValue());
    component.setValueBinding(VB_COMPONENT_VALUE, vbCompTarget);
    } else{
    // ((UIInput) component).setValue(compValue);
    component.getAttributes().put(VB_COMPONENT_VALUE,getCompValue());
    if (getTable() != null && isValueReference(getTable())){
    ValueBinding vbTable = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getTable());
    component.setValueBinding(VB_TABLE, vbTable);
    } else{
    component.getAttributes().put(VB_TABLE, getTable());
    if (getColumn() != null && isValueReference(getColumn())){
    ValueBinding vbColumn = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getColumn());
    component.setValueBinding(VB_COLUMN, vbColumn);
    } else{
    component.getAttributes().put(VB_COLUMN,getColumn());
    if (getStyleClass() != null && isValueReference(getStyleClass())){
    ValueBinding vbClass = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getStyleClass());
    component.setValueBinding(VB_STYLE_CLASS, vbClass);
    } else{
    component.getAttributes().put(VB_STYLE_CLASS, getStyleClass());
    if(getRendered() != null && isValueReference(getRendered())){
    ValueBinding vbRendered = FacesContext.getCurrentInstance().getApplication().
    createValueBinding(getRendered());
    component.setValueBinding(VB_RENDERED, vbRendered);
    } else{
    Boolean a = new Boolean(getRendered());
    component.getAttributes().put(VB_RENDERED, new Boolean(getRendered()));
    Please let me know If I am missing something here to retrieve the value from the component.
    Thanks

    See this tutorial:
    http://www.jsftutorials.net/components/index.html

  • JSF-Custom Component with EventHandling

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

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

  • JSF custom component: repear child components

    I want to create something like this
    <custom:mycomp var="item" value="#{aBean.TheArrayList}">
    ___<f:facet name="child">
    ______<h:commandLink actionListener="#{item.doSomething}">
    _________<h:ouputText value="#{item.name}"/>
    ______</h:commandLink>
    ___</f:facet>
    </custom:mycomp>
    I know how to make a basic component with encodebegin and encodeend. But how can I make it repeat the facet for every object in the arraylist?

    Create a custom ActionListener, implementing javax.faces.event.ActionListener, and calling it like this:
    <h:commandButton action="doThis" value="Do This">
         <f:actionListener type="my.package.MyActionListener" />
    </h:commandButton>When the button is pressed, the processAction() method of MyActionListener is automatically executed.
    Maybe this wasn't what you were looking for?
    Edited by: bjornie on Aug 5, 2008 2:50 AM

  • Nesting JSF components in a  custom component

    I'm creating a new JSF custom component. my component needs to include an input text and a list box. my question is : how do I add these components to my JSF component ? I want to use to JSF component to render them rather then encoding the HTML myself. how can I do it ?
    I was told I need to use encodeChildren method somehow but I don't know how ?

    I finally found how to set a default skin to a custom component so that users of my component will not have to set again the skinClass value of my component.
    You have to create a defaults.css file at the root of your library and tell the compiler to take it into account.
    The remaining problem is about the compiler. There are some steps before success and they are a bit mysterious/unclear....
    I found 2 or 3 blog articles explaining those steps but the compiler arguments to use are all differents in each article...
    Here are the links I found:
    http://www.unitedmindset.com/jonbcampos/2010/05/12/creating-custom-spark-components/
    http://www.betadesigns.co.uk/Blog/2010/05/14/default-skin-for-custom-flashbuilder-componen ts/
    http://flexdevtips.blogspot.com/2009/06/default-stylesheet-in-swc-flex-library.html
    Following the first article guidelines has been successful for me but I'm not marking this topic as Resolved because I'd like some answers about this whole thing...

  • JSF custom renderer executes multiple times

    I have just created a jsf custom component to render three input texts next to each other (for SSN input). My custom renderer extends javax.faces.render.Renderer, and I am writing out the elements in the encodeEnd method. The problem I encountered is - upon saving the form and the screen refreshes, the renderer gets called two times. So what I end up seeing on the screen are two sets of the three input texts component. Does anyone know why the renderer gets called more than once? Any insight is much appreciated.

    To the best of my knowledge, the standard does not specify the default renderer class for any components.
    I would take a wrapper/decorator approach. Add a field to your renderer for the default renderer. Before configuring your renderer, obtain the default renderer and set it on your renderer, then configure it.
    OTOH, there might be easier ways for you to accomplish what you want to do. You could use a PhaseListener to add components to the view whenever a commandButton is encountered in the tree.

  • Custom component not found by jsf (mojarra)

    Coming from this link http://forums.sun.com/thread.jspa?threadID=5446475&tstart=0
    I have managed to get things together but for some reason, my app is not able to find the custom component at runtime. I have the component configured in my web.xml so that is not it. I am not sure if this has something to do with the fact that I am not able to see any JSF 2.0 annotations during runtime. I actually using spring for my component scan due some issues I had earlier on with JSF. At that time I was told that because I am using maven tomcat plugin for development, I might not be able to get that working. The explanation was that maven tomcat plugin uses tomcat 6.012 that does not support something, I cannot remember that makes JSF behave properly. Some advised me to use jetty but I have had a chance to try that. Has someone faced this kind of issues before? If so please let me know I am running out of time for this project. Thanks a million in advance.
    Edited by: mota_nginya on Aug 9, 2010 6:31 AM

    mota_nginya wrote:
    Coming from this link http://forums.sun.com/thread.jspa?threadID=5446475&tstart=0
    I have managed to get things together but for some reason, my app is not able to find the custom component at runtime. I have the component configured in my web.xml so that is not it. I am not sure if this has something to do with the fact that I am not able to see any JSF 2.0 annotations during runtime. I actually using spring for my component scan due some issues I had earlier on with JSF. At that time I was told that because I am using maven tomcat plugin for development, I might not be able to get that working. The explanation was that maven tomcat plugin uses tomcat 6.012 that does not support something, I cannot remember that makes JSF behave properly. Some advised me to use jetty but I have had a chance to try that. Has someone faced this kind of issues before? If so please let me know I am running out of time for this project. Thanks a million in advance.What do you mean you have the component configured in web.xml? While I can't say what effect Spring has on things as I don't use Spring, all you need are the annotations on the component, the entries in the -taglib.xml if you're using facelets, and an "empty" (root-element only) faces-config.xml set to version 2.0 in the jar if the component is jarred (as opposed to being part of the .war).
    When you say JSF can't find your component, are you getting an error message? Does the tag just appear in the browser unprocessed?
    Testing on GlassFish would be helpful (for me) as there are no known issues there in this area.

  • Issue in custom component in custom timecard layout-OTL

    Hi,
    I have created a custom layout based on seeded layout.Added new custom component Dept reference field to the sedded layout.
    When trying to save the timecard template including dept reference field completed.The saved timecard template is dropping Dept reference filed.therefore,it is also dropped from the exported/downloaded .csv file.
    code details:
    BEGIN HXC_LAYOUT_COMPONENTS
    "US Projects Alternate Timecard Layout-Dep field"
    OWNER = "CUSTOM"
    SEQUENCE = "226"
    COMPONENT_DEFINITION = "TEXT_FIELD"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT="US Projects Alternate Timecard Layout-Day Scope Building blocks for worker timecard matrix"
    REGION_CODE="HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME="HXC"
    ATTRIBUTE_CODE="DEPT_REF"
    ATTRIBUTE_CODE_APP_SHORT_NAME="HXC"
    LAST_UPDATE_DATE = "2004/05/23"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS
    "US Projects Alternate Timecard Layout-Dep field"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "TEXT_FIELD"
    QUALIFIER_ATTRIBUTE1 = "N"
    QUALIFIER_ATTRIBUTE2 = "N"
    QUALIFIER_ATTRIBUTE3 = "5"
    QUALIFIER_ATTRIBUTE4 = "1"
    QUALIFIER_ATTRIBUTE5 = "30"
    QUALIFIER_ATTRIBUTE18 = "EXCLUDE"
    QUALIFIER_ATTRIBUTE19 = "|TEMPLATE|CSV|"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "HRP"
    QUALIFIER_ATTRIBUTE27 = "Attribute3"
    LAST_UPDATE_DATE = "2004/05/23"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    Please help me in this regard....
    Thanks
    Sri...

    Did you update the export layout too and added that to preferences?
    --Shiv                                                                                                                                                                                   

  • Creating a custom component is causing a strange scoping issue

    I am a fairly new user to Flash and Actionscript, but I have
    a fair amount of experience working with C and Java. I'm currently
    working with Actionscript 2 in Macromedia Studio 8. I was trying to
    create a new component for a project I am working on, and I
    followed the tutorial in the help and all testing works while I am
    in context of the flash document where I export the component from.
    However, I try testing my component in a new blank document and I
    get some strange behavior.
    I am able to create a component on the stage, and adjust the
    properties perfectly fine. However, when I test the file, the
    variables for colors go out of scope. That is, the adjustments I
    made to the component through the parameters panel, and saw updated
    on the stage aren't demonstrated at runtime. The Number variable I
    used however is preserved. I did some traces, and it appears that
    this is happening because at runtime in the new blank document, the
    variables in the onEnterFrame method go out of scope, where they
    weren't before.
    It seems really strange to me that I should be able to edit
    the color on stage but have it revert while it is running. My
    intuition says that if it wasn't going to work in the new document,
    that it shouldn't work in either case.
    Anyway, here is the code for the .as file, I hope I'm just
    doing something stupid.

    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

Maybe you are looking for