Jdev 11 g - change visible attribute of another object based on click

Hi there all,

I'm new to Jdeveloper, ADF and am initially impressed by the amount of information and tutorials on the web. I was able to successfully create my own search and display type applications using the PPR and a few other nice features.

However, I am looking for a technique that will allow me to hide or display another object based on a click.

I saw a few guides that guide you through the creation of Java code, but descriptive, it seems that I should be able to put a condition on the visible tab.

If Yes, can someone help me with this syntax? If this isn't the case, I need to create a ManagedBean? Or a PageFlow? These are all terms, I'm new too, please bear with me. I would have thought, that I could choose an event "click" or something like that and the target property. I think with JDeveloper, I would need to bind the object to a listener of some sort.

Help much appreciated!


Simon

As you will be required to show/hide other components based on the click of a button, would need you the component references in the managed bean and to ensure that changing the visible property is reflected on the component, you would use PPR.

To illustrate the use case that you mentioned, we have two buttons namely show & hide to show/hide an inputtext component.

(1) create a page named SamplePage.jspx
(2) create the necessary components on the page.
(3) create a managed bean class named SamplePageBean & save the bean in the adfc-config file in requestScope.
(4) create a reference for the inputText component in the bean managed as inputText.
(5) on the actionListener for each of the buttons property, create a method to show/hide the inputText component by setting the respective property.

The Code snippets include:

(1) SamplePage.jspx



xmlns:f = "http://java.sun.com/jsf/core".
xmlns:h = "http://java.sun.com/jsf/html".
xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >





actionListener = "#{SamplePageBean.onShowClick}" / >

actionListener = "#{SamplePageBean.onHideClick}" / >

Binding = "#{SamplePageBean.inputText} '"
partialTriggers = 'cb1, cb2' / >



(2) SamplePageBean.java

package view.bean;

Import javax.faces.event.ActionEvent;

Import oracle.adf.view.rich.component.rich.input.RichInputText;

public class SamplePageBean {}
private RichInputText inputText;

public SamplePageBean() {}
}

{} public void setInputText (RichInputText inputText)
this.inputText = inputText;
}

public RichInputText getInputText() {}
return inputText;
}

{} public void onShowClick (ActionEvent actionEvent)
this.inputText.setVisible (true);
}

{} public void onHideClick (ActionEvent actionEvent)
this.inputText.setVisible (false);
}
}

Thank you
Nini

Tags: Java

Similar Questions

  • Change the attributes to multiple objects in the overview

    Hello!

    I'm sure that the answer to that is pretty simple, but I can't get the effect so I post here on this subject.

    I want to configure an object (such as a logo) where, when you go over it, change attributes for multiple objects.

    For example, if I have a white box, with three different lines of text inside it, when you hover, I want the box to become black, one of which becomes green to become blue text and a line turn red.

    But when I put this up, the text color changes when I hover over each line of text (they are in different text boxes) not when I fly over the area as they are.

    the only way I found to do this is by using the status button widget, but I don't want to have to use to do anything where multiple objects must change state.

    Thanks in advance

    -Connor

    Hey Connor,

    You can use a widget of composition to achieve this effect.

    Keep the trigger and transparent target filling and place of relaxation on the top of your Logo.

    Now you can put the modified content (as you want on turnover) in the target container and place it exactly on top of your original content.

    Please refer to the video (see the widget part) who could help: Adobe Muse: Customize Widgets - YouTube

    Let us know if it helped or not.

    Kind regards

    Akshay

  • Change of object based on position frame

    Is it possible to change the State of an object based on its position on the screen?  For example, if the position of the object hits X and Y of the post, change of scenery at number 32.  Or something in the same vein?  Thank you very much!

    You can't have two functions with the same name.

    According what I see of the repetition, this code for the two functions can be combined and reduced to the following...

    stage.addEventListener (Event.ENTER_FRAME, checkForHit);

    var items: Array = new Array (obj, obj2);

    function checkForHit (): void {}

    for (var i = 0; i)

    for (var n = 1; n)<22;>

    {if (items [i] .hitTestObject (this ["invisibleObj" + String (n)])}

    Objects [i] .gotoAndStop (n);

    break;

    }

    }

    }

    }

    (Note: code has not been tested, there may be some errors/fault of hits)

  • How to query the object attribute changed his mind in another display object

    JDeveloper 10.1.3.4

    My requirement is I want to be able to query an object (entity based) view on a nonkey attribute where the value I'm looking on can either be in the database on an existing record or only been experienced by updating a different point of view object based on the same entity (and still commit).

    When you query the second display of a value object just updated via a different point of view object, the second view object always returns no rows. I thought that the process is:

    EntityA
    ViewObjectA based on EntityA
    ViewObjectB based on EntityA

    ViewObjectA - line query with the key = 123. update the attribute Y with value 456 (attribute Y in the null database). Feature for EntityA cache, touch 123, attribute is updated with the value 456
    ViewObjectB - line application with attribute = y. wait record in EntityA just updated cache to be returned. Instead, nothing is returned

    Here is the code I was using (where RandScheduleEdit and RandScheduleSearch are the same view the entity RandSchedule object-based objects)
      public static void main(String[] args) {
        String        amDef = "test.cache.model.AppModule";
        String        config = "AppModuleLocal";
        ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
        
        ViewObject rsEdit = am.findViewObject("RandScheduleEdit");
        Key rsKey = new Key(new Object[]{40});
        Row[] rsEditRows = rsEdit.findByKey(rsKey,1);
        Row rsEditRow = rsEditRows[0];    
        rsEditRow.setAttribute("SId", new Number(7827));
        
        ViewObject rsSearch = am.findViewObject("RandScheduleSearch");
        rsSearch.setWhereClause("S_ID = :SId");
        rsSearch.defineNamedWhereClauseParam("SId", null, null);
        rsSearch.setNamedWhereClauseParam("SId",new Number(7827));
        rsSearch.executeQuery();
        Row rsSearchRow = rsSearch.first();
        
        Configuration.releaseRootApplicationModule(am, true);
      }
    Why not rsSearch finds the S_ID = 7827 record? It seems to only be interviewing new records in the database and ignoring the record updated in cache just updated?

    Any help much appreciated.

    See you soon,.
    Brent

    rsSearch.setNamedWhereClauseParam ("SId", new Number (7827));

    This might help:
    rsSearch.setQueryMode (ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);

    rsSearch.executeQuery ();

  • How the metadata change by Lightroom and another application?

    I often get the message "the metadata for this photo has been changed by Lightroom and another application. Lightroom import settings from disk or replace drive with the catalog settings? "on the images in my catalog. I only use Lightroom to organize, add keywords, basic settings, etc.. On occasions, I take a picture in Photoshop to work more, it is exported in a TIFF or PSD file and the original stays in the catalog LR blank any other thing I could do to the image.

    I have two choices with this message: settings to use Lightroom, OR crush them to disk. The first time it has scared me, as I had no idea where these changes were and why the disk file was something different that lightroom catalog. I have all my metadata stored in XMP files. But I took the chance and said: replace the LR settings and didn't change anything on the sliders or the displayed image. I then tried a little saying 'Keep the LR settings', and again, I didn't see any visible signs of changes. This leads me to believe that they are NOT changed but things LR, they are somehow. But I do not see it, I want it to go away unless there really changes happening outside of LR (as if I went to the bridge or something...)

    Any ideas why this message? I just discovered approximately 100 images in a collection of images, I sent to the Agency in stock three years ago and have not done something with them outside LR since.

    Thanks for any help you can give.

    Users have complained for years about the fake notifications of metadata has changed.  If you are convinced that you do not change the file itself outside LR, then choosing settings Overwrite will rewrite the metadata in the file with the metadata for catalogue and (usually) to make the fake notification disappear.

    Unfortunately, LR does not tell you the metadata fields have been changed, so that users are left flying blind.  In my opinion, Rob Cole had a plugin that will tell you the metadata for the differences between the catalog and the disk file, but its Web site has been down for a couple of weeks now.

    ManiacJoe: My guess is that Photoshop updates some fields of EXIF data in the raw, for example the "edited with the software" file field. Given that Lightroom has probably already established in this field, it gives you a warning that something has changed.

    Interesting hypothesis.  I just tested with LR 5.7.1, Photoshop CC 2014, OS X 10.10 and could not reproduce the problem.  I have exported a TIFF file to a raw file that is catalogued in the same folder as the raw, TIFF edition and changed some of its metadata in Photoshop, and saved.  LR didn't report a notification of change-a metadata.

    In general, I'd be surprised if you changed x.tif in PS, it would change all the metadata in x.cr2 or x.xmp (moderately).

  • Can I change password Firmware from another Mac

    Can I change password Firmware from another Mac

    N °

  • Cannot change my email to another email address

    I tried to change my email to another email address of my. Then he said: enter your password. First of all, I typed my password for my email address, that does not work. So I tried the other email password of the mine, and it does not work. I checked two e-mail password and they work fine on outlook. What should I do?

    Edit: just found out that it has something to do with my microsoft account.

    found answer

    http://community.Skype.com/T5/Windows-desktop-client/password-invalid-when-signing-in-or-updating-PR...

  • Change the attributes of the camera with a .ini file

    Hello.

    I would change some attributes of camera through an INI file, before you run the User Interface.

    The problem is that when I view the values of the modified attributes, they are not changed: it's always the same values as in the case of camera NIMAX.

    In fact, I've logged IMAQdx with IMAQdxOpenCamera, then I loaded the Camera.ini value for the attributes of the camera, and finally, I closed the session with IMAQdxCloseCamera.

    I can't wait to see your ideas!

    Thomas1330

    Hello

    in fact, I solved the problem.

    I used the following function: IMAQdxReadAttribute (session id, ini_pathname)--> only the attributes in the .ini are changed in the file of the camera until I close my program

    Thomas1330

  • Prevent change plot-attributes executionmode

    Hello

    If I run a program with a graphic, I do want to be able to change the attributes of the plot (s).

    Is this possible without hiding the plotlist?

    Bravo will be given: mantongue:

    Hi Hannah,

    Yes you can do it. Use the LegDisable property of the graph and the field to true.

  • WinXP PRO, the recovery console, could not change an attribute

    Hello, I installed the recovery console, and so far I just used it to run chkdsk. Today, I tried to change the attribute on a read only file. I typed attrib - r h mitchell. I kept getting a msg saying that the settings were wrong. I checked attrib /? and he followed correctly, I thought. I am running winxp pro svc pk 3, ie8. Thanks in advance for any help.

    Good for you.

    Someday, you'll be glad you did.

    Mitchell, is a file or a folder?

    In the Recovery Console, you do not have access to each file and folder on your system.  You cannot in all cases - this isn't how the Recovery Console.

    You can read this article:

    http://support.Microsoft.com/kb/314058

    The Recovery Console is the recovery so that he knows only about some things - do not change the attributes on files and folders.

    There are some other bootable CD, you can use for this.

    If you have some kind of issues or problems and need some ideas, trying to better describe what you try to do it and someone can help.

    They are taunting on this other thread needing a response... Although I got to me 23 SE other than "answers" today that match the requirements.

    This is the answer the day.

  • How can I change the attributes read-only or system files?

    How can I change the attributes read-only or system files?

    To view or to remove the read-only or system attributes, use the Attrib command at a command prompt:

    1. click the Start button, type cmd in the search box and press ENTER.

    2. to view the syntax for the Attrib command, Type attrib------? at the command prompt.

    WARNING: If you remove the read-only or a file system attribute, it may seem like a regular folder and some customizations may be lost. For example, Windows customizes the Fonts folder and provides a special folder view that allows you to hide variations, such as bold and italics. It also allows you to change the display settings of the file in a way that is specific to fonts. If you remove the read-only attributes and the Fonts folder system, these custom display settings not available. For folders that you have customized by using the tab, customize the folder properties dialog box, the folder icon and other other customizations may be lost when you remove the read-only attribute.

    If a program cannot save files to a folder with read-only, such as My Documents, change the read-only to the system attribute by using the Attrib command at a command prompt.

    To remove the read-only attribute and to set the system attribute, use the following command:

    attrib - r + s drive:------------.

    For example, to remove the read-only attribute and set the attribute to system for the C:\Test folder, use the following command: attrib - r + s c:\test

    Be aware that some programs may not work correctly with folders for which the read-only attribute and the system attribute are granted. You can use the following command to remove these attributes:

    attrib - r-s c:\test

  • You will need to provide administrator permission to change these attributes

    I am an administrator, I'm doing a completely read/write folder, but I get "you need give the administrator permission to change these attributes.

    The folder is c:\program files\ and then some void / folders for a Microsoft product.

    I have "Everyone" in the security with total control tab and it still does not work.

    I need to make the file read/write

    Thank you

    You have to disable UAC (User Access Control) temporarily to that of such changes. Then, you may find that the changes do not affect the access to these folders because access is controlled by the UAC. Have a look here for more details on UAC: http://support.microsoft.com/kb/951016/

  • Hello! How is it possible to change the subscription to another product?

    Hello! How is it possible to change the subscription to another product?

    Cancel what you have and buy new

    You need to contact Adobe to do this, or you may have to pay a penalty of cancellation

    This is an open forum, not Adobe support... Click below to contact Adobe staff for help

    While the forums are open 24/7 you can't contact Adobe support at any time

    Chat support: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • When I try to change the interactive report columns, then triggers the error: "unable to change column attributes. "ORA-01403: no data found. Pls tell me why?

    When I try to change the interactive report columns, then triggers the error: "unable to change column attributes. "ORA-01403: no data found. Pls tell me why?

    You use listener EA3 ADR?

  • How to bind the 'Visible' attribute programmatically

    I use 11.1.1.6 JDeveloper.


    I have a MyBean method:

    Boolean isImgVisible() {}

    a logic here

    }


    If I have a page fragment with

    < af:image visible = "#{pageFlowScope.myBean.imgVisible" "

    ID = "i2" source="/Images/img.gif"/ >

    The 'Visible' link is ok


    But I want to do it programmatically


    In my bean, I created a RichImage


    RichImage img = new RichImage();

    img.setSource("/Images/progress.gif");

    IMG.setVisible("#{pageFlowScope.myBean.imgVisible");  This does not of course

    How to link the method above (isImgVisible()) 'Visible' attribute programmatically?

    Thank you

    In case someone needs it:

    RichImage img = new RichImage();

    img.setSource("/Images/progress.gif");

    img.setValueExpression ('visible' createValueExpression ("#{pageFlowScope.myBean.imgVisible"));

    Helper method

    public createValueExpression (string expression) {} ValueExpression

    FacesContext facesContext = FacesContext.getCurrentInstance ();

    Application app = facesContext.getApplication ();

    ExpressionFactory elFactory = app.getExpressionFactory ();

    ELContext elContext = facesContext.getELContext ();

    ValueExpression valueExp =

    elFactory.createValueExpression (elContext, expression,

    Object.Class);

    Return valueExp;

    }

Maybe you are looking for