setValue and getValue selectOneChoice

Jdev 11.1.1.7

try the following code:

Have a selectOneChoice as:

< af:selectOneChoice value = "#{bindings." ApplicationsVO1.inputValue}.

label = "Select the Application" autoSubmit = 'true '.

required = "#{bindings." ApplicationsVO1.hints.mandatory}.

shortDesc = "#{bindings." ApplicationsVO1.hints.tooltip}.

ID = "soc1.

Binding = "#{pageFlowScope.CRoleARoleBean.applicationSOC}" >

< f: selectItems value = "#{bindings." ApplicationsVO1.items}.

ID = "si1" / >

< / af:selectOneChoice >

The following execution time:

"String temp = getApplicationSOC () .getValue ()! = null? getApplicationSOC () .getValue () m:System.NET.SocketAddress.ToString ():" ";" "

getApplicationSOC () .setValue (temp);

Basically, to get the value and set the same value but get following error message:

< SimpleSelectOneRenderer > < _getSelectedIndex > could not find selected corresponding to the "9" value item < index of the selected item > in RichSelectOneChoice [UIXEditableFacesBeanImpl, id = soc1]

What is the problem with this approach?

This is the right way to do:

"String appId = getApplicationSOC () .getValue ()! = null? getApplicationSOC () .getValue () m:System.NET.SocketAddress.ToString ():" ";" "

int appIdInt = Integer.parseInt (! appId.equals("")? appId: "0");

getApplicationSOC () .setValue (appIdInt);

SetValue would recognize that if a whole and not a string that is the reason why I was getting

<_getSelectedIndex>Did not find selected corresponding to heart... item exception

Tags: Java

Similar Questions

  • Scenario of two parents SelectoneChoice and child selectOneChoice

    Hello

    I use jdev 11.1.1.5

    I use selectOneChoice cascading. Everything is working fine.but I had another requirement. I have search Vo, that have all of the transient attributes.

    few attribute this choice VO have LOV. For example

    I have childLov1 and parent1 lov. ChildLov1 have views on the criteria that is passed by the attribute of parentLov1.Now I have an another parentLov2 which is almost identical to parentLov1.

    My use case is updated on the basis of parentLov1 or parentLov2 childLov1. Setting a day will come from parentLov1 or, sometimes, parentLov2

    How to get there?

    All three lov of a VO research?  Please suggest?

    I solved this problem using the variable layout application session

  • [BUG]? SelectOneChoice ValueChangeListener works for all elements except one

    Hello


    I have a SelectOneChoice that displays a warning in different languages.

    I have a LOV to select and an input field to display the warning.

    Everything works to display the following warning language except for the first choice in the SelectOneChoice.

    Here is the method in my bean
        public void languageSelectOne_valueChanged(ValueChangeEvent valueChangeEvent)
        {
         //Update the model
         this.setValueToEL("#{bindings.PageLanguage.inputValue}",
                     valueChangeEvent.getNewValue()); 
         log.info("Selected Value: " +
               JSFUtils.resolveExpression("#{bindings.PageLanguage.attributeValue}"));
         log.info("Display Value: " +
               JSFUtils.resolveExpression("#{bindings.PageLanguage.selectedValue ne ' ' ? bindings.PageLanguage.selectedValue.attributeValues[0] : ''}"));
    
         BindingContainer bindings = ADFUtils.getBindingContainer();
         DCIteratorBinding iter =
                 (DCIteratorBinding) bindings.get("DisclaimerIterator");
         ViewObject disclaimerVo = iter.getViewObject();
         Integer langChosen =
                 Integer.parseInt((String) JSFUtils.resolveExpression("#{bindings.PageLanguage.attributeValue}"));
         Object[] keys = new Object[1];
         keys[0] = langChosen;
         Row[] disclaimerRow = disclaimerVo.findByKey(new Key(keys), -1);
         log.info("Rows returned: " + disclaimerRow.length);
         BlobDomain languageText =
                 (BlobDomain) disclaimerRow[0].getAttribute("PageText");
         log.info("Page Text length: " + languageText.getLength());
         try
         {
             log.info(new String(languageText.getBytes(1,
                                        (int) languageText.getLength()),
                        "UTF-8"));
             this.getDisclaimerText().setValue(new String(
                                  languageText.getBytes
                                  (1,
                                  (int) languageText.getLength()
                                   ),"UTF-8"));
             this.getLangChoice().setLabel((String)disclaimerRow[0].getAttribute("ChooseLanguageText"));
             this.getDisclaimerButton().setText((String) disclaimerRow[0].getAttribute("AgreeButtonText"));
         }
         catch (JboException jboe)
         {
             log.severe(jboe.getMessage());
    
         }
         catch (Exception e)
         {
             log.severe(e.getMessage());
    
         }
         AdfFacesContext.getCurrentInstance().addPartialTarget(getDisclaimerText());
         AdfFacesContext.getCurrentInstance().addPartialTarget(getLangChoice());
         AdfFacesContext.getCurrentInstance().addPartialTarget(getDisclaimerButton());
    
    
        }
    Here's the LOV
    SELECT 
        EPSS_WELCOME_PAGE.PAGE_LANGUAGE PAGE_LANGUAGE, 
        EPSS_WELCOME_PAGE.PAGE_ID PAGE_ID,
    EPSS_WELCOME_PAGE.PAGE_DEFAULT
    FROM 
        EPSS_WELCOME_PAGE
    And here is the VO
    SELECT EpssWelcomePageEO.PAGE_ID, 
           EpssWelcomePageEO.PAGE_LANGUAGE, 
           EpssWelcomePageEO.PAGE_TEXT, 
           EpssWelcomePageEO.PAGE_DEFAULT, 
           EpssWelcomePageEO.CHOOSE_LANGUAGE_TEXT, 
           EpssWelcomePageEO.AGREE_BUTTON_TEXT
    FROM EPSS_WELCOME_PAGE EpssWelcomePageEO
    ORDER BY PAGE_DEFAULT DESC, PAGE_LANGUAGE
    I have a beforePhase method that set the SelectOneChoice to the first element in the list
        // Before Phase method to set the default language in the selectOneChoice
        public void defaultSelectionOnLoad(PhaseEvent phaseEvent)
        {
         RichSelectOneChoice soc;
         soc =
           (RichSelectOneChoice) JSFUtils.findComponentInRoot("langChoice");
         if (soc != null && soc.getValue() == null)
             soc.setValue(new Integer(0));
        }
    The default language is English.

    The first time the page is rendered, the warning in English and the selectOneChoice is IN.
    I choose different languages in the list and everything works as expected. Then I try to display again the English version, and the newspaper returns a zero on the next line
             log.info(new String(languageText.getBytes(1,
                                        (int) languageText.getLength()),
                        "UTF-8"));
    Even if the length of the LOB is equal to 1475 characters

    Now if I change the ranking in my query the native language is Bulgarian.
    The warning is made correctly, switching between languages, and then re - click the first choice (Bulgarian) returns a null value for the waiver.

    The problem has something to do with the first choice in the list.

    Thanks a lot for your help.

    Kind regards
    Senecaux

    Published by: Stessy.Delcroix on June 1, 2011 14:33

    The ValueChangeListener does not fire when the value is back to the original value. It's expected behaviour (i.e. it is how the JSF engine is designed and implemented) and is not a bug. Take a look at Chris Muir comments in these threads:

    {: identifier of the thread = 1098626}
    {: identifier of the thread = 1010102}

    Dimitar

  • value of selectOneChoice in the table gets reset to true visible table

    I have a table with 2 columns. 1 column a inputtext A and another selectOneChoice B.

    Also, I have a selectOneChoice more C above this table. On the "X" value in the drop-down list selection, the table above becomes true visible.

    But at the same time, the selectOneChoice B reset to a value of zero instead of having the value extracted from DB.

    A inputtext has no effect. It displays the value extracted from DB.

    If we say that the table are refreshing causing to reset selectOneChoice B. It is seems to be wrong. Below this table, I have 2 button to add and remove rows from the table.

    Add / delete, table gets refereshed but selectOneChoice B loses its value.

    Before the page loads, set the bean attribute which is used to visible.

  • Force indicator update

    My application uses an indicator of demand (OS 7.0), but even though I can see that the value is correctly set, the account again on the icon does not update.

    The initial value is set correctly by using this:

    protected public static void setIndicator() {}
    unreadCount int = PersistentStorage.getUnreadMessageCount ();
    EncodedImage image = EncodedImage.getEncodedImageResource ("indicator.png");
    ApplicationIcon icon = new ApplicationIcon (image);
    ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance ();
    indicator = reg.register (true false, icon,);
    indicator.setValue (unreadCount);
    indicator.setIcon (icon);
    indicator.setVisible(unreadCount>0);
    }

    Here's the updated code:

    Public Shared Sub updateIndicator (value absolute final int, boolean) {}
    Indicator update
    last indicator of ApplicationIndicator = ApplicationIndicatorRegistry.getInstance () .getApplicationIndicator ();
    If (flag == null) {}
    return;
    }

    If (absolute)
    indicator.setValue (value);
    on the other
    indicator.setValue (indicator.getValue () + value);
    indicator.setVisible (indicator.getValue () > 0);
    }

    The code is always called as planned and the value of the indicator can be collated and is correct, just next to the indicator value is not updated. I would try to call Invalidate() on the indicator, but such does not work.

    A tip?

    Thank you

    Chris

    I suspect this is a problem of the static context and suggests that you put the indicator in the runtimestore.

  • Update the UI in the loop?

    int currentValue = 0;int maxValue = 100;
    
    GaugeField progress = new GaugeField("", 0, maxValue, 0, GaugeField.FIELD_LEFT);add(progress);
    
    while (currentValue < maxValue) {      // do something cpu intensive    currentValue++;    progress.setValue(progress.getValue() + 1);
    
        // what do I do here to force my display to update?  Currently my device is frozen until my loop finishes} 
    

    I googled and tried without success to what I assume is a simple answer.  The code example above is not my real code, it's just something I typed quickly to my question.  Help out me

    OK I understand how to make it work.  Here's what I did for someone else who can be the solution.  I got my update of the gauge in the following block of code.  Can I really change so it updates only every 10 iterations or so since the repaints slow down things a bit.

    synchronized (UiApplication.getEventLock())
    {
        _KMLProgress.setValue(_KMLProgress.getValue() + 1);
        UiApplication.getUiApplication().repaint();
    }
    
  • Progress within datagrid bar

    Hi all

    I have a datagrid in which I have to display the progress bar with the task completed in %.

    for example, I have two fields in a source meter table and counter of the completion.

    where source County in 100000 rows and 50000 lines have been inserted.

    in another table and status are displayed in the table.

    so I need to display in a progress bar that task of 50% has been completed.

    Any suggestions or ideas.

    Sample ex:

    progressbar.jpg

    Hello

    Here's something to play with:

    public class ProgressInTableTest {
        private static final Random RANDOM = new Random();
    
        private final class RunnableDummyProgressProducer implements Runnable {
            private final DefaultTableModel defaultTableModel;
            private final JProgressBar allProgress;
    
            private RunnableDummyProgressProducer(
                    DefaultTableModel defaultTableModel, JProgressBar allProgress) {
                this.defaultTableModel = defaultTableModel;
                this.allProgress = allProgress;
            }
    
            @Override
            public void run() {
                for (int i = 0; i < progressEntries.size(); i++) {
                    ProgressEntry progressEntry = progressEntries.get(i);
                    while (100 > progressEntry.progress * 100
                            / progressEntry.fileSize) {
                        progressEntry.progress += 10;
                        defaultTableModel.fireTableCellUpdated(i, 2);
                        try {
                            Thread.sleep(50);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                    progressEntry.progress = progressEntry.fileSize;
    
                    SwingUtilities.invokeLater(new Runnable() {
    
                        @Override
                        public void run() {
                            allProgress.setValue(allProgress.getValue() + 1);
                            allProgress.setString(String.format("%s / %s",
                                    allProgress.getValue(),
                                    allProgress.getMaximum()));
                        }
                    });
                    defaultTableModel.fireTableCellUpdated(i, 2);
                }
            }
        }
    
        private final class DefaultTableCellRendererExample extends
                DefaultTableCellRenderer {
            private static final long serialVersionUID = 1L;
    
            @Override
            public Component getTableCellRendererComponent(JTable table,
                    Object value, boolean isSelected, boolean hasFocus, int row,
                    int column) {
                Component rendererComponent = super.getTableCellRendererComponent(
                        table, value, isSelected, hasFocus, row, column);
                JTextField newRenderer = new JTextField();
                ProgressEntry progressEntry = progressEntries.get(row);
                switch (progressEntry.progress * 100 / progressEntry.fileSize) {
                case 0:
                    newRenderer.setText("pending");
                    return newRenderer;
                case 100:
                    newRenderer.setText("done");
                    return newRenderer;
                default:
                    rendererComponent = new JProgressBar(0, progressEntry.fileSize);
                    JProgressBar jProgressBar = (JProgressBar) rendererComponent;
                    jProgressBar.setValue(progressEntry.progress);
                    jProgressBar.setStringPainted(true);
    
                }
                return rendererComponent;
            }
        }
    
        private final class DefaultTableModelExample extends DefaultTableModel {
            private static final long serialVersionUID = 1L;
            private final String[] columnNames = { "file name", "file size",
                    "progress" };
    
            private DefaultTableModelExample(int rowCount, int columnCount) {
                super(rowCount, columnCount);
            }
    
            @Override
            public String getColumnName(int column) {
                return columnNames[column];
            }
    
            @Override
            public Class getColumnClass(int collumn) {
                switch (collumn) {
                case 1:
                    return Integer.class;
                case 2:
                    return ProgressEntry.class;
                default:
                    return String.class;
                }
            }
    
            @Override
            public Object getValueAt(int row, int column) {
                switch (column) {
                case 0:
                    return progressEntries.get(row).fileName;
                case 1:
                    return progressEntries.get(row).fileSize;
                case 2:
                    return progressEntries.get(row).progress;
                default:
                    return super.getValueAt(row, column);
                }
            }
        }
    
        public class ProgressEntry {
    
            private final String fileName;
            private final int fileSize;
            private int progress = 0;
    
            public ProgressEntry(String fileName, int fileSize) {
                this.fileName = fileName;
                this.fileSize = fileSize;
            }
    
        }
    
        private final List progressEntries = new ArrayList();
    
        @Test
        public void test() {
            initializeSampleData();
            JProgressBar allProgress = createFileCountProgress();
    
            DefaultTableModel defaultTableModel = new DefaultTableModelExample(
                    progressEntries.size(), 3);
            JTable table = createTable(defaultTableModel);
            startDummyProcess(allProgress, defaultTableModel);
    
            JPanel message = completeGUI(allProgress, table);
    
            JOptionPane.showMessageDialog(null, message, "ProgressTest",
                    JOptionPane.PLAIN_MESSAGE);
        }
    
        private JPanel completeGUI(final JProgressBar allProgress, JTable table) {
            JPanel message = new JPanel(new BorderLayout());
            message.add(new JScrollPane(table), BorderLayout.CENTER);
            message.add(allProgress, BorderLayout.SOUTH);
            return message;
        }
    
        private void startDummyProcess(final JProgressBar allProgress,
                final DefaultTableModel defaultTableModel) {
            new Thread(new RunnableDummyProgressProducer(defaultTableModel,
                    allProgress), "ProgressTest").start();
        }
    
        private JTable createTable(final DefaultTableModel defaultTableModel) {
            JTable table = new JTable(defaultTableModel);
            table.setDefaultRenderer(ProgressEntry.class,
                    new DefaultTableCellRendererExample());
            return table;
        }
    
        private JProgressBar createFileCountProgress() {
            final JProgressBar allProgress = new JProgressBar(0,
                    progressEntries.size());
            allProgress.setStringPainted(true);
            return allProgress;
        }
    
        private void initializeSampleData() {
            for (int i = 0; i < 20; i++) {
                progressEntries.add(new ProgressEntry(String.format("IMG_%03d.jpg",
                        i), RANDOM.nextInt(1000)));
            }
            for (int i = 0; i < 3; i++) {
                progressEntries.get(i).progress = progressEntries.get(i).fileSize;
            }
            progressEntries.get(3).progress = 50;
        }
    }
    

    Good bye

    DPT

  • Script client to get their hands on the table af page number

    Hello

    I use Jdev Studio Edition Version 12.1.2.0.0

    In my jsf page, I have a table with scroll like page policy and the size of the field is 25. I wrote a script client side to select all rows in the table. I have a check boxes on each line od the table which is activated when the header checkbox is selected.

    < af:column blockable = 'true '.

    headerText = "#{bindings." EmployeesView1.hints.Selected.label}"id ="c5 ".

    inlineStyle =' #{(row.selected)? {"" "" background-color: #ffaaaa ":" "}; ">"

    < f: facet name = "header" >

    < af:selectBooleanCheckbox shortDesc = "#{bindings." EmployeesView1.hints.Selected.tooltip}.

    ID = "checkboxHeader.

    Binding = "#{TableShuttleBean.selectAllCheckBoxA} '"

    clientComponent = "true" >

    < af:clientListener method = "selectRows" type = "click on" / >

    "< name af:clientAttribute ="tableLocator"value =": t1 "/ >"

    "< name af:clientAttribute ="checkboxLocator"value =": ot5 "/ >"

    < / af:selectBooleanCheckbox >

    < / f: facet >

    < af:selectBooleanCheckbox value = "#{row.selected} '"

    shortDesc = "#{bindings." EmployeesView1.hints.Selected.tooltip}.

    ID = "ot5" autoSubmit = 'true '.

    valueChangeListener = "#{TableShuttleBean.handleSelect} '"

    Binding = "#{TableShuttleBean.CheckBox} '"

    clientComponent = "true" / >

    < / af:column >

    function selectRows (event) {}

    checkbox var = event.getSource ();

    var checkboxLocator = checkbox.getProperty ("checkboxLocator");

    var tableLocator = checkbox.getProperty ("tableLocator");

    var table = checkbox.findComponent (tableLocator);

    var nbRows = parseInt (table.getRows ());

    var tableAbsLocator = table.getAbsoluteLocator ();

    While (nbRows)-{ }

    var rowCheckbox = AdfPage.PAGE.findComponentByAbsoluteLocator (tableAbsLocator + "[" + nbRows + "]" + checkboxLocator);

    If (checkbox.getValue ()! = rowCheckbox.getValue ()) {}

    rowCheckbox.setValue (checkbox.getValue ());

    }

    }

    }             

    }

    nbRows returns to 25 and using code above, I can select all 25 lines to the page under the table.

    But when the user navigates to other pages in the table of the af, then returns to the page where he made the selection, these selections are lost. Is there a way hat I can handle the number of table af in javascript page.

    I took help of http://technology.amis.nl/2013/05/07/adf-client-side-architecture-select-all/#related-postshttp://technology.amis.nl/2013/05/07/adf-client-side-architecture-select-all/#related-posts

    but this the problem of paging.

    I solved the problem by getting the component HTML Id of the text field that displays the page number of table.

  • copy the input values in the text the text of input 2 input 1 using the value change listener

    Hello

    I have two text entry:

    input 1 & 2 text text entry.

    I need to copy in the text of entry 1 input values to enter text 2.

    How to apply this using value change listener?

    I did the following steps:

    (1) I chose 1 text entry and chose listener Value Change-> edit.

    Type a new name for bean & class.

    Should what the name of the method I add?

    Any help please?

    Hello

    Just follow the steps below.

    1 create a jspx page and drag drop two intput text on the page.

    2 linking these two text of entry to bean managed on the basis and the scope of bean on bean with property name inputVal1, inputVal2 and backing

    3. Select the input text 1, go to valueChangeListener property and use the existing bean and give some name of method and the copy of the code in the method below

    inputVal2.setValue (inputVal1.getValue () m:System.NET.SocketAddress.ToString ());

    4. set the autoSubmit = true for the 1st input text. Set partialTrigger = it1 (it1 is id of the 1st input text).

    Now run the page

    Thank you

    Nitesh

  • How the Bean object have been marked with JSTL?

    Hello

    Can we expose me how bean object have been marked to JSTL?

    Thanks and greetings
    Vijay

    Say that you value = "#{x.value}". " If it is in a context where he needs to read the value, she search a managed bean called 'x', looking for the get accessor for the bean property 'value', i.e. of GetValue and calls it. If in a context where he needs to set the value, it seems for the setter, i.e. setValue() and call it. Everything through reflection.

  • MapTrigger behavior with declarative registration

    Hello
    Please help me to better understand the behavior of MapTrigger. I try to use a MapTrigger that inserts changes cache 'Bar' when the 'Foo' Cache changes. I register my BarCacheLoaderTrigger in Foo cache declaratively as follows
     <distributed-scheme>
          <scheme-name>Foo-distributed</scheme-name>
          <service-name>FooDistributed</service-name>
          <backing-map-scheme>
            <local-scheme>
              <scheme-ref>default-binary-backing-map</scheme-ref>
            </local-scheme>
          </backing-map-scheme>
           <listener>
                    <class-scheme>
                        <class-factory-name>com.some.package.BarCacheLoaderTrigger</class-factory-name>
                        <method-name>createTriggerListener</method-name>
                    </class-scheme>
                </listener>
          <autostart>true</autostart>
        </distributed-scheme>
    Here are my questions:
    -Is insitu trigger executed each enabled storage node where the partitions of Foo? It turns on the side server only, or is it also get instantiated on each client that gets a reference to the memory cache?
    -It seems that the instance of MapTrigger is created when I opened a disabled customer console storage to query the cache of Foo. It should not only get instantiated on active storage nodes?
    -When my CacheLoader program runs, filling hundreds of objects of Foo, I observe the severe pretension to query Foo cache (size query takes 30 seconds to get back). This happens when the trigger was not present. Is this normal?
    -What is the implication of getting a NamedCache (for Bar cache) reference with each unique performance of map of relaxation (in the process method)? I can't get the reference once to the instance level and use it for the whole of the cycle because he complained about an exception not serializable the trigger. What is a good model for what I'm doing?

    Please notify

    Thank you
    Sairam

    SKR wrote:
    Thanks for the reply, Robert

    Yes, the two caches are configured with different cache services. The remote control and the application of filter are dear to the processing stage. I like the idea of using KeyAffinity + BackingMapContext for the treatment of trigger and my keys are associable. I guess it would only work if the caches are managed by the cache, service unlike access via NamedCache interface of in a MapTrigger, right?

    Yes, they would need to be in the same cache key affinity service.

    Once you have affinity, so you can transfer affine them entered in the cache of customer research easily, and you can easily access an index on the getCustomerId by the BackingMapContext of the client cache search to remove existing entries:

    BackingMapContext customerSearchCacheBackingMapContext = ((BinaryEntry)entry).getBackingMapContext().getManagerContext().getBackingMapContext(CacheName.CUSTOMER_SEARCH.getNameString());
    MapIndex customerIdIndex = (MapIndex)customerSearchCacheBackingMapContext.getIndexMap().get(new ReflectionExtractor("getCustomerId"));
    Set customerSearchInternalKeys = (Set) customerIdIndex.getIndexContents().get(custId)
    for (Binary internalKey : customerSearchInternalKeys) {
       InvocableMap.Entry customerSearchEntry = customerSearchCacheBackingMapContext.getBackingMapEntry(internalKey);
       if (customerSearchEntry.isPresent()) {
          // this should always be true in your case, but just in case
          entry.remove();
       }
    }
    

    You can use code similar to the following to insert new objects of customer search:

    Converter keyToInternalConverter = customerSearchCacheBackingMapContext.getManagerContext().getKeyToInternalConverter();
    Map newobjects = addCustomerSearchObjects(customer);
    for (Map.Entry newEntry : (Set) newobjects.entrySet()) {
       InvocableMap.Entry customerSearchEntry = customerSearchCacheBackingMapContext.getBackingMapEntry(keyToInternalConverter.convert(newEntry.getKey()));
       customerSearchEntry.setValue(newEntry.getValue());
    }
    

    Don't you see any problem running this as part of a logic of MapTrigger, or advise you to use an EntryProcessor for this?

    This MapTrigger and EntryProcessor would probably be the same thing (you'd have to deserialize the value of the entry anyway).

    Now, there may be some incompletely implemented the feature in consistency that can prevent the insertion of new entries of triggers (I am not sure, but I recall there were a few problems for this scenario with the interceptors again), but this approach can be extended to a wrapper EntryProcessor instead of a MapTrigger that would probably work. If this seems to work, so he does. If it is not the case, then you'd get exceptions or NULL values for the entries in getBackingMapEntry but as I said, I do not remember the precise scenario for these issues.

    This doesn't have to be synchronous with the customer operation put and I am able to run asynchronously if the performance is affected by this.

    According to me, other operations will be not too expensive (even if random has noticeable cost).

    For the run asynchronously, please look at my previous post to get suggestions (using another thread or a new order of control inserted directly in the same partition model). You should test your system to see if it is necessary to make asynchronous.

    Best regards

    Robert

  • Copy contents of af: inputText to af:outputText webcenter underway

    Hello!

    I am completely new to oracle webcenter portal and oracle ADF.

    I want to copy the content entered AF: to af:outText inputText component when I press on enter key. I have helped my PPR and put the autoSubmit and partialTrigger at the entrances and exits respectively.

    I don't know how to copy the value entry and exit. What should I use Expression EL, if yes then how to create a...?

    Concerning
    Shoaib

    Published by: Shoaib Mujawar on May 27, 2012 21:30

    Use as the bean:

    public class YourBean {
       private String yourValue;
    
       public void setYourValue(String value){this.yourValue = value;)
       public String getYourValue(){return yourValue;}
    }
    

    Use this solution in your JSF:

    
    
    

    This should work and is a bit easier than your code :)

    If you want to use your code, you must set the binding attribute:

    
    
    

    and the bean:

    private RichInputText inputText;
    private RichInputText anotherText;
    
    public void SetInput(ValueChangeEvent valueChangeEvent) {
           anotherText.setValue(inputText.getValue());
    }
    

    Published by: Yannick Ongena on May 28, 2012 11:25

  • Strange read after work entry processor operation of

    Hello.
    We use the listener of combination cache - processor of entry to certain actions when the data comes from coherence. We use Version consistency Oracle 3.5.3/465.

    Just after the entry processor has defined the new value for the entry, the new 'get' operation is called for the cache and jdbc hit is for this key.

    Here's the entry processor:
    public Object process(Entry entry) {        
            if (!entry.isPresent()) {
                // No entities exist for this CoreMatchingString - creating new Matching unit
                MatchingUnit newUnit = new MatchingUnit(newTrade);
                entry.setValue(newUnit, true);
                
                return null;
            }
    
            ((MatchingUnit)entry.getValue()).processMatching(newTrade);
    
            return null;
        }
    Very interesting, that if I use entry.setValue (value) without second parameter - I get the db hit right on the setValue method. According to the docs, setValue() with a parameter returns the previous value and its logic, that the cache hit (and therefore the PB hit) is right on the tray. But I use the overloaded version Sub setValue (java.lang.Object evaluating, boolean fSynthetic), which is supposed to be light and should not seek a previous version of the object. But this is done in any case! Not on SetValue himself, but just after the process() method called.

    It's strange, that consistency is trying to retrieve the previous value in the present case, that there was no! The cache.invoke (matchingStr, CCPEntryProcessor (ccp)) new is called on the record not exist and it is created right on the invocation. Maybe it's the bug or the place for optimization.

    Thank you

    BITEC wrote:
    Thank you, Robert, for this detailed response.

    Still not clear to me why the synthetic inserts are questionable. There are many cases, when the client simply updates/inserts recording (using setValue()) and don't don't don't need to receive the previous value. If he needs to, he will launch the method:

    Hi Anton,.

    It is questionable because the purpose of the indicator fSynthetic is NOT that you can optimize a store operation hidden far. Synthetic event means that it is not a real change in the whole of data triggered by the user, it's something that consistency has made in terms of support / cover for its own reasons and decisions to be able to provide high availability for data, and it only changes of subset of this particular node of data consistency but has no meaning associated with the full data set that actually exists. These reasons are movement partition and expulsion of cache (or possibly other reasons why consistency would like to change the content of the carrier sheet without telling the user that nothing has changed).

    If you set the indicator, you attempt a change of data of masquerade as an event whose consistency has decided to trigger. It is questionable. Also, events map synthetic support may not always lead to the expedition to cache events (for partition rebalance they certainly not). This optimization can also be extended to cover synthetic events.

    java.lang.Object setValue(java.lang.Object oValue)
    

    and receive the previous value. If it does not, it calls:

    void setValue(java.lang.Object oValue, boolean fSynthetic)
    

    and does not receive the previous value as method is marked as void. Thus, he cannot get the previous value in any case using this API, with the exception of the call live db manual.

    Yes, because the consistency is not interested in the old value in the case of a synthetic event. Synthesis methods exist so that some entry can be changed to coherence (usually by coherence itself) so that it indicates a synthetic event so that listeners are unaware.

    Some valid uses for this type of feature to setValue called by user code could be compaction value set caching and replacing the value that stores the support plan by the representation in compact, which does not mean a change in the sense of the actual cached value, only the changes to the representation. Of course if the setValue method (2) is not actually honoring the synthetic indicator, then such a feature will still commit all costs of a call normal setValue (1).

    But the previous value is in any case read by coherence itself, just after process() and the customer anyway is not get it!

    But all the headphones on the cache may have because of the cache of the semantic reasons.

    In this case, I consider that the bug, the cause of the client, which uses this API does not cache hit to take place (no return value for the setValue() method not overloaded), but it takes and leads to additional problems, as a result of reading through mechanizm.

    I'd not considered to be a bug, it's probably the case documenting a possible optimization too early, when it ultimately does not get put in place. I certainly wouldn't try to abuse it to set a value without triggering a db extraction, as again, the intention of the synthetic indicator is related not only to the cache loader functionality, but also to events and marking a change indicates a change of actual data or a data consistency management action.

    Now I understand why consistency is unclear, if this is inserted or updated, thanks for details value.

    Anton.

    * Edition: I thought this problem from the point of the oracle user, but perhaps this additional success is necessary for event producers, who must take the events that contain old/new values. In this case, this seems to be the correct behavior... Seems I need some another workaround to avoid the blow of db. The best solution is the empty load() for dumps...

    You can try to find a solution, but it's a ugly Pandora's box, because of the scenario when multiple threads try to load the same entry, and some of them try to load it with the reason.

    You can try putting a thread local data to indicate that you want really load that special touch. The problem is that depending on the configuration and conditions of race as your cache loader may not be called to clean up local thread as another thread can only be invoked now, and in this case its return value will be returned to all other threads, too, then you can end up with a polluted thread.

    Best regards

    Robert

    Published by: robvarga on October 15, 2010 16:25

  • Cannot recognize the symbol Variant property

    Hi guys, I tried to saveValue and getValue function to work on my app. But I'm a symbol of warning 'unknown '.

    "AffichageContenu" ", which makes WARNING function is not working properly." What makes this warning occurs and how to solve?

    Here is my code:

    hand. QML

    Tab {
            title: "Income"
            imageSource: "asset:///images/income_icon.png"
            Page {
                id: incomePage
                property variant contentView
                function clear(){
                    income_name.text="";
                    income_value.text="";
                }
                function setInfo() {
                    editIncomeName.text=income.getValueFor("income_Name","");
                    editIncomeValue.text=income.getValueFor("income_Value","");
                }
                Container {
    
                    background: income_background.imagePaint
    
                    attachedObjects: [
                        ImagePaintDefinition {
                            id: income_background
                            imageSource: "asset:///images/background.amd"
                            repeatPattern: RepeatPattern.XY
                        }
                    ]
    
                    id:imagecontainer
                    ImageView {
                        maxHeight: 180
                        id:background
                        accessibility.name: "background"
                        imageSource: "asset:///images/income_page.png"
                    }
                    layout: StackLayout {
    
                    }
                    horizontalAlignment: HorizontalAlignment.Fill
                    verticalAlignment: VerticalAlignment.Fill
    
                    ScrollView {
                        id:scrollincome
                        accessibility.name: "scrollincome"
                        scrollViewProperties {
                            scrollMode: ScrollMode.Vertical
                        }
                        horizontalAlignment: HorizontalAlignment.Center
    
                        Container {
                            id:mainincome
    
                            Container {
                                topPadding: 20
                                id:inputborder
                                layout: DockLayout {
    
                                }
                                ImageView {
                                    maxHeight: 350
                                    maxWidth: 750
                                    id:incomebox
                                    accessibility.name: "incomebox"
                                    imageSource: "asset:///images/border.png"
                                    horizontalAlignment: HorizontalAlignment.Fill
                                    verticalAlignment: VerticalAlignment.Fill
                                }
                                Container {
                                    id: income_inputwrapper
                                    layout: StackLayout {
    
                                    }
                                    horizontalAlignment: HorizontalAlignment.Center
    
                                    Container {
                                        topPadding: 30
                                        id: incomefield
                                        TextField {
                                            maxWidth: 500
                                            id: income_name
                                            accessibility.name: "income_name"
                                            hintText: "Income Name"
                                        }//incomecategory
    
                                        TextField {
                                            maxWidth: 500
                                            id: income_value
                                            accessibility.name: "income_value"
                                            hintText: "Income Value"
                                            inputMode: inputMode.NumbersAndPunctuation
                                        }
                                    }//incomefield
    
                                    Container {
                                        maxWidth: 350
                                        maxHeight: 110
                                        topPadding: 30
                                        id:incomebutton
                                        layout: StackLayout {
                                            orientation: LayoutOrientation.LeftToRight
                                        }
                                        horizontalAlignment: HorizontalAlignment.Center
    
                                        ImageButton {
                                            id: addincome
                                            accessibility.name: "income_button"
                                            defaultImageSource: "asset:///images/add_button.png"
                                            layoutProperties: StackLayoutProperties {
                                                spaceQuota: 1
                                            }
                                            onClicked: {
                                                income.addNewRecord(income_name.text,income_value.text);
                                                income_name.text="";
                                                income_value.text="";
                                            }
                                        }
                                        ImageButton {
                                            id: resetincome
                                            accessibility.name: "reset_income"
                                            defaultImageSource: "asset:///images/reset_button.png"
                                            layoutProperties: StackLayoutProperties {
                                                spaceQuota: 1
                                            }
                                            onClicked: {
                                                income.resetIncome();
                                            }
                                        }
                                    }//incomebutton
                                }//inputwrapper
                            }//inputborder
    
                            Container {
                                id: income_field
                                layout: StackLayout {
    
                                }
                                horizontalAlignment: HorizontalAlignment.Center
                                verticalAlignment: VerticalAlignment.Bottom
    
                                Container {
                                    topPadding: 30
                                    id: income_result
                                    horizontalAlignment: HorizontalAlignment.Center
    
                                    Label {
                                        id: income_text
                                        accessibility.name: "incometext"
                                        text: "Income Total :"
                                        textFit{
                                            minFontSizeValue: 2
                                        }
                                    }//incometotaltext
    
                                    Label {
                                        id: income_total
                                        accessibility.name: "incomelabel"
                                        text: "$"
                                        textFit{
                                            minFontSizeValue: 5
                                            }
                                        }//incometotallabel
                                    }//incomeResult
    
                                    Container {
                                    id: incomeListView
                                    ListView {
                                        translationY:0
                                        translationX:0
                                        accessibility.name: "income_List"
                                        objectName: "incomeList"
                                        id: incomeList
                                        preferredHeight:850
    
                                        dataModel: incomeModel
                                        listItemComponents: [
                                            ListItemComponent {
                                                type: "item"
                                                StandardListItem {
                                                    imageSpaceReserved: false
                                                    title: ListItemData.income_Name
                                                    status: ListItemData.income_Value
                                                }
                                            }
                              ]
                              onTriggered: {
                              incomeList.clearSelection();
                              select(indexPath);
                              income.findIndexPath(indexPath);
                              income.saveValueFor("title",contentView.income_name);
                                      income.saveValueFor("classes",contentView.income_value);
                              incomePage.setInfo();
                              editIncome.open();
                                        }
                                        onSelectionChanged: {
                                            if (selected) {
                                                var chosenItem = dataModel.data(indexPath);
                                                contentView = chosenItem;
                                            }
                                        }
                                        layoutProperties: StackLayoutProperties {
                                            spaceQuota: -1.0
                                        }
                                    }//ListView
                                }//incomeListView
                            }//incomefield
                        }//mainincome
                    }//scrollview
                }//imagecontainer
            }//incomepage
            attachedObjects: [
                Sheet {
                    id:editIncome
                    content : Page {
                        titleBar: TitleBar {
                            id:editIncomeTitle
                            title: "Edit Income"
                            dismissAction: ActionItem {
                                title: "Back"
                                onTriggered: {
                                    editIncome.close();
                                    incomePage.clear();
    
                                }
                            }
                            acceptAction: ActionItem {
                                title: "Submit"
                                onTriggered: {
                                    if (editIncomeName.text.length>0 && editIncomeValue.text.length>0) {
                                        income.addNewRecord(income_name.text,income_value.text);
                                        editIncome.close();
                                        incomePage.clear();
                                    }
                                    else {
                                        editIncomeName.hintText="Enter Income Name";
                                        editIncomeValue.hintText="Enter Income Value";
                                    }
                                }
                            }
                        }
                        Container {
                            topPadding: 20
                            id:editIncomeBorder
                            layout: DockLayout {
    
                            }
                            ImageView {
                                maxHeight: 350
                                maxWidth: 750
                                id:editIncomeBox
                                accessibility.name: "incomebox"
                                imageSource: "asset:///images/border.png"
                                horizontalAlignment: HorizontalAlignment.Fill
                                verticalAlignment: VerticalAlignment.Fill
                        }
                        Container {
                            id: incomeReview
                            layout: StackLayout {
    
                            }
                            horizontalAlignment: HorizontalAlignment.Center
    
                            Container {
                                topPadding: 30
                                id: incomereviewField
                                TextField {
                                    maxWidth: 500
                                    id: editIncomeName
                                    accessibility.name: "income_name"
                                    text: income.getValueFor("income_Name","")
                                }//incomecategory
    
                                TextField {
                                    maxWidth: 500
                                    id: editIncomeValue
                                    accessibility.name: "income_value"
                                    text: income.getValueFor("income_Value","")
                                    }
                                }//incomefield
                            }//incomeBox
                            }//incomeBorder
                        }//reviewPage
                    }//reviewSheet
    
            ]
        }//incometab
    

    Any help would be appreciated. Thank you.

    Problem solved. I decided not to use the variant of the property, but merging chosenItem Manager in onTriggered reference signal for save value and get value of work.

     onTriggered: {
                                                    incomeList.clearSelection();
                                                    select(indexPath);
                                                    sql.findIndexPath(indexPath);
                                                    var chosenItem = dataModel.data(indexPath);
                                                    chosenItem.income_name;
                                                    chosenItem.income_value;
                                                    sql.saveValueFor("income_Name",chosenItem.income_Name);
                                                    sql.saveValueFor("income_Value",chosenItem.income_Value);
                                                    incomePage.setInfo();
                                                    editIncome.open();
                                                }
    

    Thank you for your effort in providing possible solutions to this problem.

    Concerning

  • exhibition of C++ to QML

    Hey guys,.

    I am a C++ class for my application QML.  I'm just some simple tests from now based on the examples here: https://developer.blackberry.com/cascades/documentation/dev/integrating_cpp_qml/index.html

    I have a simple class defined using the QOBJECT and QPROPERTY (no Q_INVOKABLE methods).

    I'm not clear on one thing.  In the example, the class is defined as:

    #ifndef MYCPPCLASS_H_
    #define MYCPPCLASS_H_
    
    #include 
    #include 
    
    class MyCppClass : public QObject {
        Q_OBJECT
        Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
    
    public:
        MyCppClass();
        virtual ~MyCppClass();
    
        Q_INVOKABLE void reset();
    
        int value();
        void setValue(int i);
    
    signals:
        void valueChanged(int);
    
    private:
        int m_iValue;
    };
    
    #endif
    

    in the Q_PROPERTY line, there is a variable, a method to 'read', a 'write' method and a signal to emit.

    the variable is not used anywhere.

    the class definition looks like this:

    #include "MyCppClass.h"
    
    MyCppClass::MyCppClass()
    {
        m_iValue = 0;
    }
    
    MyCppClass::~MyCppClass()
    {
    }
    
    int MyCppClass::value()
    {
        return m_iValue;
    }
    
    void MyCppClass::setValue(int i)
    {
        m_iValue = i;
        emit valueChanged(m_iValue);
    }
    
    void MyCppClass::reset()
    {
        m_iValue = 0;
        emit valueChanged(m_iValue);
    }
    

    Here is my test class.

    #ifndef SIMPLECLASS_HPP_
    #define SIMPLECLASS_HPP_
    #include 
    #include 
    
    class SimpleClass : public QObject{
        Q_OBJECT
        Q_PROPERTY(int iInt READ iGetInt WRITE iSetInt NOTIFY intChanged)
    
    public:
        SimpleClass();
        virtual ~SimpleClass();
        int iGetInt();
        void iSetInt(int i);
    
    signals:
        void intChanged(int);
    
    private:
        // private variables
        int myInt;
    };
    
    #endif /* SIMPLECLASS_HPP_ */
    

    I * think * (int) iSetInt works, but the iGetInt() is not.

    I am doing in my QML:

     Button {
                    id: myButton
                    text: "action"
                    onClicked: {
                                    if (myLabel.text == "you pushed it!")
                                    {
                                        myLabel.text = "you pushed it again!";
                                    }
                                    else {
                                        myLabel.text = "you pushed it!";
                                    }
                                    mySimpleClass.iSetInt(44);
                                    myOtherLabel.text = "onClicked: " + mySimpleClass.iGetInt();
                                } // onClicked
                } // Button
    

    any ideas what I am doing wrong?

    In example there, the value is the parameter which must be accessible from QML.  setValue() and Value() are function QML call whenver a read or write occurs.  I'm not clear what of wrong with your cde, but try to access the value directly instead of using the functions - or in your case you iInt.

Maybe you are looking for

  • GlassFish Tools for Eclipse does not-null pointer exception when you try to deploy the application

    I've recently updated to new Luna Eclipse and the latest tools of Glassfish for Eclipse - now a Java EE-Application, which can be deployed manually through Glassfish admin console fails to deploy via Eclipse.I'm not able to debug or runn Java Apps vi

  • Transfer DW CS3 for Win Vista to win 10

    I use DW CS3 since 2008 on a Windows Vista-based computer. I just got a Windows 10 computer and would like to disable DW on Vista computer and activate it on the Win10 computer. I called Adobe tech support and they said that I needed to know how to d

  • Bios G56

    Hello My daughter has a laptop 100SA G56. It won't start the reader, so I want to check the BIOS settings, but I do not know which key to press to enter BIOS Can anyone help? I tried F2 and F6, F10 or DEL Tony C

  • How can I create DVD in Adobe CC?

    all right, if the cc new Prime Minister has not yet for dvd manufacturing then, how do I make DVD, (I do not understand the rendering for the codeck 264 or whatever, but I want to make a DVD?)so, how to make a DVD with the new Prime Minister cc?

  • Print the view current option disappeared after the last update. Where at - it go?

    Print the view current option disappeared after the last update. Where at - it go?