Navigation and Parameters problem

Hey all,
I'm very new to JSF and we are attempting a very basic test app to try and get our heads round things. The app is basically a list of people, with a link to edit them, and a page which lets you edit the person and a button to save the person, after which, you will go back to the list of people.
I have a personlist.jsp page which obtains a (fixed) list of people from the PeopleDAO, using a h:dataTable to iterate and display each person. Each row has an edit link of the form "......editperson.jsp?PersonID=<number>" where number is the person ID for that person.
In the edit person page, I have a PersonBean which is used to display the person details. The person bean is specified in faces-config.xml as a managed bean, and I hook the PersonID property of the PersonBean up using a managed property linked to the PersonID param.
<managed-bean>
<managed-bean-name>personbean</managed-bean-name>
<managed-bean-class>mypackage.view.PersonBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>personID</property-name>
<value>#{param.personID}</value>
</managed-property>
</managed-bean>
I have the navigation set up to go back to the personlist.jsp page once you click the save button :
<navigation-rule>
<from-view-id>/editperson.jsp</from-view-id>
<navigation-case>
<from-outcome>save</from-outcome>
<to-view-id>/personlist.jsp</to-view-id>
</navigation-case>
</navigation-rule>
On editperson.jsp, I have a commandbutton that has an action="save" (this is for simple testing since we are having problems with it) :
(in the form for editing the person)
<h:commandButton value="Update" action="save"/>
The problem is that when you click the button, it tries to reload editperson.jsp without the personID parameter, which causes an error because it is expecting a parameter as specified in the PersonBean managed bean declaration.
If I set the property to a constant value in the managed bean declaration, everything works fine, but when bound to the parameter, it causes an error.
I can see why it is an error, but I have no idea how to get around it. Am I passing parameters the wrong way, or is there some option to set a default value for the param, or am I navigating incorrectly?
Any help is appreciated,
Cheers,
Andy

Well, at last, it seems that after another day of testing, I have found the answer.
I'm posting back here since I found a number of people who had this problem, and none of them received an answer. Hopefully this might help some poor soul in the future.
The problem is data type conversion. When there is no person ID, the parameter is effectively a blank string, which of course cannot be converted to an integer. Even specifying the type in the managed property did not help the conversion process.
I have a mini test app that has a bean with managed int and string properties. The page renders fine when the intValue param is there, but crashes if it is not. The page doesn't give a hoot about whether the textValue parameter is there or not and will always render by substituting a blank string as the value.
I'm sure there must be some way to pass a parameter to a managed property as an integer without having the application crash if it is missing, especially considering most applications use integers for primary keys.
I have seen samples that do this, alas, since many don't compile, deploy and run out of the box, I am unable to verify whether or not they break under the same conditions.
The only thing I can think of is to have the backing bean act as a container for my real objects. I.e. PersonBean has a managed person ID string property which when set, converts the ID to an integer and loads up the person and assigns it to PersonBean.Person .
This is probably actually a better structure all round, especially if the backing bean for a view needs to contain other objects, i.e. a list of orders for that person. By adding the extra layer in there, it will make it easier to add additional model objects to the backing bean.

Similar Messages

  • Avant window navigator and Openbox problem

    Hi,
    I have a problem with AWN and Openbox.
    AWN are showing only in Desktop 1 of Openbox. If I change desktop, AWN not are showing...
    Can I solve this problem?
    Thanks.

    Put this at the end of your ~/.config/openbox/rc.xml:
    <application name="avant-window-navigator">
    <desktop>all</desktop>
    </application>

  • Web Services and Parameters - Problem

    I have 2 web services I set up. One takes no parameters and
    works fine. The
    other takes arguments and it tells me the method cannot be
    found. What am I
    missing? What is the magic bullet to invoke a web service
    that takes
    arguments and have it work? I have all the web service's
    arguments set to
    'required="yes"' and I set up another 'no argument function'
    in the
    SearchProperty.cfc to make sure it also works and it did
    fine, so I know the
    web service exists and is accessible.
    I tried both createObject in my contoller and cfinvoke. Both
    work fine for
    the web service that takes no arguments and neither work for
    the one that
    does.
    Here is my controller blocks (please excuse the Model-Glue)
    This works fine
    <!---Get All Cities For Search Engine--->
    <cffunction name="getCities" access="public"
    returntype="void"
    output="false" hint="I displays all the cities for the front
    page">
    <cfargument name="event" type="ModelGlue.Core.Event"
    required="yes">
    <cfset Cities = createObject("webservice",
    http://74.86.90.210/realitorToolBox/model/webservices/CityGateway.cfc?wsdl")/>
    <cfset allCities = Cities.getCities() />
    <cfset arguments.event.setValue("getAllCities",
    allCities)/>
    </cffunction>
    This cannot be found:
    <!---Search Residentual Properties--->
    <cffunction name="SearchProperties" access="public"
    returntype="void"
    output="false" hint="I displays all the cities for the front
    page">
    <cfargument name="event" type="ModelGlue.Core.Event"
    required="yes">
    <cfset userID = 555555>
    <cfset bedrooms =
    arguments.event.getValue("bedrooms")/>
    <cfset bathrooms =
    arguments.event.getValue("bathrooms")/>
    <cfset footage = arguments.event.getValue("footage")/>
    <cfset minprice =
    arguments.event.getValue("minprice")/>
    <cfset maxprice =
    arguments.event.getValue("maxprice")/>
    <cfset basement =
    arguments.event.getValue("basement")/>
    <cfset garage = arguments.event.getValue("garage")/>
    <cfset CITIES = arguments.event.getValue("CITIES")/>
    <cfset Search = createObject("webservice",
    http://74.86.90.210/realitorToolBox/model/webservices/SearchProperty.cfc?wsdl")/>
    <cfset searchAll = Search.SearchProperty(#userID#,
    #bedrooms#,
    #bathrooms#, #footage#, #minprice#, #maxprice#, #basement#,
    #garage#,
    #CITIES#) />
    <cfset arguments.event.setValue("Results",
    searchAll)/>
    </cffunction>
    Any ideas? My client is getting anxious and I hope to offer
    this service to
    other developers to use for their client's site.

    Ok, I will make this simplier. Couple questions.
    Is it possible to use cfargument in a web service?
    I looked at the samples out there and they all just have
    queries that take a
    form variable (#form.name#) since it was being passed by a
    form.
    Is it possible to have one web service function invoke
    another function in
    the same cfc?
    If you have one function that calls another to first validate
    the user and
    then invoke another to get the search results, do all have to
    be remote or
    can you have the search be private since you dont want it
    invoked remotely.
    I.E.
    <cffunction name="search" access="remote"
    returntype="query">
    <cfset authenticate = authenticateUser(#username#)>
    <cfif authenticate EQ 'yes'>
    <cfset myResults = searchProperty(#mlsnumber#)>
    </cfif>
    <cfreturn my Results>
    </cffunction>
    I tried a simple city search and tried to pass a variable
    argument.
    <cfinvoke
    webservice="
    http://74.86.90.210/realitorToolBox/model/webservices/CityGateway.cfc?wsdl"
    method="findCity" city = "clinton" returnvariable="aQuery"/>to:
    <cffunction name="findCity" access="remote"
    returntype="query"> <cfquery name="getCities"
    datasource="MLSListings"> Select city FROM residential WHERE
    city = '#city#' </cfquery> <cfreturn getCities>
    </cffunction>And I still get a function cannot be found, even
    though I used the cfcexplorer to verify that it does exist on the
    remote server.Any ideas?

  • Problem with navigation and masthead by changing languages with Anonymous

    Hi All,
    i have a problem with navigation and masthead by changin the language when accessing as anonymous user.
    Ive created two additional users anon_de  (with language german )and anon_en (for english).
    I've created also two links in the in masthead:
    /irj/portal/anonymous?guest_user=anon_en and /irj/portal/anonymous?guest_user=anon_de
    When i choose "de" for the first time it works fine, but when i choose "en" again the language in the content are is changing to english again, but not in navigation and masthead. When i click again on link for "en" the languge is set to english. Strange thing is that when i click on "de" instead the portal content change to german but masthead and navigation are in english now, as it should be before....
    It seems that masthead and navigation have always prevoius language selected.
    Do you know, what could be the reason of that strange behavior?
    Thanks for help
    Karol

    Hi Detlev,
    you are right. the user is not "updated" fast enough... the strange thing is, that it works by the first time i change the language...
    well.. i can implement that workaround as you suposed, but it would be a really workaround as the same page will be requestes second time, causing requests number to be double..
    Thanks for help
    ps. i forgot to mark this message as question to give points.. if you tell me how i can change that ill reward your answer..

  • Google Maps Navigation and Google Music problem

    Hello,
    I love the LG G2 but it has a few concerning issues. First, is the squealling, hissing, cracking, popping, etc. during phone calls, but I have seen that brought up by others.
    The second problem that I've discovered, and the most upsetting to me, is that when using the Google Maps Navigation and Google Music All Access at the same time, whenever the navigation voice instructs a direction, the music shuts off. It is then silent until the navigation voice instructs the next direction OR when a new track starts. This was not a problem on my droid bionic, so it must be an LG G2 issue. This is a huge problem to me as I travel a lot for work and usually use GPS to find where I'm going, and I subscribe to Google Music All Access so I listen to music in the car. This problem makes that impossible to do (I have to choose).
    A related issue, is that my Alpine CD player displayed track information (Artist, Song, Album) with my Droid Bionic, but with the LG G2 it displays 'UNKNOWN'. I find it hard to believe that a two year old phone has capabilities that a brand new phone wouldn't, so I'm hoping these issues will be fixed with a software patch.
    Has anybody else experienced these issues, or does it work fine with your LG G2?

    Hawaii is a part of the USA so you will be fine there. Mexico on the other hand, you will be roaming for data there and could see extra charges for international data.

  • I got my Iphone 3gs unlocked, but Navigation and Compass are not working. Please help if anybody had faced this problem and got it resolved.

    I got my Iphone 3gs unlocked, but Navigation and Compass are not working. Please help if anybody had faced this problem and got it resolved.

    Only the carrier that the iPhone was locked to can unlock. There you go, hacking void any support from this forum.

  • Custom Data Processing Extension and Parameters

    Hello,
    I have successfully implemented a custom data processing extension. Now I'm trying to add parameters, but the documentation is very weak on this topic. Also all examples of custam data processing extensions I have found so far are working without parameter support. Using a search engine I have found a custom data processing extension's sequence diagram during report execution. The related article also gives some hints about the IDbCommandAnalysis interface.
    The GetParameters implementation creates a parameter collection based on the current command text and returns this collection. So far no problem.
    My question is how to implement the IDbCommand's CreateParameter method and Parameters property? In CreateParameter I just return a new instance of my IDataParameter implementation, and the Parameters property returns a new parameter collection based on the current command text.
    Is this ok so? At least this is the first implementation which seems to work in the data designer. If I share an instance variable for GetParameters and Parameters I will either get all parameters twice or BIDS will crash when pressing the execute button in the dataset designer - depending on my actual implementation.
    What I'm still missing is how to get the parameters added automaticall to the dataset's properties parameter register?
    thanx in advance and kind regards, Gerald

    I think that finally (after some days of trying) I could make it work. The dataset and report parameters are reflecting the command text's parameters now (BTW: to answer my last question - the dataset's properties are updated after pressing the refresh button only). The road to success was not to use the same member variable for the collections returned by IDbCommandAnalysis:GetParameters() and IDbCommand:Parameter and not to fill the latter one with the command text's parameters (see partial source code below).
    public sealed class MyCommand : IDbCommand, IDbCommandAnalysis  
        private string m_commandText;  
        private MyParameterCollection m_parameters = new MyParameterCollection();  
        public string CommandText  
            get { return this.m_commandText; }  
            set { SetCommandText(value); }  
        public IDataParameterCollection Parameters  
            get { return m_parameters; }  
        public IDataParameter CreateParameter()  
            return new MyParameter();  
        public IDataParameterCollection GetParameters()  
            return GetParameterCollection();  
        private void SetCommandText(string commandText)  
            m_commandText = commandText;  
        private MyParameterCollection GetParameterCollection()  
            // ... create parameter collection based on m_commandText  
    Still there are some open questions:
    How can I update the report parameter's properties? Now the parameter's data type is always string, but I'd like to assign the right data type. I'd also like to tag the parameters as hidden and supply a non-queried default value. Is this possible? How?
    Although I my implementation of IDbCommandAnalysis:GetParameters() returns a collection containing the parameter names and values the "prompt query parameters" dialog (after pressing the query designer's execute button in the toolbar) shows a "<blank>" value for the parameters. What could be the problem?
    Thanx in advance and regards,
    Gerald

  • Is there a way in 4.0 to get back button that hides navigation and bookmark bars?

    I used to have Firefox version 3.6.something, and in it there was an elongated bubble at the very top right of the window which when pressed would hide the navigation and bookmark toolbars. (This button also exists at the top right corner of Adobe Reader, for instance.) It seems to be missing in version 4.0.
    Is there a way to get it back (similar to how it's possible to get back the old status bar)?

    Thank you, I know shortcuts are always an option but I was hoping for a more... automatic? solution. I've resorted to forcing links to new tabs that are "to other sites." It has solved my immediate problem, but still is a bit screwy.
    Thank you for the help, though. :]

  • Document Library Template with Metadata Navigation and Key Filters

    When saving a document library as a template, any configured metadata navigation and key filters columns are lost. Has anyone else experienced this issue or know a viable workaround? Can anyone shed some light on why these settings are not saved with
    the template?
    Thanks!
    Wade Hunter MCP/MCTS - WSS 3.0, MOSS 2007, SharePoint 2010

    Wade,
    Did you figure out a workaround or why this happens?  I am having the same problem.
    Thanks

  • I  want to hide the detailed navigation and portal favorites

    Hello:
        Every person in SDN!
        I find another problem in WPC.
        I create a WPC role called A.After I preview this role,I  want to hide the detailed navigation and portal favorites.
        but I don't know how to do?
        Who can help me?
        lexian
       Thanks a lot!

    hi,
    you can do using default frame work page.
    1.go in portal_content/portal_users/standard_portal_users
    2.open default frame work page unclick the top_level_navigation
    then you wont be able to see TLN
    jayesh talreja

  • How can i find all global variable and parameters in a form?

    I don't know name of global variables and parameters,but i want get their name and value .
    how can i do? who can help me?
    Thank you.
    Daniel Liang
    2007.1.19

    no problem. As Francois said you can't do it programmatic in runtime.
    But when you use the debug-mode you can see each global with name and value.
    By the way: It's not good to not know all the globals in your application. This is one of the most important things you have to write down for your app. Create a wiki for such informations, so that all developer can share their information.

  • Infoview Issues Missing Events and Parameters

    Very strange problem.  I am on BO 3.1... the CMC shows all events and parameters.  When I open up Infoview under the same login (administrator), I am not able to see any events when I go to schedule.  In its place, under job history, the report would show NO parameters even though it has parameters and it is showing in CMC.  Also, when trying to schedule it based on an events, there are no available events.  Instead, I get a message of "This is a formatting string" in all of the boxes. 
    At first I thought maybe it is a setting for the Infoview application on CMC but it does not make sense since administrators have FULL CONTROL.
    Help.
    Thanks!

    Hi,
    Does this happen for all reports?  If so, then its probably an interface issue more than anything else.  You'll want to redeploy the web applications, or at least the InfoView releated ones (InfoViewApp, InfoViewAppActions, PlatformServices)
    You can use WDeploy to do this. 
    [Web Application Deployment Guide - Windows|http://service.sap.com/~sapidb/011000358700001647122008E/xi3-1_deployconfig_win_en.pdf]
    [Web Application Deployment Guide Unix|http://service.sap.com/~sapidb/011000358700001647132008E/xi3-1_deployconfig_unix_en.pdf]
    Or, an easy way in Tomcat is to go to the WebApps directory and just rename the folders of the apps you want to redeploy.  Then restart tomcat and wait about 20 minutes for the apps to re-deploy.
    Other than that, have you modified the out of the box security at all?  Locked down permissions to the InfoView application or anything along those lines?
    Thanks
    Jonathan
    Edited by: Jonathan Brown on Jul 13, 2010 6:47 PM

  • What are the function modules used in interactive ALV and parameters?

    what are the function modules used in interactive ALV and parameters?

    hi sunil
    check these links,
    About ALV:
    http://www.geocities.com/mpioud/Abap_programs.html
    ALV Group Heading
    http://www.sap-img.com/fu037.htm
    and few more,
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    also run the folowing code and see
    check this sample code.you will be well versed with all the events of a interactive alv report.mark points if useful.
    *& Report ZALV4_INTERACTIVE *
    *& interactive alvs *
    REPORT ZALV4_INTERACTIVE NO STANDARD PAGE HEADING
    MESSAGE-ID ZMSG
    LINE-COUNT 37(3)
    LINE-SIZE 134.
    TYPE-POOLS : SLIS.
    TABLES DECLARATION ********************
    TABLES : VBRK, " BILLING MASTERS TABLE
    VBRP. " BILLING ITEM TABLE
    TYPES DECLARATION ********************
    TYPES : BEGIN OF TY_VBRK, " types for billing masters table
    VBELN TYPE VBRK-VBELN, " billing document
    WAERK TYPE VBRK-WAERK, " document currency
    VKORG TYPE VBRK-VKORG, " sales organization
    FKDAT TYPE VBRK-FKDAT, " billing date
    BUKRS TYPE VBRK-BUKRS, " company code
    BUTXT TYPE T001-BUTXT, " company name
    NETWR TYPE VBRK-NETWR, " net currency value
    LINE_COLOR(4) TYPE C,
    END OF TY_VBRK.
    TYPES : BEGIN OF TY_VBRP, " types for billing document item data
    POSNR TYPE VBRP-POSNR, " billing item
    FKIMG TYPE VBRP-FKIMG, " actual invoiced quantitty
    VRKME TYPE VBRP-VRKME, " sales unit
    NETWR TYPE VBRP-NETWR, " net currency value
    MATNR TYPE VBRP-MATNR, " material number
    ARKTX TYPE VBRP-ARKTX, " short text for sales order item
    END OF TY_VBRP.
    FIELD CATALOG ********************
    DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
    LAYOUT DECLARATION ********************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV.
    EVENTS DECLARATION ********************
    DATA : TY_EVENTS TYPE SLIS_ALV_EVENT,
    IT_EVENTS TYPE SLIS_T_EVENT.
    PF STATUS ********************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    USER COMMAND ********************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
    R_UCOMM LIKE SY-UCOMM.
    INTERNAL TABLES ********************
    DATA : IT_VBRK TYPE TABLE OF TY_VBRK, "internal table for billing master
    IT_VBRP TYPE TABLE OF TY_VBRP, "internal table for billing item
    *internal table for field catalog
    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    WORK AREA ********************
    DATA : WA_VBRK LIKE LINE OF IT_VBRK, "work area for billing master
    WA_VBRP LIKE LINE OF IT_VBRP. "work area for billing item
    VARIABLE DECLARATION ********************
    DATA : V_DATE TYPE SY-DATUM, " variable to store date values
    V_VBELN TYPE VBRK-VBELN, " variable for billing document
    V_FKDAT TYPE VBRK-FKDAT, " variable for billing date
    V_FLAG(1). " variable for flag
    SELECTION SCREEN ********************
    SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN , " Billing document
    S_FKDAT FOR VBRK-FKDAT, " Billing date
    S_MATNR FOR VBRP-MATNR. " Material number
    PARAMETERS : R1 RADIOBUTTON GROUP G1, "whole item details
    R2 RADIOBUTTON GROUP G1. "selected item details
    INITIALIZATION ********************
    INITIALIZATION.
    V_FLAG = 'X'.
    V_DATE = SY-DATUM - 20.
    S_FKDAT-SIGN = 'I'.
    S_FKDAT-OPTION = 'EQ'.
    S_FKDAT-LOW = V_DATE.
    S_FKDAT-HIGH = SY-DATUM.
    APPEND S_FKDAT.
    SELECTION SCREEN VALIDATION ********************
    AT SELECTION-SCREEN.
    PERFORM CONVERSION. " performs data conversion for input
    PERFORM VBELN_VALIDATE. " validating the billing document
    PERFORM FKDAT_VALIDATE. " validating the billing date
    START OF SELECTION ********************
    START-OF-SELECTION.
    SET TITLEBAR 'AAAA'.
    PERFORM VBRK_POPULATE. " populating the billing master detais
    PERFORM FIELDCATALOG. " designing the field catalog
    PERFORM EVENTS. " performing the events for top of page
    PERFORM DISP_BASICLIST." displaying the basic list
    *& Form VBELN_VALIDATE
    text validating the billing document
    --> p1 text
    <-- p2 text
    FORM VBELN_VALIDATE .
    IF S_VBELN IS INITIAL.
    MESSAGE E000 WITH 'Make entries in all required fields'.
    ELSE.
    SELECT SINGLE VBELN
    FROM VBRK
    INTO V_VBELN
    WHERE VBELN IN S_VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH 'BILLING DOCUMENT DOESNT EXIST'.
    ENDIF.
    ENDIF.
    ENDFORM. " VBELN_VALIDATE
    *& Form FKDAT_VALIDATE
    text validating the billing date
    --> p1 text
    <-- p2 text
    FORM FKDAT_VALIDATE .
    SELECT SINGLE FKDAT
    FROM VBRK
    INTO V_FKDAT
    WHERE FKDAT IN S_FKDAT.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH 'BILLING DATE DOESNT EXIST'.
    ENDIF.
    ENDFORM. " FKDAT_VALIDATE
    *& Form VBRK_POPULATE
    text populating the billing master details
    --> p1 text
    <-- p2 text
    FORM VBRK_POPULATE .
    DATA : LD_COLOR(1) TYPE C.
    LD_COLOR = 5.
    SELECT VBRK~VBELN
    VBRK~WAERK
    VBRK~VKORG
    VBRK~FKDAT
    VBRK~BUKRS
    VBRK~NETWR
    T001~BUTXT
    FROM VBRK INNER JOIN T001
    ON VBRKBUKRS = T001BUKRS
    INTO CORRESPONDING FIELDS OF TABLE IT_VBRK
    WHERE VBRK~VBELN IN S_VBELN AND
    VBRK~FKDAT IN S_FKDAT.
    LOOP AT IT_VBRK INTO WA_VBRK.
    LD_COLOR = LD_COLOR + 1.
    IF LD_COLOR = 8.
    LD_COLOR = 1.
    ENDIF.
    CONCATENATE 'C' LD_COLOR '10' INTO WA_VBRK-LINE_COLOR.
    MODIFY IT_VBRK FROM WA_VBRK.
    ENDLOOP.
    ENDFORM. " VBRK_POPULATE
    *& Form CONVERSION
    text data conversion to take leading zeroes into account
    --> p1 text
    <-- p2 text
    FORM CONVERSION .
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = S_VBELN
    IMPORTING
    OUTPUT = S_VBELN.
    ENDFORM. " CONVERSION
    *& Form DISP_BASICLIST
    text displaying the basic list
    --> p1 text
    <-- p2 text
    FORM DISP_BASICLIST .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = PF_STATUS
    I_CALLBACK_USER_COMMAND = USER_COMMAND
    I_STRUCTURE_NAME =
    IS_LAYOUT = WA_LAYOUT
    IT_FIELDCAT = IT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = 'X'
    IS_VARIANT =
    IT_EVENTS = IT_EVENTS
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBRK
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " DISP_BASICLIST
    *& Form FIELDCATALOG
    text designing the field catalog
    --> p1 text
    <-- p2 text
    FORM FIELDCATALOG .
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'VBELN'.
    WA_FIELDCAT-SELTEXT_L = 'BILLING DOCUMENT'.
    WA_FIELDCAT-COL_POS = 1.
    WA_FIELDCAT-EMPHASIZE = 'C610'.
    WA_FIELDCAT-KEY = 'X'.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'WAERK'.
    WA_FIELDCAT-SELTEXT_L = 'DOCUMENT CURRENCY'.
    WA_FIELDCAT-COL_POS = 2.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'VKORG'.
    WA_FIELDCAT-SELTEXT_L = 'SALES ORGANIZATION'.
    WA_FIELDCAT-EMPHASIZE = 'C610'.
    WA_FIELDCAT-COL_POS = 3.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'FKDAT'.
    WA_FIELDCAT-SELTEXT_L = 'BILLING DATE'.
    WA_FIELDCAT-COL_POS = 4.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'BUKRS'.
    WA_FIELDCAT-SELTEXT_L = 'COMPANY CODE'.
    WA_FIELDCAT-COL_POS = 5.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'BUTXT'.
    WA_FIELDCAT-SELTEXT_L = 'COMPANY NAME'.
    WA_FIELDCAT-COL_POS = 6.
    WA_FIELDCAT-OUTPUTLEN = 25.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'NETWR'.
    WA_FIELDCAT-SELTEXT_L = 'NET CURRENCY VALUE'.
    WA_FIELDCAT-COL_POS = 7.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_LAYOUT-ZEBRA = 'X'.
    WA_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    ENDFORM. " FIELDCATALOG
    *& Form SET_PF_STATUS
    text set the pf status
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
    SET PF-STATUS 'Z50658_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM. "SET_PF_STATUS
    *& Form SET_USER_COMMAND
    text set the user command
    FORM SET_USER_COMMAND USING R_UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN 'CLICK'.
    IF R1 = 'X'.
    IF NOT IT_VBRK IS INITIAL.
    SELECT POSNR
    FKIMG
    VRKME
    NETWR
    MATNR
    ARKTX
    FROM VBRP
    INTO CORRESPONDING FIELDS OF TABLE IT_VBRP
    FOR ALL ENTRIES IN IT_VBRK
    WHERE VBELN = IT_VBRK-VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH ' NO BILLING DETAILS FOUND'.
    ELSE.
    IF V_FLAG = 'X'.
    PERFORM DET_FIELDCATALOG.
    V_FLAG = ''.
    ENDIF.
    PERFORM DET_LISTDISPLAY.
    ENDIF.
    ENDIF.
    ENDIF.
    IF R2 = 'X'.
    READ TABLE IT_VBRK INTO WA_VBRK INDEX RS_SELFIELD-TABINDEX.
    IF SY-SUBRC = 0.
    SELECT SINGLE POSNR
    FKIMG
    VRKME
    NETWR
    MATNR
    ARKTX
    FROM VBRP
    INTO CORRESPONDING FIELDS OF WA_VBRP
    WHERE VBELN = WA_VBRK-VBELN.
    ENDIF.
    APPEND WA_VBRP TO IT_VBRP.
    ENDIF.
    IF V_FLAG = 'X'.
    PERFORM DET_FIELDCATALOG. "designing the field catalog for items
    V_FLAG = ''.
    ENDIF.
    PERFORM DET_LISTDISPLAY. "displaying the secondary list
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'UP'.
    LEAVE TO SCREEN 0.
    WHEN 'CANCEL'.
    CALL TRANSACTION 'SE38'.
    ENDCASE.
    ENDFORM. "SET_USER_COMMAND
    *& Form DET_FIELDCATALOG
    text designing the field catalog for item details
    --> p1 text
    <-- p2 text
    FORM DET_FIELDCATALOG .
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'POSNR'.
    WA_FIELDCAT1-SELTEXT_L = 'BILLING ITEM'.
    WA_FIELDCAT1-COL_POS = 1.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'FKIMG'.
    WA_FIELDCAT1-SELTEXT_L = 'INVOICE QUANTITY'.
    WA_FIELDCAT1-COL_POS = 2.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'VRKME'.
    WA_FIELDCAT1-SELTEXT_L = 'SALES UNIT'.
    WA_FIELDCAT1-COL_POS = 3.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'NETWR'.
    WA_FIELDCAT1-SELTEXT_L = 'NET CURRENCY VALUE'.
    WA_FIELDCAT1-COL_POS = 4.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'MATNR'.
    WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUMBER'.
    WA_FIELDCAT1-COL_POS = 5.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'ARKTX'.
    WA_FIELDCAT1-SELTEXT_L = 'SALES ORDER ITEM'.
    WA_FIELDCAT1-COL_POS = 6.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_LAYOUT1-ZEBRA = 'X'.
    ENDFORM. " DET_FIELDCATALOG
    *& Form DET_LISTDISPLAY
    text displaying the secondary list
    --> p1 text
    <-- p2 text
    FORM DET_LISTDISPLAY .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_STRUCTURE_NAME =
    IS_LAYOUT = WA_LAYOUT1
    IT_FIELDCAT = IT_FIELDCAT1
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS = IT_EVENTS
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBRP
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR IT_VBRP[].
    ENDFORM. " DET_LISTDISPLAY
    *& Form EVENTS
    text
    --> p1 text
    <-- p2 text
    FORM EVENTS .
    CLEAR TY_EVENTS.
    TY_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
    TY_EVENTS-FORM = 'TOP_OF_PAGE'.
    APPEND TY_EVENTS TO IT_EVENTS.
    ENDFORM. " EVENTS
    *& Form TOP_OF_PAGE
    text
    FORM TOP_OF_PAGE.
    SKIP.
    ULINE.
    WRITE :/2 ' DATE :', SY-DATUM,
    45 'INTELLIGROUP ASIA PVT LTD',
    110 'TIME :', SY-UZEIT.
    WRITE : /3 'USER :', SY-UNAME,
    45 'TITLE :', SY-TITLE,
    110 'PAGE :', SY-PAGNO.
    ULINE.
    SKIP.
    ENDFORM. "TOP_OF_PAGE
    Cheers
    navjot
    Reward with points if it is helpful
    Message was edited by:
            navjot sharma

  • Bea JSP workshop plugin- and MyEclipse - problems

    I have been using Bea workshop studio eclipse plugin ( JSP part) with MyEclipse. Bea JSP workshop( with Struts) is a very good product-- better than My Eclipse JSP's .
    I had been using MyEclipse (Build id: 20060810-5.0.1-GA windows )with BEA JSP workshop version 3.2.1 with no problems. This combination works well.
    I reinstalled the latest versions of eclipse/myeclipse/BEA workshop for struts
    and now things are not working well.
    Right clicking on the navigator and package explorer in the different perspectives ( JAVA, MyEclipse, BEA workshop studio does not always work
    To reproduce the problem install Eclipse 3.2 then MyEclispe version 20061111-5.1.0-GA , then BEA JSP workshop studio - trial version 3.3 . Try and right click on an item in the navigator and package explorer -- change to different perspectives --JAVA, MYEclipse , BEA Workshop for Struts and try to right click again.
    THen uninstall BEA Workshop . The problem goes away.
    Hank

    FYI
    I received this reply from MyEclipse:
    "MyEclipse uses the patched WTP. You have installed WTP that has been included in BEA Workshop.
    The easiest way to solve this issue is to disable BEA's WTP. MyEclipse's WTP is compatible with BEA Workshop."
    I updated to eclipse 3.2.1 and disabled BEA's WTP and everything seems to be working OK.

  • How to invoke JSF With Standard Urls and parameters

    Hi,
    Could some one please help me how to invoke JSF with standard Urls and parameters?
    My requirement is:
    http://localhost:8080/myapp/faces/jsf_page.jsp?trackerID=11&viewPage="products"
    then i want to save the tracker details into database and redirect the user to "products" page.
    Would some one suggest me where can i get some example?

    Hi BalusC,
    It didn't solve my proble.....Your solutions are fantastic for most of the issues. But mine problem is unclear where JSF page tags.
    If possible, Could you please provide me how to invoke the method from JSF page....
    same code works if the user click on command button but my requirement is as soon as the user click on the link from 3rd party website, then he need to come to our web application and invoke the JSF page along with ManagedBean for saving details and redirect to disganted webpage.
    I will provide the following link to 3rd party websites. the URL is :: http://somedomain.com/myApp/Tracker.JSF?trackerID=111
    Could you please provide me the code i need to write in JSF ....just for invoking ManagedBean class...? how i code for page on load call the managedBean for specific method?

Maybe you are looking for

  • Spry Validation in a Spry Detail Region

    am trying to pre-populate an "update" data form using a spry detail region. Basically a list of users is displayed on the left, and the detail in a tab on the right. A second "edit" tab displays a form that is populated with data from the spry datase

  • Adobe Premiere Pro wont play any video/audio

    Hello! i recently got an Adobe creative cloud membership. and so i have been editing a video. no problems, no lag, nothing, its all been wonderful. but i sent the video to SpeedGrade, then exported from there and had an audio sync issue, that i decid

  • Provide the access to 3rd party in internal network? Needs some Design suggestions?

    Hi Folks, I have to provide the access to 3rd party in the internal network to repair their server... How can we provide them the access? Needs some input as design perspective and working solution? Thanks, Regards, MS

  • Why do i need to reconfigure a network each time i boot up ? (G5, airport)

    I am using a G5 with a built in airport extreme card and a mini antenna. Each time I boot up I have to reconfigure a network. I could not locate any info from Apple regarding this problem. Any one know how to solve this problem? Thanks in advance. Ri

  • Should I be closing apps after use?

    Hello! I haven't been an iPad user for long, but I know the theory that apps I have used are not affecting speed of use of the Pad... Is this true?  Should I ever be consciously closing apps I am not using? Thanks.