Building components from Abstract component

Hello,
I am a litte confused about using Abstract classes in which
you define the common fields and methods a component might need.
Consider my scenario:
I am building more than a handful clickable icons. The click
is always handled by dispatching an event.
Each class consist of two controls: <mx:Image> and
<mx:Text>. The Image should source an embedded image while
the text displays a more verboose description of the same process.
Something like this:
--add icon-- Add Customer information
--display icon-- Display Customer information etc.
My Abstract class AbstractIcon.mxml looks like this:
<mx:HBox xmlns:mx="
http://www.adobe.com/2006/mxml"
mouseUp="handler(event)">
<mx:MetaData>
[Event name="click", type="com.my.events.ClickEvent")]
</mx:MetaData>
<mx:Script>
<![CDATA[
import flash.events.MouseEvent;
import com.my.events.ClickEvent;
[Bindable]
public var iconNormal:Class;
[Bindable]
public var iconHot:Class;
[Bindable]
public var text:
private function handler(event:MouseEvent):void
theImage.source = iconHot;
this.dispatchEvent(new ClickEvent(ClickEvent.CLICK));
]]>
</mx:Script>
<mx:Image id="theImage" source="{ iconNormal}"/>
<mx:Text selectable="false" text="{ text }"/>
Now I would like to implement this as a iconAdd.mxml
<icons:AbstractIcon xmlns:icons="com.ny.icons.*"
xmlns:mx="
http://www.adobe.com/2006/mxml"
>
<mx:Script>
<![CDATA[
[Embed (source="/assets/icons/normal/iconAdd.png")]
public iconNormal:Class;
[Embed (source="/assets/icons/hot/iconAdd.png")]
public iconHot:Class;
]]>
</mx:Script>
</icons:AbstractIcon>
However this code breaks: something about member conflict in
the AbstractIcon class. Also adding the override keyword is no use,
as only methods can be overwritten.
How would I make the components as such that I am able to add
a lot of icons components using the Abstract component?
I really like this concept, since all the layout changes
(such as font type, size, colors etc) are all handled in the
AbstractIcon class without the need to change each individual
components.
Thanks for any help,
-Rogier Doekes

I solved the inital problem by doing the following on the
inherited classes:
<icons:AbstractIcon xmlns:icons="com.my.icons.*"
creationComplete="doInit()" xmlns:mx="
http://www.adobe.com/2006/mxml"
>
<mx:Script>
<![CDATA[
[Embed (source="/assets/icons/normal/iconAdd.png")]
private var _iconNormal:Class;
[Embed (source="/assets/icons/hot/iconAdd.png")]
private var _iconHot:Class;
private function doInit(): void
this.iconHot = _iconHot;
this.iconNormal = _iconNormal
]]>
</mx:Script>
</icons:AbstractIcon>
However, now I reveice a new error:
Type Coercion failed: cannot convert
flash.events::MouseEvent@4294609 to com.my.events.ClickEvent
This error occurs when the mouseUp handler(event) is invoked.
What do I need to do to get around this coercion problem?

Similar Messages

  • What happened to annotations? building components from tables

    File > New > Business Tier > ADF Business Components > Business Components from Tables]
    there are no longer Entity Beans beign generated.. just useless views.
    no java files to modify for complex foreign key relationships..
    how to go about this?

    Just like in 10g, you can use drag & drop. However, the data control palette was moved and is no longer a fully fledged independent palette, but rather a sub component of the Application navigator, check the data control accordion element of the Application navigator to see all your data controls, and view object. You can drag them in page or on task flow for actions.
    As for session bean specifically, do you mean EJB session beans (that wouldn't make much sense since you're using BC4J) or JSF managed bean in session scope? if the latter, you can always evaluate the ValueExpression #{bindings} at any time in your code to get access to the current binding container.
    Regards,
    ~ Simon

  • Loading components 1 by 1 [passing value from 1st component to other]

    Hi all,
    can anyone tell that how to load component one after one.
    In my application I have created components and placed in
    another component. when i load the page each component is loading
    the data Asyncronesly. But i want to load 1st component 1st and
    then set value to other components from 1st component.
    In 1st component i am filling dropdown and setting property
    in that component after setting the property i want to pass that
    value to other components and based on that property i set the
    corresponding data should be populated in ohter component. how can
    i achieve this.
    like in second component i am filling tje datagrid items
    based on selected value from the dropdown in 1st component..
    I just want to pass the property which i set in 1st component
    to other components and load the other components after the 1st
    component is loaded completely with data..
    reply asap
    Girish

    Hi Tracy,
    I am quering / retrieving data from salesforce database using
    AsyncResponder method. In each component i have written login
    method [logging into salesforce db].
    Created all my mxml component separately and drag&dropped
    in another mxml component.

  • Accessing portal service from abstract portal component

    Hi
    I have created a portal service where it contains getdata() and putdata(String) methods.
    I have created a abstract portal component and trying to access the portal service from this component.
    In portalapp.xml file of the portal component i have created the sharing reference and i have given the service name.
    When i run the component it says service not found.
    Please let me know if i have missed some things
    Thanks and Regards
    NagaKishore

    Hi Prakash
    Sorry for the latereply.
    find below the code for the interface
    package com.sap.global;
    import com.sapportals.portal.prt.service.IService;
    public interface IGlobalContext extends IService
        public static final String KEY = "IGlobalContext.GlobalContext";
        public void putData(String strUserID,String strSessionID);
        public String getData();
    portalapp.xml file of the portal service.
    <application>
      <application-config/>
      <components/>
      <services>
        <service name="GlobalContext">
          <service-config>
            <property name="className" value="com.sap.global.GlobalContext"/>
            <property name="startup" value="true"/>
          </service-config>
          <service-profile>
            <property name="Test" value="true"/>
          </service-profile>
        </service>
      </services>
    </application>
    I am doing the following steps to access the portal service in the abstract portal component.
    1. Add the portal service to the java build path of the abstract portal component.
    2. do content method has the following code.
    String userid ="",sessionid="";
              response.write("Welcome");
              try
              IUserContext uc= request.getUser();
              userid = uc.getLogonUid();
              sessionid = request.getServletRequest().getSession().toString();
              response.write("Iview "+userid);
              IGlobalContext uid = (IGlobalContext)PortalRuntime.getRuntimeResources().getService(IGlobalContext.KEY);
              uid.putData(userid,sessionid);
              response.write(" Response from Service " + uid.getData());
             }catch (Exception e)
                  response.write(e.toString());
    3. portalapp.xml of abstract portal component
    <application>
      <application-config>
        <property name="SharingReference" value="GlobalContext"/>
      </application-config>
      <components>
        <component name="LandingPageComponent">
          <component-config>
            <property name="ClassName" value="com.satyam.landing.LandingPage"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    I am getting the following error.
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Could not find portal application GlobalContext.
    Exception id: 11:53_08/04/05_0095_1641450
    See the details for the exception ID in the log file
    Thanks in advance
    Regards
    NagaKishore

  • Urgent Please help me... How to access BAPIs from abstract portal component

    I am developing an application in Abstract Portal Component (in
    PDK).
    In that application I can able to acess BAPIs from my Componets
    using the code like
    inputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Input();
    outputPopSearchBapi = new Zad_Bapi_Pop_Search_Form_Output();
    popSearchBapi = new DropBox_PortType();
    colorList = new Tjj12Type_List();
    inputPopSearchBapi.setIm_Agencyid("0010000001");
    try {
    jcoClient.connect();
    outputPopSearchBapi =
    popSearchBapi.zad_Bapi_Pop_Search_Form(inputPopSearchBapi);
    colorList = outputPopSearchBapi.get_as_listIt_Color();
    request.getComponentContext().putValue("color",colorList.iterat
    or());
    jcoClient.disconnect();
    But I am not able to Access the data that is comming from the
    BAPI in my JSP Page. Pleeeeeeease help me. If you want any
    clarification about my problem then ask for further
    clarifications

    Hi,
      You can refer this link, to connecting the BAPI from Abstract Portal Component <a href="http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.html">JCo Tutorial1</a>
    <a href="http://www.apentia-forum.de/viewtopic.php?t=1962&sid=9ac1506bdb153c14edaf891300bfde25">JCo Tutorial2</a>
    With Regards,
    Venkatesh. K
    /* Points are Welcome */

  • Planning Strategy to consumer components from various Sales Orders

    Sapers,
    It seems that any planning component strategy will not reduce PIRs (Dep reqs).  What I means is when you enter a Sales Order that has a component in but is completely MTO the demand from that component is not netted off against other demand that may be planned ?
    I needs a solution whereby component demand can be consumed from multiple MTO sales orders that have that particular component in its BOM ?
    CAN ANY ONE HELP ?

    Milton,
    when I applied strategy 70 it would only reduce the PIRs for the Higher level that was producing the dependent demand.
    ???? The strategy of a component has no impact on the PIRs of a parent.  If the PIRs of your parent were being consumed, it was due to the strategy of the parent, not the component.
    May be I had some settings wrong but I dont think so
    Yes, you must have had some settings wrong.  However, I probably misled you, I meant to say 'dependent reservations', not 'dependent requirements'.
    We are essentially using parent material forecast to drive demand for components with long lead times
    I will assume that when you are saying 'parent', you are not talking about your finished goods.  Please confirm.
    Let us assume your BOM is FG1 > AS1 > RM1.  Let us assume that you do not wish to forecast FG1.  Let us further assume that you do not wish to build either FG1 or AS1 until the entry of a Sales order.  In this case, you could enter strategy 70 at the RM1 level.  You would procure RM1 via forecast entered at RM1.  When the sales order was entered, the dependent demand from the FG1 sales order would cause you to generate Production orders for AS1.  The dependent reservations from the AS1 productions orders would consume the forecast against RM1.  
    Now, as I understand your question, you wish instead to
    1.  Forecast AS1
    2.  Generate non-convertible orders for AS1
    3.  Generate convertible orders for RM1
    4.  Have the forecast in AS1 to be consumed by the dependent reservations of FG1.
    I don't believe that there is a standard SAP strategy that meets these requirements.  I would actually question why AS1 would even exist as an independent material, but I guess you probably have some legitimate business reason. It also raises the question of how the ATP for FG1 and AS1 would be conducted.  Well, I am sure you have already thought this out.
    As I mentioned earlier, you could use one of the planning material strategies at the FG1s level to functionally get similar business results.
    Best Regards,
    DB49
    Edited by: Dogboy49 on Feb 19, 2011 5:47 PM

  • Remove Components from Library

    I'm new to Catalyst, so this might be a stupid question.
    I created a bad datalist and as soon as I realized my error I deleted it from the Artboard, but it is still in my Library. Now every time I run the project I get an alert that says that DataList1 is missing a required part and will produce an error.
    I don't need DataList1 and I'm not really interested in fixing it. In the current build of the application, is there a way to just remove this component from my library so that I don't have to deal with the error anymore?
    Thanks.

    Currently you cannot remove components from the library panel, but this is something we are working on. There is a temporary solution though: switch to code view and you'll see a panel on the right side of the screen that shows all the files in your project. In the components folder there should be a DataList1.mxml file. Right click on it and choose delete.
    Note that if you follow the above steps and delete a component that is used elsewhere in your project, your application won't compile.

  • Fade in and Fade out components from 3d modell onClick self-made buttons

    Hi,
    in Acrobat Pro you can place your own 3D-model into the pdf. Than you can fade in and fade out components of your 3d-model on a acrobat-menü (see images) in the pdf-reader. Now I want to build a pdf with this functionality, but the tricky thing is, that I want to fade in and out the components from the 3d-model not on the menu, but on self-made buttons.
    But how to say the buttons, that they should fade in or fade out a component from the 3d model, like it the menu from acrobat does?
    Thank you for reply.
    Maybe this images will help you to understand my question:

    Thank you very much for your answer. But I think what you mean, is to make a full object visible=false. But what I want to make is to fade out a subordinate level.
    So for example this is my hierarchy:
    layer one
    -sub-layer one
    -sub-layer two
       *sub-sub-layer one
    layer two
    -sub-layer one
    And now I want to fade out the sub-sub-layer one. What is the code for that?
    Thank you very much again!

  • Abstract Component: UIIterate

    A year and half ago, when I tried to create some complex UI component, I found JSF API missing a abstract component called UIIterate.
    Without "for loop" data structure, we can only use foreach tag from JSTL. However, this customer tag iteration only applies in CreateView time. After this time, iteration is ignored and there is no way to make the iteration dynamically paticipate in all JSF lifecycle, in other word, we cannot change iteration through ValueBinding language. Furthermore, foreach tag is not a NamingContainer, so that component client id get duplicated in foreach tag loop.
    We need UIIterate in many ways, such as JSF ForEach component to iteration java collections or array, Tree component to iterate TreeNode, DataTable to iterate records and dynamic columns(such as dynamic columns based on SQL "select * from xxx").
    I waited for the JSF 1.2 specification, but this wasn't covered yet. Of course I can use my own UIIterate in my set of JSF components design. However, if there are many third party components which have defined their own UIIterate, they wouldn't recognize each other. The result is component collaboration has been weakened.
    I am still waiting the standard API for this from Sun.
    Following is my version of UIIterate:
    package com.mycompany.jsf.ui.component;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.Map;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.EditableValueHolder;
    import javax.faces.component.NamingContainer;
    import javax.faces.component.UIComponent;
    import javax.faces.component.UIComponentBase;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.event.AbortProcessingException;
    import javax.faces.event.FacesEvent;
    import javax.faces.event.PhaseId;
    import com.mycompany.jsf.ui.event.IterateEvent;
    import com.mycompany.jsf.ui.util.AutoLinkedMap;
    public abstract class UIIterate extends UIComponentBase implements NamingContainer{
         public UIIterate(){
              saved = new HashMap<String, SavedState>();
              updates = new AutoLinkedMap();
         public boolean getRendersChildren() {
              return true;
         public String getClientId(FacesContext context) {
              if (context == null)
                   throw new NullPointerException();
              String baseClientId = super.getClientId(context);
              Object key = getKey(currentValue);
              if (key != null){
                   return baseClientId + ':' + key.toString();
              else{
                   return baseClientId;
         public void restoreState(FacesContext context, Object state) {
              Object values[] = (Object[]) state;
              super.restoreState(context, values[0]);
              this.saved = (Map)values[1];
              this.updates = (Map)values[2];
              this.currentValue = values[3];
              this.value = values[4];
              this.var = (String)values[5];
         public Object saveState(FacesContext context) {
              Object values[] = new Object[6];
              values[0] = super.saveState(context);
              values[1] = saved;
              values[2] = updates;
              values[3] = currentValue;
              values[4] = value;
              values[5] = var;
              return values;
         public void setValueBinding(String name, ValueBinding binding) {
              if ("var".equals(name))
                   throw new IllegalArgumentException();
              super.setValueBinding(name, binding);
         public void queueEvent(FacesEvent event) {
              super.queueEvent(new IterateEvent(this, event, currentValue));
         public void broadcast(FacesEvent event) throws AbortProcessingException {
              if (!(event instanceof IterateEvent)) {
                   super.broadcast(event);
                   return;
              } else {
                   IterateEvent iEvent = (IterateEvent) event;
                   Object oldValue = currentValue;
                   setCurrentValue(iEvent.getCurrentValue());
                   FacesEvent facesEvent = iEvent.getFacesEvent();
                   facesEvent.getComponent().broadcast(facesEvent);
                   setCurrentValue(oldValue);
                   return;
         public void encodeBegin(FacesContext context) throws IOException {
              currentValue = null;
              if (!keepSaved(context))
                   saved = new HashMap<String, SavedState>();
              super.encodeBegin(context);
         protected abstract void beforeProcessDecodes(FacesContext context);
         public void processDecodes(FacesContext context) {
              beforeProcessDecodes(context);
              // start of processDecodes
              if (context == null)
                   throw new NullPointerException();
              if (!isRendered())
                   return;
              currentValue = null;
              if (null == saved || !keepSaved(context))
                   saved = new HashMap<String, SavedState>();
              iterate(context, PhaseId.APPLY_REQUEST_VALUES);
              decode(context);
              afterProcessDecodes(context);
         protected abstract void afterProcessDecodes(FacesContext context);
         protected abstract void beforeProcessValidators(FacesContext context);
         public void processValidators(FacesContext context) {
              beforeProcessValidators(context);
              if (context == null)
                   throw new NullPointerException();
              if (!isRendered())
                   return;
              if (isIterateNested())
                   currentValue = null;
              iterate(context, PhaseId.PROCESS_VALIDATIONS);
              afterProcessValidators(context);
         protected abstract void afterProcessValidators(FacesContext context);
         protected abstract void beforeProcessUpdates(FacesContext context);
         public void processUpdates(FacesContext context) {
              beforeProcessUpdates(context);
              if (context == null)
                   throw new NullPointerException();
              if (!isRendered())
                   return;
              if (isIterateNested())
                   currentValue = null;
              iterate(context, PhaseId.UPDATE_MODEL_VALUES);
              afterProcessUpdates(context);
         protected abstract void afterProcessUpdates(FacesContext context);
         protected void iterate(FacesContext context, PhaseId phaseId) {
              for(Iterator i = iterator(); i.hasNext(); ){
                 i.next();
                   for(Iterator kids = getFacetsAndChildren(); kids.hasNext(); ) {
                        processPhase(context, (UIComponent) kids.next(), phaseId);                    
         public abstract Iterator iterator();
         protected abstract Object getKey(Object value);
         protected void processPhase(FacesContext context, UIComponent component, PhaseId phaseId){
              if (component.isRendered())
                   if (phaseId == PhaseId.APPLY_REQUEST_VALUES)
                        component.processDecodes(context);
                   else if (phaseId == PhaseId.PROCESS_VALIDATIONS)
                        component.processValidators(context);
                   else if (phaseId == PhaseId.UPDATE_MODEL_VALUES)
                        component.processUpdates(context);
                   else
                        throw new IllegalArgumentException();
         protected boolean keepSaved(FacesContext context) {
              for(Iterator clientIds = saved.keySet().iterator(); clientIds.hasNext(); ) {
                        String clientId = (String) clientIds.next();
                        for(Iterator messages = context.getMessages(clientId); messages.hasNext(); ){
                             FacesMessage message = (FacesMessage) messages.next();
                            if(message.getSeverity().compareTo(
                                  FacesMessage.SEVERITY_ERROR) >= 0)return true;
              return isIterateNested();
         protected boolean isIterateNested() {
              for (UIComponent parent = this; null != (parent = parent.getParent());)
                   if (parent instanceof UIIterate)
                        return true;
              return false;
         protected void restoreDescendantState() {
              FacesContext context = getFacesContext();
              Iterator kids = getFacetsAndChildren();
              while(kids.hasNext()){
                   UIComponent kid = (UIComponent) kids.next();
                   restoreDescendantState(kid, context);
         protected void restoreDescendantState(UIComponent component,
                   FacesContext context) {
              String id = component.getId();
              component.setId(id);
              if (component instanceof EditableValueHolder) {
                   EditableValueHolder input = (EditableValueHolder) component;
                   String clientId = component.getClientId(context);
                   SavedState state = (SavedState) saved.get(clientId);
                   if (state == null)
                        state = new SavedState();
                   input.setValue(state.getValue());
                   input.setValid(state.isValid());
                   input.setSubmittedValue(state.getSubmittedValue());
                   input.setLocalValueSet(state.isLocalValueSet());
              for (Iterator kids = component.getChildren().iterator(); kids.hasNext(); restoreDescendantState(
                        (UIComponent) kids.next(), context))
         protected void saveDescendantState() {
              FacesContext context = getFacesContext();
              Iterator kids = getFacetsAndChildren();
              while(kids.hasNext()){
                   UIComponent kid = (UIComponent) kids.next();
                   saveDescendantState(kid, context);
         protected void saveDescendantState(UIComponent component, FacesContext context) {
              if (component instanceof EditableValueHolder) {
                   EditableValueHolder input = (EditableValueHolder) component;
                   String clientId = component.getClientId(context);
                   SavedState state = (SavedState) saved.get(clientId);
                   if (state == null) {
                        state = new SavedState();
                        saved.put(clientId, state);
                   state.setValue(input.getLocalValue());
                   state.setValid(input.isValid());
                   state.setSubmittedValue(input.getSubmittedValue());
                   state.setLocalValueSet(input.isLocalValueSet());
              for (Iterator kids = component.getChildren().iterator(); kids.hasNext(); saveDescendantState(
                        (UIComponent) kids.next(), context))
         public Object getValue() {
              if (value != null)
                   return value;
              ValueBinding vb = getValueBinding("value");
              if (vb != null)
                   return vb.getValue(getFacesContext());
              else
                   return null;
         public void setValue(Object value) {
              this.value = value;
         public String getVar() {
              return var;
         public void setVar(String var) {
              this.var = var;
         public Map getUpdates(){
              return updates;
         public void clearStateHolder(){
              saved.clear();
         public void clearUpdates(){
              updates.clear();
         public Object getCurrentValue()
            return currentValue;
        public void setCurrentValue(Object currentValue)
            saveDescendantState();
            this.currentValue = currentValue;
            if(getVar() != null){
                Map<Object, Object> requestMap = getFacesContext().getExternalContext().getRequestMap();
                requestMap.put(getVar(), currentValue);
                if(currentValue != null)requestMap.put("updates", updates.get(getKey(currentValue)));
            restoreDescendantState();
        protected Object value;
        protected String var;
        protected Map<String, SavedState> saved;
        protected Object currentValue;
        protected Map updates;
        protected class UIIterator implements Iterator {
            private Iterator i;
            public UIIterator(Iterator i) {
                 setCurrentValue(null);
                this.i = i;
            public boolean hasNext() {
                 boolean result = i.hasNext();
                 if(!result)setCurrentValue(null);
                return result;
            public Object next() {
                 Object item = i.next();
                 setCurrentValue(item);
                return item;
            public void remove(){
                 setCurrentValue(null);
                 i.remove();
    package com.mycompany.jsf.ui.event;
    import javax.faces.component.UIComponent;
    import javax.faces.event.FacesEvent;
    import javax.faces.event.FacesListener;
    import javax.faces.event.PhaseId;
    public class IterateEvent extends FacesEvent {
         public IterateEvent(UIComponent component, FacesEvent event, Object currentValue) {
              super(component);
              this.event = event;
              this.currentValue = currentValue;
         public FacesEvent getFacesEvent() {
              return event;
         public Object getCurrentValue() {
              return currentValue;
         public PhaseId getPhaseId() {
              return event.getPhaseId();
         public void setPhaseId(PhaseId phaseId) {
              event.setPhaseId(phaseId);
         public boolean isAppropriateListener(FacesListener listener) {
              return false;
         public void processListener(FacesListener listener) {
              throw new IllegalStateException();
         private FacesEvent event;
         private Object currentValue;
    package com.mycompany.jsf.ui.util;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import java.util.LinkedHashMap;
    import java.util.List;
    import java.util.Vector;
    public class AutoLinkedMap<K, V> extends LinkedHashMap<K, V> {
         public AutoLinkedMap(){
         public AutoLinkedMap(Class<V> clazz){
              this.instanceClass = clazz;
         public V get(Object key){
              V value = super.get(key);          
              if(value == null && !isStop()){
                   value = (V)createInstance();
                   super.put((K)key, value);
              return value;
         public V put(K key, V value){
              V oldValue = super.put(key, value);
              if(!((oldValue==null && value==null) || value instanceof AutoLinkedMap || (oldValue!=null && oldValue.toString().equals(value.toString())))){
                   PropertyChangeEvent vce = new PropertyChangeEvent(key, key.toString(), oldValue, value);
                   for(PropertyChangeListener listener : propertyChangeListeners){
                        listener.propertyChange(vce);
              return oldValue;
         public boolean containsKey(Object key){
              return true;
         public boolean realContainsKey(Object key){
              return super.containsKey(key);
         public void addPropertyChangeListener(PropertyChangeListener listener){
              if(listener!=null)propertyChangeListeners.add(listener);
         public String toString(){
              return super.toString();
         private V createInstance(){
              if(instanceClass==null)return (V)new AutoLinkedMap();
              if(Boolean.class.equals(instanceClass) || Boolean.TYPE.equals(instanceClass)) return (V)new Boolean(false);
              else if(Integer.class.equals(instanceClass) || Integer.TYPE.equals(instanceClass)) return (V)new Integer(0);
              else if(Long.class.equals(instanceClass) || Long.TYPE.equals(instanceClass)) return (V)new Long(0l);
              else if(Short.class.equals(instanceClass) || Short.TYPE.equals(instanceClass)) return (V)new Short((short)0);
              else if(Byte.class.equals(instanceClass) || Byte.TYPE.equals(instanceClass)) return (V)new Byte((byte)0);
              else if(Float.class.equals(instanceClass) || Float.TYPE.equals(instanceClass)) return (V)new Float(0.0f);
              else if(Double.class.equals(instanceClass) || Double.TYPE.equals(instanceClass)) return (V)new Double(0.0d);
              else if(Character.class.equals(instanceClass) || Character.TYPE.equals(instanceClass)) return (V)new Character((char)0);
              else try {
                   return instanceClass.newInstance();
              } catch (Exception e) {
                   return null;
         public boolean isStop() {
              return stop;
         public void setStop(boolean stop) {
              this.stop = stop;
         private Class<V> instanceClass;
         private List<PropertyChangeListener> propertyChangeListeners = new Vector<PropertyChangeListener>();
         private boolean stop;
    }

    Hello,
    Please go through these 2 forum posts for some help:
    Re: Redirect from component to JSP
    http://wiki.sdn.sap.com/wiki/display/Snippets/CallingaPortalComponentfromJSPandviceversa
    Hope this helps.
    Regards,
    Shailesh

  • How get all components from form Jdev10.1.3.4

    hi
    I have a form on her field is not related to VO. Pagedef empty.
    each element has the id and Binding.
    <af:inputText label="#{r['questionnaire.surname']}"
                                  required="true" id="surname"
                                  binding="#{QuestionnaireBean.surname}"
                                  />I want to get an array of elements.
    in obtaining a list of bindings
             BindingContainer bindings = getBindings ();
             bindings.getAttributeBindings ();null ((((((

    As you are asking your empty pagedef, which is what you do with
    BindingContainer bindings = getBindings ();
    bindings.getAttributeBindings ();it returns null. This is expected behavior.
    You have to walk the component tree to get all components check each for it's type and get the information from the component itself. You can use something like
    // reset all the child uicomponents
    private void getAllUIItems(AdfFacesContext adfFacesContext,
                                     UIComponent component){
       List<UIComponent> items = component.getChildren();
       for ( UIComponent item : items ) {
           getAllUIItems(adfFacesContext,item);
           if ( item instanceof RichInputText  ) {
               RichInputText input = (RichInputText)item;
               //do your work here e.g. store id in an array
           } else if ( item instanceof RichInputDate ) {
               RichInputDate input = (RichInputDate)item;
               //do your work here e.g. store id in an array
    }you may have to alter the signature of the method to return the array of ids ...
    Timo

  • Restrict Deletion of Components from Service Order

    Hello All,
    I noticed that I am able to delete the components from the Components tab of a Service Order even after I have completely issued the components.
    Is there a possible way to prevent deletion of components that have already been issued..?
    I think I can use the Business Transaction RMKL in the system status GMPS. But I guess this will prevent deletion of those components which have not been issued to the service order.
    What would be the best way to prevent deletion of components that have already been issued...?
    Thanks
    Jensibo

    Hello All,
    I don't know if you all received the last reply I posted against this thread... coz I am not able to find it in the thread. I had asked for your comments on any repercussions that may occur because of this config.
    Anyway, the thing is, I followed Narashiman's suggestion and although I did not use the exact config he pointed me to, I used the config in the following nodes:
    1.) Production --> Shop Floor Control --> System Modifications --> Define System Message Attributes
    2.) Production Planning & Process Industries --> Process Order --> System Modifications --> Define System Message Attributes
    and added an entry: Application Area = CN, Message No. = 750-Component & item & was already withdrawn and Category = E.
    Having done this, the system did display the "Component & item & was already withdrawn" message when I tried to delete a component that was issued to a service order, but it did not delete the component from the service order. I was able to save the service order with the issued component still in the components tab.
    Narashiman,
    to specifically respond to your latest reply, I did find the node you pointed me to. But the trouble was that it did not have an entry for CN750 in it. When I tried to add an entry, the system did not let me do so and displayed the error message "Please specify a legal value".
    So I went around opening each system message control node and finally found the two that I mentioned earlier that did work for me.
    Thanks
    Jensi

  • Is it possible to change application state from a component?

    I was wondering if it is possible to change application state from within a custom component and if so, what would the syntax be if I had an application named "zzz" and I wanted to change the app state from "state1" to "state2" from my component?
    Thanks!

    Hi,
    you always have a static class Application.
    Application.application will be the root component. After that you can change it state.
    Application.application.currentState = "state2";
    But it's not the best way to change states. It's better to dispatch events from components and change states in listeners.

  • Error while trying to import Software components from SLD.

    Hi Gurus,
    Need Help.
    When we are trying to import Software components from SLD we are getting following error. Could not read list of software component versions from SLD. In Description  i am getting following two points.
    1. Could not read list of software component versions from SLD (COULD_NOT_READ_SWCV)
    2. User credentials are invalid or user is denied access
    We have tried following
    1. LCRSAPRFC and SAPSLDAPI are working fine.
    2  SLDAPICUST is ok
    3. In nwa connections are available for LCRSAPRFC and SAPSLDAPI.
    Request you to let us know how to resolve this issue.
    Thanks in advance.

    Hello ,
    Can you check below roles assigned to the user id?
    SAP_SLD_CONFIGURATOR
    SAP_SLD_DEVELOPER
    SAP_SLD_ORGANIZER
    Thanks

  • ADF Business Components from Tables - adding more tables

    Hi.
    I have already created a ADF Business Components from Tables and added tables from the Oracle database.
    My question is:
    Is it possible to add more tables to the same Business Components model?
    Not as a new Component Table, but with the same tables so i can use the same relations and mappings?

    Hi and thanks! Yes, I am talking about recreating a the same View Object that i already has created. In my first model i had the tables Name and Address. I want to add a new table called zipcode to the same View som i can choose colums from the zipcode-table in the same View as Name and Address.
    I'm not shure what you mean by Data Model tab? Can you spesify?
    Thanks!

  • No instances can be created from abstract classes

    Dear SAPGurus,
    I have developed a oData Service in my backend system & able to register the service in the gateway hub system. When i try to execute the metadata of the service from gateway system i am able to see the metadata with list of entity types availble in the data model.
    But when i try to execute with entity set i am getting the following error.
    "The class 'ZCL_ZGRC_DATA_MODEL_DPC' is abstract. No instances can be created from abstract classes."
    Where my data model provider class name is  'ZCL_ZGRC_DATA_MODEL_DPC'
    Kindly help me.
    Thanks & Regards,
    Rumeshbabu S

    Hello Rumesh,
    I do not think the error which u are getting is because of System Alias setting in SPRO.
    Its something else which is really strange.
    However the below is the setting to be maintained in GW SPRO system alias when u have a environment setup like u have now.
    I mean the way u have created service and registered -
    In ECC system u have created service using builder.
    In GW system u have registered it and trying to access now via an RFC destination.
    We have the same setup like u have now and we do not have any issues. We have also maintained the System Alias like i have shared in screen shot.
    Check your System Alias config once in SPRO. But i dont think this is causing problem in your case. Still check once.
    As per my understanding, from GW its trying to hit the DPC class and hence i feel system alias setting is correct in your case.
    Problem is something else which is really strange.
    Check error logs and see if it can. Share the error log please.
    Regards,
    Ashwin

Maybe you are looking for

  • One apple id on two different ipads at one time?

    for my friend. owns an iPad 3, won an iPad Air. Can one itunes store account, aka apple id be used on both iPads?

  • How to add a blank row in a report structure ?

    Hi, I have a report which uses a structure in both the rows and the columns. It also using cell definitions to define some cells in the report. What I want to do is to format the report a bit more and insert a blank line at various points in the row

  • [Forum FAQ] Reduce the size of System Volume Information folder

    Symptom There is a folder called System Volume Information in the root of each drive. (Figure 1) Sometimes, you may find the size of System Volume Information folder is too large. However, it is not recommended to delete the files in it casually sinc

  • Music library won't transfer to Device playlists

    I have succesfully transfered my itunes library to new computer, but music won't move to ipod or iphone playlists. Some was purchased and some copied. Help! Thanks!

  • How to use filter

    My application has many threads. Each thread is sending messages to queue Q1 with unique corrlation id' and is waiting The application that process these messages places response with the same corlation id in another queue Q2. I need to capture right