Checkboxes in a declarative component

Hi all

JDeveloper 11.1.1.5.0

I created a component declarative which shows a list of checkboxes in the layout that is needed for our application.
For this component declarative, I give 2 key attributes: 1 iterator with the complete list of opportunities (like all countries) and 1 iterator with the list of countries selected in the given folder.
I am able to correctly display the boxes and call the necessary methods in checking and unchecking the boxes,
but I'm not able to select default, checkboxes that are present in the iterator with the selected countries.
I have the code to do it, but so far I still needed to press a button to get the code running.

Is there a way to automatically launch a code when the declarative component is illustrated?

I tried the selected property, but I don't know for what component, I do the test and it also gives a strange behavior in the sense that all of the checkboxes become unalterable.
Note that a declarative component is a page definition file, so I can't use the standard executable section to launch my code.

Thanks for your comments.

Filip Huysmans.
PS: If you want to that application with the code, just drop your email address.

Published by: Filip Huysmans on December 11, 2011 23:52

Filip,

I found a way to trigger the selection:

1 set the value property of the af: selectBooleanCheckbox to a managed bean that extends from HashMap - to be able to add a parameter: the Id check a State selected or deselected.
For the parameters in the EL expressions, see also: http://technology.amis.nl/blog/2333/jsf-el-calculator-bean-to-overcome-coercion-errors-and-add-functionality-to-el-expressions

In this way, the value property can call a * "isSelected (Number, number) * ' method on a managed bean that can include the Id to check:

+ / public class MultiCheckBoxSelectMB extends HashMap {+
private static final long serialVersionUID = 1 L;

+ public Object get (Object key) {+
+ If (key instanceof String) {+
Command string = (String) key;
+ If ("selected".equalsIgnoreCase (command)) {+
Back to this;
+}+
+}+
+ If (key instanceof oracle.jbo.domain.Number) {+
oracle.jbo.domain.Number id = (oracle.jbo.domain.Number) key;
System.out.println ("-get() Id:" +)
(ID);
+ return isSelected (id); } else +.
Returns false;
+}+

+ private isSelected (dbId Number) boolean {+
+ / / determine if the Id is part of a certain iterator or not. +
+}+

2. set the value of the af: selectBooleanCheckbox to * #{MultiCheckBoxSelectMB.selected [list.id]} *.


autoSubmit = "true" >

It works in your sample application, the button and the corresponding action method is no longer giving the boxes a value from the database.

Frank Houweling

Published by: Frank Houweling on 12-dec-2011 05:49

Tags: Java

Similar Questions

  • How to set a partialTriggers for the declarative component

    12.1.3 jdev

    I try to set partialTriggers for my component declarative.

    From another forum, people suggested using one different name other than partialTriggers to avoid override a final method in RichDeclarativeComponent.

    Then, I set this:

    < afc:attribute >

    < afc:attribute - name > myPartialTriggers < / afc:attribute - name >

    < afc:attribute - class > java.lang.String [] < / afc:attribute - class >

    < / afc:attribute >

    and

    "< af:selectOneChoice id = simple =" #{attrs.simple "dc_droplist_soc"} "readOnly =" #{attrs.readOnly} "disabled =" #{attrs.disabled} ' "

    value = "#{uploading." "Value}" label = "#{attrs.label}" binding = "#{dropListComp.selectOneChoice}".

    "autoSubmit =" #{attrs.autoSubmit} "required =" #{attrs.required} "visible =" #{attrs.visible} ' "

    valueChangeListener = "#{dropListComp.handleValueChangeListener} '"

    partialTriggers = "#{attrs.myPartialTriggers} ' / >"

    But it does not work. I don't see a partialTriggers work.

    Any suggestions?

    Thank you.

    Hello

    try to use PartialTrigger on the declarative component and then reference it from

    partialTriggers = ' #{uploading. '. PartialTriggers}' / >

    Frank

  • How to define an attribute of the declarative component with the list of options

    12.1.3 jdev

    I'm trying to define a declarative component UOM. It has a text box with a selectOneChoice of the optional codes for this type of unit of MEASURE.

    I have uomType as one of the attributes of my unit of MEASURE. It may be of WEIGHT, VOLUME, LENGTH, etc. Is it possible to provide a list of the channels supported for my uomType? So, when the user uses this component, they can select a type they want in the list, instead of typing in themselves.

    < afc:attribute >
    < afc:attribute - name > uomType < / afc:attribute - name >
    < afc:attribute - class > java.lang.String < / afc:attribute - class >
    < afc: required > true < / afc: required >
    < / afc:attribute >

    Thank you.

    Hello

    Unfortunately the lists are not an option with the declarative elements

    Frank

  • How getValue of a declarative component

    jdev12.1.3

    My declarative component drop-down list looks like the following. According to unique attribute is FALSE, it will choose to use component selectManyListBox or selectOneListBox.

    I also defined a value attribute for my conponentDef from the drop-down list. I want to be able to retrieve the selected values of the listBox and use it on the calling page.

    I'm confused about the use of the attribute value in componentDef. My question is how to access the value selected the component of this drop-down list of the calling page?

    " < = xmlns:af af:componentDef ' http://xmlns.Oracle.com/ADF/faces/rich "var ="uploading"componentVar ="dropListComp"definition"private"= "

    ' xmlns:afc = ' http://xmlns.Oracle.com/ADF/faces/rich/component "xmlns:f =" http://Java.Sun.com/JSF/Core ">

    < af:xmlContent >

    < afc:component >

    < afc:description / >

    < afc:display - name > drop < / afc:display - name >

    < afc:component - class >glog.fusion.common.otmcomponents.DropList< / afc:component - class >

    < afc:attribute >

    < afc:attribute - name > queryClassName < / afc:attribute - name >

    < afc:attribute - class > java.lang.String < / afc:attribute - class >

    < afc: required > true < / afc: required >

    < / afc:attribute >

    < afc:attribute >

    < afc:attribute - name > displayLabel < / afc:attribute - name >

    < afc:attribute - class > java.lang.String < / afc:attribute - class >

    < afc: required > true < / afc: required >

    < / afc:attribute >

    < afc:attribute >

    < afc:attribute - name > single < / afc:attribute - name >

    < afc:attribute - class > java.lang.Boolean < / afc:attribute - class >

    < afc: required > true < / afc: required >

    < / afc:attribute >

    < afc:attribute >

    < afc:attribute - name >value< / afc:attribute - name >

    < afc:attribute - class > java.lang.String < / afc:attribute - class >

    < / afc:attribute >

    < afc:component - extension >

    < afc:component - tag-namespace > glog.fusion.common.otmcomponents < / afc:component - tag-namespace >

    < afc:component - taglib-uri > http://www.GLOG.com/OTM < / afc:component - taglib-uri >

    < / afc:component - extension >

    < / afc:component >

    < / af:xmlContent >

    < af:panelLabelAndMessage label = "#{attrs.displayLabel}" id = "dc_plam1" > "

    < af:switcher id = "dc_s1" defaultFacet = "a lot" facetName = "#{attrs.single eq 'true'?' unique ': 'a lot'}" >

    < f: facet name = "a lot" >

    < af:selectManyListbox id = "selectManyListBox_DropList" simple = 'true '.

    value = "#{uploading." "Value}" binding = "#{dropListComp.selectManyListBox}" autoSubmit = 'true' valueChangeListener = "#{dropListComp.selectManyValueChange}" >

    < / af:selectManyListbox >

    < / f: facet >

    < f: facet "single" = name >

    < af:selectOneListbox id = "selectOneListBox_DropList" simple = "true" label = "#{attrs.queryClassName} '"

    autoSubmit Binding = "#{dropListComp.selectOneListBox}" = "true" valueChangeListener = "#{dropListComp.selectOneValueChange}" > "

    < / af:selectOneListbox >

    < / f: facet >

    < / af:switcher >

    < / af:panelLabelAndMessage >

    < / af:componentDef >

    In my jsf calling page, I got the following text. The field properly. I don't know what I should spend in the value attribute, or how to get the selected value from the ListBox control.

    "< otm:dropList displayLabel ="MyuShipmentTypeDropList"value ="? »

    queryClassName = "glog.server.query.shipment.ShipmentTypeQuery" unique = "false" id = "dl1"

    Binding = "#{ShipmentFinderTest.dropList}" / >

    Thank you.

    Hello

    Create a bean managed with a property and a pair of getter/setter and use EL #{managedBean.propertyName} to reference the value property.

    Frank

  • Question about the use of the custom component class define what declarative component

    12.1.3 jdev

    I'm trying to define a declarative component with my custom component class.

    This is the code for my component jsf declarative. I'm trying to use the label on selectManyListbox attribute to pass queryClass for my component class name. It does not work. I also try to use f: attribute to my component class. It does not work too. Question 1: how to move my declarative component attribute to my class of component?

    < af:panelLabelAndMessage label = "#{attrs.displayLabel}" id = "dc_plam1" > "

    < af:switcher id = "dc_s1" defaultFacet = "a lot" facetName = "#{attrs.single eq 'true'?' unique ': 'a lot'}" >

    < f: facet name = "a lot" >

    < af:selectManyListbox id = "namingp1" simple = "true" label = "#{attrs.queryClass}" "

    ' autoSubmit Binding = "#{dropListComp.selectManyListBox}" = "true" valueChangeListener = "#{dropListComp.selectManyValueChange}" >

    < f: attribute name = "queryClass" value = "#{attrs.queryClass}" / >

    < / af:selectManyListbox >

    < / f: facet >

    < f: facet "single" = name >

    < af:selectOneListbox id = "sl_2" simple = "true" label = "#{attrs.queryClass} '"

    autoSubmit Binding = "#{dropListComp.selectOneListBox}" = "true" valueChangeListener = "#{dropListComp.selectOneValueChange}" > "

    < / af:selectOneListbox >

    < / f: facet >

    < / af:switcher >

    < / af:panelLabelAndMessage >

    That's how I try to retrieve the label or f: attribute queryClass in my component class. I get null for both directions.

    {} public void setSelectManyListBox (RichSelectManyListbox selectManyListBox)
    this.selectManyListBox = selectManyListBox;
    If (this.selectManyListBox.getChildCount () == 0) {}
    queryClass = (String) this.selectManyListBox.getLabel ();
    System.out.println (".. queryClass of the label..." + queryClass);
    If (queryClass is nothing)
    {
    queryClass = (String) this.selectManyListBox.getAttributes () .get ("queryClass");
    System.out.println (".. queryClass of attr..." + queryClass);
    }
    If (queryClass is nothing)
    queryClass = "glog.server.query.powerdata.InvolvedPartyQualQuery";
    this.selectManyListBox.getChildren () .addAll (buildDropListSelectItems (queryClass));
    }
    }

    Thank you.

    Hello

    If your declarative component has a defined class of request attribute then #{attrs.name_of_attribute} called from Java should be able to solve

    Frank

  • Declarative component ADF - TagLib version

    Hi experts. I use jDeveloper 11.1.1.7.0.

    I upgraded a declarative component and I want to publish it with version 2.0.

    I added a MANIFEST. MF file with version 2.0 to generate the ADF library JAR but JDeveloper continued showing me version 1.0 when I add the JSP tag library to my test application. (attached printscreen)

    How can I do for jDeveloper displays the library with version 2.0 when they are imported as JSP tag library into an application?

    TagLib version is contained in the tag library descriptor (TLD) file

    On your screenshot: "META-INF/Combo AutoSuggest.tld.

    Dario

  • How to conditionally bind the declarative component custom ADF ADF Faces

    Hi gurus,

    I created the custom declarative component called "Historical Record", following the article of Frank Nimphus Oracle ADF Code corner: How to bind custom declarative ADF Faces components and it works perfectly find.

    But I want to strengthen further to make more generic, as in Oracle EBS we can go to all the blocks and choose Tools-> history of the record and it shows WHO columns to the currently selected record.

    The intention is conditionally bind the attributes of the component with columns of WHO bodies VO.

    The scenario is:

    * all tables have Created_Date, Modified_Date for columns of the WHO.

    * the page containing the 2 instances of VO with different source (for example:-> emp dept)

    * whenever I have navigate dept records it should display columns WHO selected dept and the same thing then to move through the records of the emp.

    Kind regards

    Ferrere

    Well as I said, you shouldn't try to rebuild the Oracle Forms technology-specific behavior in some other technologies such as ADF (because it is not usually possible).

    It is probably best to have a separate button for each shape (square to a coherent position on all pages - as some form, toolbar header...)

    If you want to rebuild the behavior of forms, then you can use the combination of af: clientListener / af:serverListener to set a flag (as the name iterator) see scope that can be used by your 'global' button to retrieve the correct data. Therefore, add af:clientListener to each component entry...

    Dario

  • Model of ADF for use within the declarative component project

    Hello

    JDev 11.1.2.4

    I created a project for my declarative components. I want to create an element with an attribute of type oracle.jbo.Row, but this class is not recognized. What are the libraries I need to include if I want to use the object Row.

    Some basic information: my declarative component is bound to a managed bean.

    Import oracle.jbo.Row;

    @ManagedBean (name = "audit")

    @RequestScoped

    public class AuditBean {}

    Online Privacy;

    public AuditBean() {}

    Var UIXDeclarativeComponent = (UIXDeclarativeComponent) JSFUtils.resolveExpression("#{comp}");

    If (vars == null) {}

    again, throw PropertyNotFoundException ("could not find the name of the attribute [comp] component declarative Vars.");

    }

    line = vars.getAttributes () .get ("row");

    }

    }

    Most of our table have the same fields of audit, and we want to create a component that displays audit information. The component would take the line and check if the attributes are present, if so, display them.

    Thank you

    Hello

    Line belongs to the ADF runtime library. However, your declarative component seems to have another flaw, that is, it uses a bean managed within the scope of the request. She should better use backingBean range (a range of task flow) so it can be used multiple times on a page without the substitution of a previous rendering information. Maybe this isn't a problem if the component cannot forget his condition after rendering

    Frank

  • Create a custom as container declarative component

    Hi all

    I use Jdev 12 c.

    I want to create a custom declarative component like this:

    Container.JSF:

    <af:panelGroupLayout id="#{attrs.Name}_VIEWPORT" layout="scroll" binding="#{attrs.Binding}"
                             inlineStyle="position:absolute;width:#{attrs.ViewportWidth}px;height:#{attrs.ViewportHeight}px;top:#{attrs.ViewportY}px;left:#{attrs.ViewportX}px;border:1px solid;background:#c6c6ff;z-index:#{attrs.ZIndex};">
            <af:panelGroupLayout id="#{attrs.Name}" layout="scroll"
                                 inlineStyle="position:absolute;width:#{attrs.Width}px;height:#{attrs.Height}px;">
              
            </af:panelGroupLayout>
        </af:panelGroupLayout>
    <af:xmlContent>
            <afc:component>
                <afc:description/>
    ....
    ....
    </af:xmlContent>
    

    I use this custom component to group some child components like this:

    < abc: container... >

    < af:inputText... / >

    < af:inputText... / >

    < / abc: container >

    But the things is in the Java code, I can't get components RichInputText:

    It is my function:

        private void getFacetAndChild(UIComponent parent) {
            Iterator childrens = parent.getFacetsAndChildren();
            while (childrens.hasNext()) {
                UIComponent child = (UIComponent)childrens.next();
                System.out.println("Log child >> " + child);
                getFacetAndChild(child);
            }
        }
    


    this function will print only the second RichPanelGroupLayout.

    Any ideas to help me get all the RichInputText?

    Thank you and best regards!

    Hi all

    I found the solution. Just add a facet for custom container

    1. inlineStyle = "position: absolute;" width: #{uploading. ViewportWidth} px; height: #{uploading. ViewportHeight} px; top: #{uploading. ViewportY} px; left: #{uploading. ViewportX} px; border: 1px solid; background: #c6c6ff; z index: #{uploading. ZIndex}; » >
    2. inlineStyle = "position: absolute;" width: #{uploading. Width} px; height: #{uploading. Height PX}; » >
    3. ....
    4. ....

    And the used page:

    Maybe this solution will help others to create a custom container

    Thank you and best regards!

  • Declarative component and passing variable and resource group

    Hello

    I have the doubt in the component using declarative

    I'm call declarative component as...

    < af:declarativeComponent = viewId "folder/dc.jsff" id = "dc_dc10" > "

    < name f: attribute = "var" value = "Display" / >

    < / af:declarativeComponent >

    In dc.jsff

    <? XML version = "1.0" encoding = "UTF - 8"? >

    " < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"xmlns:af =" " http://xmlns.Oracle.com/ADF/faces/rich " " > "

    < var af:componentDef = "uploading" >

    < af:xmlContent >

    " < element xmlns =" http://xmlns.Oracle.com/ADF/faces/rich/component "> "

    < description > < / description >

    < attribute >

    < name of the attribute - > var < / attribute name >

    java.lang.String < class attribute > < / attribute class >

    < / attribute >

    < / component >

    < / af:xmlContent >

    Threshold works perfectly...

    "{[< af:outputText id ="dc_ot1"value =" #{bundle ['Display.one]} "]}" / >

    Threshold of does not work...

    Trail 1)

    < af:outputText id = value = "#{bundle ['var.one']}" / "dc_ot1" >

    Reason for not working: var is not taken as a variable

    Trail 2)

    < c:set var = 'temp' value = "#{bundle ['display']}" / >

    < af:outputText id = value = "#{temp.one'}" / "dc_ot1" >

    < / af:componentDef >

    < / jsp:root >

    User, please tell us your jdev version!

    I do not understand your question.

    I understand what you try to do, is to reassess a variable inside an EL. There is no reassessment within an EL (as you have already discovered).

    Why don't spend you the ' #{bundle ['Display.one']} "directly on the declarative component instead of pass the name of the key to read from the package?

    Timo

  • Declarative component are not available in the page fragment

    Hello

    I created the declarative component... But it can only access *.jsf page not page fragment...

    Hello

    Had in fact I created declarative component by using the page faclet (*.jsf)...  If I create DC using .jspx page... It's work

    Thank you

    Nitesh

  • Integrating a declarative component written in JSF 1.2 in a jsf page

    Hello

    I have a declarative component written in JSF 1.2. I want to integrate this declarative component in an ADF application using JSF 2.0.

    On creating a page jspx in JSF 2.0 & coating component decalrative it works very well, but I have to integrate in a JSF page instead, which does not work.

    Any suggestions?

    Thank you
    Serge

    Hello

    for JDeveloper 11 g R2, you will need to know before I know if the application that you build using JSPX or Facelets pages documents. The technologies are different (introduced with JSF 2) and declarative elements must be build for the type of document used by the application

    Frank

  • Pass a value change listener to a declarative component

    I use JDeveloper 11.1.1.6.0
    I am able to create my declarative component, but I need the ability to switch in listeners of different value changes depending on where the component is used, and sometimes I need to have no value for the component change listener.
    Currently, I tried to get the element with an attribute "ValueChangeListener' of type 'javax.el.MethodExpression' and gave the EL method in the method that handles the value change events. However, whenever I run the application, I get the following error at an event for change of value on the component. It acts as if I am the EL of passage is empty, but I do not understand why. I approach this issue the correct way or is there another approach recommended for this? If I approach it as expected, I have help to determine what I am doing wrong?

    ----------------
    error
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
    javax.faces.el.EvaluationException: Method not found: {}.ValueChangeListener(javax.faces.event.ValueChangeEvent)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:214)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:444)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:701)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ProcessValidationsCallback.invokeContextCallback(LifecycleImpl.java:1422)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:397)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.servlet.ServletException: Method not found: {}.ValueChangeListener(javax.faces.event.ValueChangeEvent)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.faces.el.EvaluationException: Method not found: {}.ValueChangeListener(javax.faces.event.ValueChangeEvent)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:214)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:444)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:701)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ProcessValidationsCallback.invokeContextCallback(LifecycleImpl.java:1422)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:397)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 38 more
    The declarative component level code
    <af:componentDef var="attrs" componentVar="component">
    ...
    <af:inputText label="#{attrs.Label}" id="dc_it1"
                          valueChangeListener="#{attrs.ValueChangeListener}"
                          partialTriggers="#{attrs.partialTriggers}"/>
    ...
    <attribute>
              <attribute-name>
                ValueChangeListener
              </attribute-name>
              <attribute-class>
                javax.el.MethodExpression
              </attribute-class>
            </attribute>
    ...
    test code of the page
    <af:panelFormLayout id="pfl1">
              <af:panelGroupLayout id="pgl1" partialTriggers="cb1">
                <gt1:customInputText id="cit1"
                                          Value="#{backingBeanScope.Section508TestBean.val}"
                                          Label="aeqawefawe"
                                          ValueChangeListener="#{backingBeanScope.Section508TestBean.valueChangeListener}"/>
              </af:panelGroupLayout>
              <af:commandButton text="commandButton 1" id="cb1"
                                actionListener="#{backingBeanScope.Section508TestBean.changeAndRefresh}"
                                partialSubmit="true"/>
              <af:inputText label="Label 1" id="it1" autoSubmit="true"
                            valueChangeListener="#{backingBeanScope.Section508TestBean.valueChangeListener}"/>
            </af:panelFormLayout>

    Hello

    In JavaServer Faces, components raise events to notify the application of a change or user interaction. The declarative elements in Oracle JDeveloper 11g allow the component developer spend events and actions of the method to the page of your. A method's return type and optional arguments that are passed to the call. On the page of your, ExpressionLanguage is used to bind the method property of the component to a managed bean with the expected signature method.

    If you create a method attribute (method tab) and click the button [...] in the field of the method Signature. Define the return 'null' and the parameter type of method like "javax.faces.event.ValueChangeEvent" then you can set up a change of value for her listener in the consumer application

    So what you did is simply not the right approach

    Frank

  • Declarative component: InputText: returning from the return to the original value.

    Hello Guyz,
    I have a component declarative which has only one inputText component, and I want people to enter only valid value on this inputText, if the user types any other value, the valid value, I want to replace the original value it was before.

    p.s. the declarative component has an inputText and I try to update this inputText inside the declarative part.

    Example:

    ValidValue = 'HR', 'Account', 'FINANCE '.

    inputText inside the declarative part is showing 'HR' for now... I changed it to 'HR2' now, I want to go back to 'HR' when valueChangeListener is called.
          this.setValueToEL(valueString,
          valueChangeEvent.getOldValue()); //Updates the model
    
      public void setValueToEL(String el, Object val)
      {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ELContext elContext = facesContext.getELContext();
        ExpressionFactory expressionFactory =
          facesContext.getApplication().getExpressionFactory();
        ValueExpression exp =
          expressionFactory.createValueExpression(elContext, el, Object.class);
        exp.setValue(elContext, val);
      }
    But he does not appear in the user interface when I tab out of this component... I have true and ValueChangeListener autoSubmit but the refresh of the user interface is the question... Your help is appreciated.

    Thank you

    Try if one of these AIDS:

    1 reset the component itself on valueChangeListener?

    yourInputText.resetValue ();

    2 make the customer inputText component true and as mentioned codigoadf.

  • How to use the declarative component without deployed as JAR

    Hi all
    I want to create a reusable component (declarative component) for PanelHeader with default features packed in I want to use in my application. Because this component will be used only in my project, I don't see a use to go through the process of creating a jar and deploying it before using it. Is it possible to use this component without creating a JAR.

    Thank you
    -Srini.

    User 895137,

    your welcome to ignore the best practices in the development of the ADF. The declarative elements are deployed in the libraries of the ADF. If you keep the declarative component in the application then project you will have a chance to deploy independent of the application (which means that your ADF library contain more than just the source of the component (which is where your nightmare begins)). Therefore, best practices

    1. create the declarative component in a new project in JDeveloper. Follow

    http://download.Oracle.com/docs/CD/E21764_01/Web.1111/b31973/af_reuse.htm#BABJBFDD

    2. If you don't ant to deploy components in a tag library, use declarative dynamic components (will not deploy-able in many applications, as you mentioned your future plan is), as shown here

    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_declarativeComponent.html
    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_componentDef.html
    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_xmlContent.html

    Frank

Maybe you are looking for