Can't retrieve sumbitted values

Ok, Im confused and getting frustrated. I have a very simple page. It contains 2 SelectOneMenu pull downs and 2 InputText components..
The page has 2 senerios based on the selection of the second SelectOneMenu.. This component represent 2 db queries. ONe that requires dates and one that doesn't.. T
The result of the queries are rendered back to the same jsp with the result being a OuputText component positioned below the submit button.
Request that do not require the dates work as I expect. However, when the users selects the query that requires dates I run into problems.
I hide the InputText Components until the user selects the query that requires them for the date inputs.from the second SelectOneMenu
The second SelectOneMenu has a valueChangeListener bound to it and immediate="true" for that component only. and the InputText components render as expected.
But, When the user adds dates and selectes the submit button, The InputText components value,submittedvalue and localvalues are null..
I have a binding on my sumbit button to invoke a method that will get the values of all 4 components and run the query.
I've carefully read thru the lifecycle in the 1.1 spec and I can't understand why I don't have access to these values..
The CommandButton doesn't have immediate="true" so there isnt' any bypassing to the app phase.
I use getter/setter methods with String values for all component "value" attributes. I use the appropriate UIComponent for my binding methods for each component. They all look to be firing, but I just can't get the value out of the InputText components.. Here is my form. I' will include the binding getter/setters so to not make the such a long message.
From a navigation standpoint. The page renders back to itself on a success or failure by design..
Thanks for any help with this.
-----------------------------jsp page form---------------------------
<h:form>
                    <h:commandButton action="#{listAllClientBean.resetForm}" image="images/clear.gif" immediate="true" />
                    <h:panelGrid columns="1" rendered="true">
                         <h:panelGroup>
                              <h:outputLabel value="#{bundle.ReportsSelectClient}" />
                              <h:selectOneMenu value="#{listAllClientBean.client}" binding="#{listAllClientBean.selectedClient}" required="true">
                                   <f:selectItem itemLabel="#{bundle.ReportsDefaultSelectLabel }" itemValue='' />
                                   <f:selectItems value="#{listAllClientBean.allClients}" />
                              </h:selectOneMenu>
                         </h:panelGroup>
                         <h:panelGroup>
                              <h:outputLabel value="#{bundle.ReportsSelectQuery}"></h:outputLabel>
                              <h:selectOneMenu value="#{listAllClientBean.query}" binding="#{listAllClientBean.selectedQuery}"
                                   onchange="submit()" valueChangeListener="#{listAllClientBean.queryChanged}">
                                   <f:selectItem itemLabel="#{bundle.ReportsDefaultSelectLabel}" itemValue='' />
                                   <f:selectItems value="#{listAllClientBean.allQueries}" />
                              </h:selectOneMenu>
                         </h:panelGroup>
                         <h:panelGroup rendered="#{listAllClientBean.datesDisplayed}">
                              <h:outputLabel value="#{bundle.ReportsFromDate}" />
                              <h:inputText id="fromDate" value="#{listAllClientBean.strFromDate}" required="true" />
                              <h:message for="fromDate" showSummary="true" showDetail="false" styleClass="errors" />
                         </h:panelGroup>
                         <h:panelGroup rendered="#{listAllClientBean.datesDisplayed}">
                              <h:outputLabel value="#{bundle.ReportsToDate}"></h:outputLabel>
                              <h:inputText id="toDate" value="#{listAllClientBean.strToDate}" required="true" />
                              <h:message for="toDate" showSummary="true" showDetail="false" styleClass="errors" />
                         </h:panelGroup>
                         <h:commandButton action="#{listAllClientBean.doQuery}" image="images/submit.gif" />
                         <h:panelGroup rendered="#{listAllClientBean.resultDisplayed}" styleClass="table-background">
                              <h:outputLabel value="#{bundle.ReportsQueryResults}" />
                              <h:inputText value="#{listAllClientBean.queryResult}" readonly="true" size="7" />
                         </h:panelGroup>
                    </h:panelGrid>
               </h:form>
------------------------getter/setter and commanButton method---------------
public UISelectOne getSelectedClient() {
          return selectedClient;
public void setSelectedClient(UISelectOne selectedClient) {
          this.selectedClient = selectedClient;
     public UIInput getSelectedFromDate() {
          return selectedFromDate;
     public void setSelectedFromDate(UIInput selectedFromDate) {
          this.selectedFromDate = selectedFromDate;
     public UISelectOne getSelectedQuery() {
          return selectedQuery;
     public void setSelectedQuery(UISelectOne selectedQuery) {
          this.selectedQuery = selectedQuery;
     public UIInput getSelectedToDate() {
          return selectedToDate;
     public void setSelectedToDate(UIInput selectedToDate) {
          this.selectedToDate = selectedToDate;
public String doQuery()
          String clientId = (String)selectedClient.getValue();
          ClientInfo client = (ClientInfo)clientMap.get(clientId);
          String queryType = (String)selectedQuery.getValue();
          String _startdate = (String)selectedFromDate.getLocalValue();
          String _enddate = (String)selectedToDate.getLocalValue();
          try
               setQueryResult( getClientCoordinator().runQuery(client, queryType, startdate, enddate));     
          catch(DataStoreException e)
               return "failure";
          return "success";
The p

Because I find that this is really weird and this sounds like a bug, I have created a small testcase to reproduce this problem:
JSF:<h:form>
    <h:selectOneMenu value="#{myBean.item}" onchange="submit();"
        valueChangeListener="#{myBean.change}"
    >
        <f:selectItem itemLabel="default" itemValue="" />
        <f:selectItems value="#{myBean.items}" />
    </h:selectOneMenu>
    <h:inputText value="#{myBean.text}" rendered="#{myBean.rendered}" />
    <h:commandButton action="#{myBean.submit}" value="submit" />
    <h:commandButton action="#{myBean.reset}" value="reset" />
    <h:outputText value="#{myBean.result}" />
</h:form>MyBean (in request scope):package mypackage;
import java.util.ArrayList;
import java.util.List;
import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
public class MyBean {
    // Init -------------------------------------------------------------------
    private String item;
    private boolean rendered;
    private String text;
    private String result;
    // Actions ----------------------------------------------------------------
    public void reset() {
        FacesContext
            .getCurrentInstance()
                .getExternalContext()
                    .getSessionMap()
                        .put("myBean", new MyBean());
    public void submit() {
        result = item + ", " + text;
    // Listeners --------------------------------------------------------------
    public void change(ValueChangeEvent event) {
        String newValue = (String) event.getNewValue();
        if (newValue != null && !newValue.equals("")) {
            rendered = true;
        } else {
            rendered = false;
            text = null;
    // Getters ----------------------------------------------------------------
    public String getItem() {
        return item;
    public List getItems() {
        List items = new ArrayList();
        items.add(new SelectItem("key1", "value1"));
        items.add(new SelectItem("key2", "value2"));
        items.add(new SelectItem("key3", "value3"));
        return items;
    public boolean isRendered() {
        return rendered;
    public String getText() {
        return text;
    public String getResult() {
        return result;
    // Setters ----------------------------------------------------------------
    public void setItem(String item) {
        this.item = item;
    public void setText(String text) {
        this.text = text;
}After a fresh start of the server, the value of the text field indeed stucks null, unless the entered value. But if you press at the reset button at least twice (the button recreates the current instance of the backing bean), then it works as it should be.
It looks like that the valueChangeListener creates a 2nd instance of the backing bean in a fresh environment somehow. Maybe because the first-time instantiated bean cannot be found? Sounds plausible however.

Similar Messages

  • Can't retrieve bean value from jsp!

    Here's the chain of events for my web app:
    JSP form (get info from user) -> forwarding jsp (uses bean to save info submitted to form)-> servlet (retrieves info from DB) -> JSP (presents DB info to user by populating values in text fields from original form)
    Right now, I can access all the values submitted to the first JSP from my servlet. However, after my servlet retrieves the info from a db and stores it in a bean and forwards the request (using requestdispatcher) to the 2nd JSP, I can't get the values from the bean from the 2nd jsp. I was able to use the bean to store the information submitted to the original JSP, however.
    Here's some relevant code:
    FROM FORWARDING JSP (which saves user-submitted info in bean)
    <jsp:useBean id="fxFormBean" class="fxmatcher.FxFormBean" scope="request"/>
    <jsp:setProperty name="fxFormBean" property="*" />
    <jsp:forward page="/FxMatcher" />
    FROM LAST JSP (which should populate form fields)
    header stuff:
    <jsp:useBean id="fxFormBean" class="fxmatcher.FxFormBean" scope="session"/>
    info retrieval:
    <INPUT TYPE="text" NAME="fx_key" value="<%= fxFormBean.getFx_key() %>">
    I wrote this JSP based on the example given here: http://www.jsptut.com/Editing.jsp, but I'm not getting the value from the bean. The result JSP just has value="".
    I'm pretty sure that my servlet is saving the info to bean correctly, but here's the code anyways:
    //retrieves info from DB
    FxFormBean fx = (FxFormBean) request.getAttribute("fxFormBean");
    fx.setFx_key (traderKey);
    fx.setAa_block(agent_block);
    fx.setAddition_to (additional_to);
    log("trader key: [" + fx.getFx_key() + "]"); //debugging code
    My debugging code did print out the correct info, so I don't think there's anything wrong with the bean or the servlet.
    I would appreciate any help. Thank you very much.

    The first JSP puts the bean in the request, the servlet retrieves the bean from the request and updates it but in the second JSP you set the scope to session:
    <jsp:useBean id="fxFormBean" class="fxmatcher.FxFormBean" scope="session"/>
    So the second JSP is looking in the wrong place for your bean. Change the scope in the second JSP to request:
    <jsp:useBean id="fxFormBean" class="fxmatcher.FxFormBean" scope="request"/>

  • Can't retrieve the value of the business parameters for external navigation

    Hi All,
    I am using portal navigation in webdynpro and came across a strange issue.
    Following is the code that I am using to navigate.
    String[] path = {"accounts/bol_detail"};
         WDPortalNavigation.navigateRelative(null,2,path,WDPortalNavigationMode.SHOW_INPLACE,null,null,WDPortalNavigationHistoryMode.NO_DUPLICATIONS,null,null,"bolnumber="bolnumber"&pdf=true",null,true,false);
    I am able to navigate successfully to the required iView, but when I replace WDPortalNavigationMode.SHOW_INPLACE with (WDPortalNavigationMode.SHOW_EXTERNAL_PORTAL or WDPortalNavigationMode.SHOW_EXTERNAL), I am not able to get the business parameters that I am passing. I tried printing the value and the value for both the parameter is null when I am trying to open an external window. While in case of WDPortalNavigationMode.SHOW_INPLACE I am getting the proper value of the passed business parameters (bolnumber and pdf).
    Your quick help would be highly appreciated. Looking forward for some help from sdn ASAP.
    Thanks and Regards,
    Murtuza

    I was able to get the expected output with your program with just these changes:
    char        slist[150]="select  cardnum,create_date from cardmast where cardnum= 10 ";I created the cardmast table as follows:
    create table cardmast(cardnum integer, create_date date);
    insert into cardmast values(10, '23-DEC-09');
    commit;Can you please check in sqlplus if the query you are using is indeed returning something.
    Thanks,
    Sumit

  • How can I retrieve the value of the POD in expression builder

    I need to be able to determine whether I am on my Production or Staging instance and present the correct weblink URL. This problem arises when Staging is systematically refreshed each month.

    If this issue is for the Action Links you have used in a Report. You could used the below option that does not include the POD name in the URL.
    On Demand will accept the POD of the Application you are navigating from:
    "http://"@[html]"<a target=_top href=/OnDemand/user/OpportunityDetail?OMTHD=OpportunityDetailNav&OMTGT=OpptyDetailForm&OpptyDetailForm.Id="@">View</a>"
    If the issue is for a Report you are trying to access through a Web Link or an Embedded Report
    Accessing a Report through a Web Link: You could consider passing the POD name through a Field that will be stored on the user Object or a another Record Type?
    Accessing a Report through a Embedded Web Applet: I'm not sure about this one but, what do you think about using Variables?
    Hope this information is useful
    Let me know!
    Royston

  • How can I retrieve values from integer array in sqlplus?

    I'm trying to write a query against OEM grid tables to come up with the result to show all scheduled backup jobs, in OEM grid, there is a table sysman.mgmt_job_schedule, one of the column DAYS is defined as TYPE SYSMAN.MGMT_JOB_INT_ARRAY AS VARRAY(5000) OF INTEGER,
    if I do select days from mgmt_job_schedule, it returns something like (2,3,4,5,,,,,,...), I want to retrieve the digits and translate them into Monday-Sunday in combination of other columns, but I'm new in varray, I don't know how can I retrieve the values in sqlplus, can you guys help me on that, My query is as follows, I got all the jobs I wanted already, just need to interpret on which day (week day) it is scheduled.
    Thanks
    select JOB_NAME, JOB_OWNER,job_type, mjs.START_TIME, DECODE(mjs.frequency_code,
    1, 'Once', 2, 'Interval', 3, 'Daily', 4, 'Weekly',
    5, 'Day of Month', 6, 'Day of Year', mjs.frequency_code) "FREQUENCY",
    mjs.days
    from mgmt_job mj, MGMT_JOB_SCHEDULE mjs
    where mj.SCHEDULE_ID=mjs.SCHEDULE_ID
    and mj.job_type='OSCommand'
    and mjs.Frequency_code in (3,4)
    and mj.is_library =0

    select job_name, job_owner, job_type, mjs.start_time,
               decode (
                    mjs.frequency_code,
                    1, 'Once',
                    2, 'Interval',
                    3, 'Daily',
                    4, 'Weekly',
                    5, 'Day of Month',
                    6, 'Day of Year',
                    mjs.frequency_code
                    "FREQUENCY", mjs.days, column_value
      from mgmt_job mj, mgmt_job_schedule mjs, table (nvl(days,sysman.mgmt_job_int_array(1,2,3,4,5,6,7)))
    where       mj.schedule_id = mjs.schedule_id
               and mj.job_type = 'OSCommand'
               and mjs.frequency_code in (3, 4)
               and mj.is_library = 0you may need to tweak the values in sysman.mgmt_job_int_array: use less or other values or simply put them null ....

  • Retrieving ALL values from a single restricted user property

    How can I retrieve ALL values of a single restricted user property from within
    a .jpf file?
    I want to display a dropdown list within a form in a JSP which should contain
    all the locations listed in the property 'locations'. I ever get just the default
    value when I access the property via
    ProfileWrapper pw = userprofile.getProfileForUser(user);
    Object prop = pw.getProperty("ClockSetup", "Locations");

    Well, the code you've got will retrieve the single value of the property
    for the current user. You're getting the default value because the
    current user doesn't have Locations property set, so the ProfileWrapper
    returns the default value from the property set.
    I assume you want to get the list of available values that you entered
    into the .usr file in Workshop. If so, I've attached a
    SetColorController.jpf, index.jsp, and GeneralInfo.usr (put in
    META-INF/data/userprofiles) I wrote for an example that does just this.
    It uses the PropertySetManagerControl to retrieve the restricted values
    for a property, and the jsp uses data-binding to create a list from that
    pageflow method.
    For a just-jsps solution, you can also use the
    <ps:getRestrictedPropertyValues/> tag. I've attached a setcolor-tags.jsp
    that does the same thing.
    Greg
    Dirk wrote:
    How can I retrieve ALL values of a single restricted user property from within
    a .jpf file?
    I want to display a dropdown list within a form in a JSP which should contain
    all the locations listed in the property 'locations'. I ever get just the default
    value when I access the property via
    ProfileWrapper pw = userprofile.getProfileForUser(user);
    Object prop = pw.getProperty("ClockSetup", "Locations");
    [att1.html]
    package users.setcolor;
    import com.bea.p13n.controls.exceptions.P13nControlException;
    import com.bea.p13n.property.PropertyDefinition;
    import com.bea.p13n.property.PropertySet;
    import com.bea.p13n.usermgmt.profile.ProfileWrapper;
    import com.bea.wlw.netui.pageflow.FormData;
    import com.bea.wlw.netui.pageflow.Forward;
    import com.bea.wlw.netui.pageflow.PageFlowController;
    import java.util.Collection;
    import java.util.Iterator;
    * @jpf:controller
    * @jpf:view-properties view-properties::
    * <!-- This data is auto-generated. Hand-editing this section is not recommended. -->
    * <view-properties>
    * <pageflow-object id="pageflow:/users/setcolor/SetColorController.jpf"/>
    * <pageflow-object id="action:begin.do">
    * <property value="80" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action:setColor.do#users.setcolor.SetColorController.ColorFormBean">
    * <property value="240" name="x"/>
    * <property value="220" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action-call:@page:index.jsp@#@action:setColor.do#users.setcolor.SetColorController.ColorFormBean@">
    * <property value="240,240,240,240" name="elbowsX"/>
    * <property value="144,160,160,176" name="elbowsY"/>
    * <property value="South_1" name="fromPort"/>
    * <property value="North_1" name="toPort"/>
    * </pageflow-object>
    * <pageflow-object id="page:index.jsp">
    * <property value="240" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#index.jsp#@action:begin.do@">
    * <property value="116,160,160,204" name="elbowsX"/>
    * <property value="92,92,92,92" name="elbowsY"/>
    * <property value="East_1" name="fromPort"/>
    * <property value="West_1" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#begin.do#@action:setColor.do#users.setcolor.SetColorController.ColorFormBean@">
    * <property value="204,160,160,116" name="elbowsX"/>
    * <property value="201,201,103,103" name="elbowsY"/>
    * <property value="West_0" name="fromPort"/>
    * <property value="East_2" name="toPort"/>
    * <property value="success" name="label"/>
    * </pageflow-object>
    * <pageflow-object id="control:com.bea.p13n.controls.ejb.property.PropertySetManager#propSetMgr">
    * <property value="31" name="x"/>
    * <property value="34" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="control:com.bea.p13n.controls.profile.UserProfileControl#profileControl">
    * <property value="37" name="x"/>
    * <property value="34" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="formbeanprop:users.setcolor.SetColorController.ColorFormBean#color#java.lang.String"/>
    * <pageflow-object id="formbean:users.setcolor.SetColorController.ColorFormBean"/>
    * </view-properties>
    public class SetColorController extends PageFlowController
    * @common:control
    private com.bea.p13n.controls.ejb.property.PropertySetManager propSetMgr;
    * @common:control
    private com.bea.p13n.controls.profile.UserProfileControl profileControl;
    /** Cached possible colors from the User Profile Property Set definition.
    private String[] possibleColors = null;
    /** Get the possible colors, based upon the User Profile Property Set.
    public String[] getPossibleColors()
    if (possibleColors != null)
    return possibleColors;
    try
    PropertySet ps = propSetMgr.getPropertySet("USER", "GeneralInfo");
    PropertyDefinition pd = ps.getPropertyDefinition("FavoriteColor");
    Collection l = pd.getRestrictedValues();
    String[] s = new String[l.size()];
    Iterator it = l.iterator();
    for (int i = 0; it.hasNext(); i++)
    s[i] = it.next().toString();
    possibleColors = s;
    catch (P13nControlException ex)
    ex.printStackTrace();
    possibleColors = new String[0];
    return possibleColors;
    /** Get the user's favorite color from their profile.
    public String getUsersColor()
    try
    ProfileWrapper profile = profileControl.getProfileFromRequest(getRequest());
    return profileControl.getProperty(profile, "GeneralInfo", "FavoriteColor").toString();
    catch (P13nControlException ex)
    ex.printStackTrace();
    return null;
    // Uncomment this declaration to access Global.app.
    // protected global.Global globalApp;
    // For an example of page flow exception handling see the example "catch" and "exception-handler"
    // annotations in {project}/WEB-INF/src/global/Global.app
    * This method represents the point of entry into the pageflow
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    protected Forward begin()
    return new Forward("success");
    * @jpf:action
    * @jpf:forward name="success" path="begin.do"
    protected Forward setColor(ColorFormBean form)
    // set the color in the user's profile
    try
    ProfileWrapper profile = profileControl.getProfileFromRequest(getRequest());
    profileControl.setProperty(profile, "GeneralInfo", "FavoriteColor", form.getColor());
    catch (P13nControlException ex)
    ex.printStackTrace();
    return new Forward("success");
    * FormData get and set methods may be overwritten by the Form Bean editor.
    public static class ColorFormBean extends FormData
    private String color;
    public void setColor(String color)
    this.color = color;
    public String getColor()
    return this.color;
    [GeneralInfo.usr]
    [att1.html]

  • Can castor retrieve the comnstraints provided in an xml schema

    hi,
    plz help me !!!!!!!!!!!
    does castor provide any function to retrieve the constraints
    defined in an xsd
    i know it provides functions for setting the constraints
    can i retrieve the value of constraints fromthe descriptor files returned by cator
    while unmarshalling the xsd file .
    thaks

    Hi 00ps, the way to do this with XSD schemas is to use a "choice" node, where you can select either BusinessEntity or Person.  Each of these nodes can then have different elements (inherited from a common source if you desire).
    Whilst doing all this is entirely possible with the BizTalk schema editor, it is far, far easier to use a specialist tool such as
    XMLSpy, which makes defining complex relationships an easy task.  For example, here is a similar sort of restriction I have in place on a schema:
    The "party" element is used in multiple schemas through the use of an import.  You can either use
    organisation or individual, they both use a common element called
    contact which contains address information etc which would be the same for both, but allow for different structures for party types.
    As you can see from the screen-shot, it's a lot easier to visualise with XML Spy.  The XSD notation is:
    <xs:choice>
    <xs:element name="organisation">
    ...blah...
    </xs:element>
    <xs:element name="individual">
    ...blah...
    </xs:element>
    </xs:choice>
    If this is helpful or
    answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)

  • How can i retrieve the vallue of a component's attribute while enhancing?

    Hi...
    I am new to SAP...and am working with WEB UI Enhancement...
    Can anyone help me to know how can i retrieve the value of the Opportunity status in the component of survey ICCMP_SURVEY?
    And also, which is the field taht i need to change to make the survey non editable?
    I came across an attribute CHANGEABLE in method IS_CHANGEABLE which is being checked before the survey template is opened up..But is it possible to update this field?
    Any helpful pointers would be rewarded...
    Thanks....

    Thanks for the quick replies guys, I will work on that. Wish I could have thought of that before haha, well the only thing that I will need to check later on is gathering all the file paths within one array. Since the main gets called several times with each file selected, I have to gather them all with the serversocket and then when they are all gathered I can begin another piece of code. Dunno if that will be doable. Since I don't know if the user selects 5 or 400 at the same time, I think the serversocket will append to an arraylist every incoming file paths and the UI viewing the file paths will update itself if other file paths are appended.
    Thanks a lot, I will return on that as soon as I am finished.

  • MRP_ATP_PUB.Call_ATP api not retrieving requested_date_quantity value when executed in custom schema but when executed in apps its working fine, can anyone help on this..

    The MRP_ATP_PUB.Call_ATP api not retrieving requested_date_quantity value when executed in custom schema but when executed in apps its working fine, can anyone help on this..
    We are passing the required values to the ATP API.
    1) The x_return_status is showing as 'S' i.e. success but x_atp_rec.Requested_Date_Quantity is not returning any value.
    2) If there is a grant issue how to identify it.
    Regards,
        Vinod Annukaran

    Pl do not post duplicates -0 MRP_ATP_PUB.Call_ATP api not retrieving requested_date_quantity value when executed in custom schema but when executed in apps its working fine, can anyone help on this..

  • Why do we need function if values can be retrieved from the procedures

    My question is why do we need functions in Oracle when I cen retrieve the values from procedures using in out arguments ?? Anyone any comments ...

    Languages usually provide more than one way of doing the same thing. This encourages different styles of coding.
    I have found functions returning Boolean values useful in telling me whether the functionality in the code encapsulated in a function has worked successfully or not, in addition to returning OUT parameters that I need to use in the rest of the program. This way I can include the call to the function in IF ... Then ... end if; logic. By using this contstruct the code reads logically and is able to document the flow of control also. It helps in "killing two birds with one stone".
    As one becomes more adept at using a language, one appreciates the facility of doing something more than one way, to suit one's style, I guess ...
    Narayan.
    null

  • Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View

    Todd,
    Let me try to explain you this time. I have a text field in a TiledViewBean.
    When I display the page, the text field
    html tag is created with the name="PageDetail.rDetail[0].tbFieldName" say
    five times/rows with same name.
    The html tags look like this.
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    When the form is submitted, I want to get the text field values using the
    method getTbFieldName().getValues() which
    returns an array object[]. This is in case where my TiledViewBean is not
    bound and it is working fine.
    Now in case when my TiledView is bound to a model, it creates the html tags
    as follows.
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[1].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[2].tbFieldName" value=""
    maxlength=9 size=13>
    Now when I say getTbFieldName().getValues() it returns only the first
    element values in the object[] and the rest of the
    values are null.
    May be we need to create a utility method do get these values from
    requestContext.
    raju.
    ----- Original Message -----
    From: Todd Fast <toddwork@c...>
    Sent: Saturday, July 07, 2001 3:52 AM
    Subject: Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View
    Raju.--
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing likeI'm afraid I don't understand your point--can you please clarify? Do you
    mean "value" instead of "name"?
    What are you trying to do? What behavior are you expecting but notseeing?
    >
    Without further clarification, I can say that the setValues() methodsNEVER
    populates data on multiple rows of a (dataset) model, nor does it affect
    multiple fields on the same row. Perhaps what you are seeing is theeffect
    of default values. Model that derive from DefaulModel have the ability to
    carry forward the values set on the first row to other rows in lieu ofdata
    in those other rows. This behavior is for pure convenience and can be
    turned off, and it is turned off for the SQL-based models.
    Todd
    [email protected]

    Hi,
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing like
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[0].tbFieldValue
    in which case, the getValues() method works fine.
    But in case where the tiled view is bound to a model, it populates
    with different field names such as,
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[1].tbFieldValue
    in this case, the getValues() doesn't work. Any soultion to this?
    We are using Moko 1.1.1.
    thanks in advance,
    raju.
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    Does anyone know of is there a single method to get all values of a
    display
    field in a tiled view without having to iterate through all the
    values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returns
    a
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

  • Can't retrieve data dictionary items in 8.0.5 DB from Powerbuilder

    Hello all,
    I'm using Powerbuilder 7.0 in an actual project.
    The database is Oracle 8.0.5.1.0 for Linux (Distribution is SuSE 6.0)
    There's some strange behaviour which prevents developing with the database:
    - Connected as user system in Powerbuilder. No problems during connect. Trace activated.
    - Appears grapical table list. When trying to retrieve column attributes of selected table Powerbuilder hangs. The grants on the selected dictionary views have been checked and user system has been granted role dba.
    These are the traced statements Only the last one doesn't work - doesn't come back with a result.
    WORKS: SELECT OWNER, TABLE_NAME, TABLE_TYPE
    FROM SYS.ALL_CATALOG WHERE OWNER <> 'SYS'
    AND TABLE_TYPE IN ('TABLE','VIEW') (0 MilliSeconds)
    WORKS: SELECT S.OWNER, S.SYNONYM_NAME
    FROM SYS.ALL_SYNONYMS S, SYS.ALL_OBJECTS O
    WHERE (S.TABLE_OWNER <> 'SYS'
    AND O.OBJECT_NAME = S.TABLE_NAME
    AND O.OWNER = S.TABLE_OWNER
    AND O.OBJECT_TYPE IN ('VIEW','TABLE'))
    UNION SELECT Q.OWNER, Q.SYNONYM_NAME
    FROM SYS.ALL_SYNONYMS Q
    WHERE (Q.TABLE_OWNER <> 'SYS'
    AND Q.DB_LINK IS NOT NULL) (0 MilliSeconds) (5518 MilliSeconds)
    COLUMNS INFORMATION: TABLE=ac OWNER=geco2
    WORKS: SELECT COLUMN_NAME, COLUMN_ID, DATA_TYPE_OWNER, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE,
    NULLABLE, DATA_DEFAULT
    FROM SYS.ALL_TAB_COLUMNS
    WHERE TABLE_NAME = 'AC'
    AND OWNER = 'GECO2'
    ORDER BY COLUMN_ID (0 MilliSeconds) (981 MilliSeconds)
    WORKS: SELECT INDEX_NAME, UNIQUENESS
    FROM SYS.ALL_INDEXES
    WHERE TABLE_OWNER = 'GECO2'
    AND TABLE_NAME = 'AC' (0 MilliSeconds)
    WORKS: SELECT COLUMN_NAME, COLUMN_POSITION
    FROM SYS.ALL_IND_COLUMNS
    WHERE INDEX_NAME = 'GECO_ACC_MAIS_ID'
    AND TABLE_NAME = 'AC'
    AND TABLE_OWNER = 'GECO2' (0 MilliSeconds)
    (29c0020): PRIMARY KEY RETRIEVE:
    APPLICATION HANGS: SELECT SYS.ALL_CONS_COLUMNS.COLUMN_NAME, SYS.ALL_CONSTRAINTS.CONSTRAINT_NAME
    FROM SYS.ALL_CONSTRAINTS,SYS.ALL_CONS_COLUMNS
    WHERE SYS.ALL_CONSTRAINTS.CONSTRAINT_TYPE ='P'
    AND SYS.ALL_CONSTRAINTS.TABLE_NAME = 'AC'
    AND SYS.ALL_CONSTRAINTS.OWNER = 'GECO2'
    AND SYS.ALL_CONSTRAINTS.CONSTRAINT_NAME = SYS.ALL_CONS_COLUMNS.CONSTRAINT_NAME
    AND SYS.ALL_CONSTRAINTS.TABLE_NAME = SYS.ALL_CONS_COLUMNS.TABLE_NAME
    AND SYS.ALL_CONSTRAINTS.OWNER = SYS.ALL_CONS_COLUMNS.OWNER
    ORDER BY SYS.ALL_CONSTRAINTS.CONSTRAINT_NAME,SYS.ALL_CONS_COLUMNS.POSITION (0 MilliSeconds)
    I've rerun CATALOG.SQL and CATPROC.SQL; I've installed an 8.0.5-Database under NT and had no problem.
    A collegue working with the Java IDE Forti and connecting with JDBC has a very similar problem.
    At the moment the project can't go on because of this problem.
    Any hint would be welcome
    Thanks
    Juergen
    null

    Hi all, thx for your reply, i have found where is my error :)
    In dbSelectUniqueRow() method,
    //put the attr value into arrayList                               
    for(int j=1; j<=fieldList.size(); j++) {                                       
    columnValues.add((String)rs.getObject(j));
      }i shouldn't put all the value into the arrayList, instead i should put in the primary key,
    Then in client side, I can cast it to remoteInterface. After that, i can retrieve the value in client using
    Staff s = (Staff)home.FindByName("XXX");

  • How to retrieve 2 values from a table in a LOV

    Hi
    I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
    I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
    How to retrieve thes two values whant the user chooses an item from the list ?
    I apologize for my english, being french.
    Regards.
    Christian

    Christian,
    From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
    <b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
    Use something like this in the dynamic list of values for the select list: <br>
    SELECT NAME display_value, NAME return_value
    FROM DEBIT<br><br>
    <b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
    In the PL/sQL, write something like:
    DECLARE
      v_key DEBIT.KEY%TYPE;
      v_site DEBIT.SITE%TYPE;
      CURSOR v_cur_myvals IS
              SELECT KEY, SITE
              FROM DEBIT
              WHERE NAME = :P1_MYSELECT;
    BEGIN
      OPEN v_cur_myvals;
      LOOP
              FETCH v_cur_myvals
              INTO  v_key,v_site;
              EXIT WHEN v_cur_myvals%NOTFOUND;
    :P1_KEY := v_key;   
    :P1_SITE := v_site; 
      END LOOP;
      CLOSE v_cur_myvals;
    END; <br><br>
    Then you can use these values for whatever purpose you need to.
    Hope this helps.

  • How to retrieve the values from a LinkedList

    Hello,
    I have just put this question in java programming forums by mistake...I think that it should be here ...
    I have created a LinkedList to store the results of a query to a database.
    These reasults are decimal numbers and then I want to sum all these numbers to be able to make the average.
    But when I try to retrieve the values of the Linked List I always receive an incopatible types error..
    Here is an extract of my code in a jsp page.
    LinkedList Average = new LinkedList();
    String Media = rst.getString(10);
    Average.add(Media);
    int Size = Average.size();
    double Sum = 0.0;
    for (int i=0; i<=Size; i++)
                    double Result = Average.get(i)     
                  Sum = Sum + Result;
    }If I try to retrieve the value of only one node from the list , I can just putting <%=Average.get(i)%>...but..how can I retrieve all the values (they are decimal numbers) to be able to add them?

    If you want to sum all the values, is there any reason you just don't retrieve the sum from the database rather than the list of values?
    anyway
    List average = new LinkedList();
    while (rst.next()){
      // retrieve the number:
      String mediaString = rst.getString(10);
      Double media = Double.valueOf(mediaString);
      // or maybe like this if it is a number in the database
      Double media = new Double(rst.getDouble(10));
      average.add(media);
    doubleSum = 0.0;
    for (Iterator it = average.iterator(); it.hasNext(); ){
      Double result= (Double) it.next();
      doubleSum += result.doubleValue();
    }

  • Retrieving checkbox values from JSP

    In my program I have an 'ADD' form.
    In that form I ask the question "Do you have a car?"
    with a single checkbox for reply.
    The code I use is below.
    Can anyone tell me how to set the checkbox to 'ticked' or 'unticked' in my
    main jsp by sending paramters from the ADD form's checkbox??
    ADD FORM...
    <form action='post' method='servlet/controller?task=addEmployee'>
    <input type'text' name='emplpoyee'>
    <input type='checkbox' name='car' value='true'>
    <input type='submit' name='submit' value='Add'>
    </form>
    Through a class I retrieve the values posted
    public Page doTask() {
    Employees employee = new Employees();
    employee.setName(request.getParameter("name"));
    employee.setCar(Boolean.getBoolean(request.getParameter("car")));
    try{
    String submit = request.getParameter("submit");
    if(submit.equals("Add")){
    model.addEmployee(employee);
    Page nextPage = new Page("/servlet/Controller?task=GetAllEmployeesTask");
    return nextPage;
    This class sends the parameters to my main JSP where
    this information is inserted. ('employees.jsp')
    my name is retrieved so...
    <= employees.getName()>
    how would I retrieve/set a checkbox value

    request.getParameter("car")
    the thing is that the browser will not send unchecked checkbox values. so you can only know it was checked by the presense or absense of the value.

Maybe you are looking for

  • Can I upgrade my Macbook from 10.5.8 to 10.6 (Snow leopard)

    I have an older Macbook that is currently running OSX 10.5.8 and i want to upgrade it to OSX 10.6 Snow Leopard. Am I able to do this? What will this do to my iTunes library? And does it come with a version of iPhoto? thanks for your help.

  • PO for stock with statistical WBS element

    Dear colleagues, My customer wants to create Purchase Orders for regular valuated plant stock with a statistical assignment to a WBS element, so they can report on the total procurement costs per project/WBS. They do not wish to use project stock, be

  • Parent/child issue

    Hello, I need to create a report in which if the user selects a specific parent, it should only allow to select the children under that parent. so e.g. Under time dimension, There is year and Quarter property. so when a user enters 2008 as the year,

  • Depreciation on revaluated assets

    Dear Sap Gurus Senario:- 1. We have purchased an asset for 10,000 as on 01.04.2006 2. Revaluation has been done for same asset 5000 as on 01.10.2006     Now total asset cost is 10000+5000. 3. Run depreciation as on 31.03.2007 for that asset. here sys

  • Windows 8 mail/calendar/people apps

    How do you sync a Nokia phone with the new native Windows metro apps, using Nokia Suite?