[HELP] using multiple value parameter in c:import tag

I need to pass a multi-value parameter to a included page. e.g.
http://myhost/MyContext/dir1/page1.jsp?abc=value1&abc=value2/dir1/page1.jsp includes /dir2/page2.jsp, and would like to pass this multi-value parameter over, but change the name to xyz, some what like
<c:import url="/dir2/page2.jsp?xyz=value1&xyz=value2"/>The problem is that the number of values is not fix number, so I have to write some logic to iterate thru its parameter values. But the <c:import> tag body allows only simple listed <c:param> tags, it doesn't allow other logic/condition/iteration.
<!-- gives java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected the page: "Illegal child tag in "c_rt:import" tag: "c:forEach" tag at runtime -->
<c:import url="/dir2/page2.jsp">
<c:forEach var="xyz" items="${paramValues.abc}">
<c:param name="xyz" value="${xyz}"/>
</c:forEach>
</c:import>{code}
I also tried <c:url> tag. The good news is that it supports jsp logic in body:
{code}<c:url var="url" value="/dir2/page2.jsp">
<c:forEach var="xyz" items="${paramValues.abc}">
<c:param name="xyz" value="${xyz}"/>
</c:forEach>
</c:url>
<c:out value="${url}"/>{code}but it prefixes the url with the current context:
{code}/MyContext/dir2/page2.jsp?xyz=value1&xyz=value2{code}
Now I run into a dead end. It seems the only way out is to use <% %> scriptlet to do my own url composite, which is pretty similar to <c:url> but avoid the context part.
Any suggestion?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

out.println("<html>");
out.println("<head>");
out.println("<script language=\"JavaScript\">");
out.println("function altSubmit() {");
out.println("document.MyForm.action = \"Second.html\";");
out.println("document.MyForm.submit();");
out.println("}");
out.println("</script>");
out.println("</head>");
out.println("<body>");
My personal suggestion is to use follow the MVC (Model View Control) pattern where in you can write all your "html" part in a JSP.
Model -> Bean
View -> JSP
Control -> Servlet

Similar Messages

  • How to pass a multiple value parameter to SQL Command?

    Hi,
    I created a SQL Command with parameter.  But, I need the parameter to be set as multiple value.  After creating the SQL Command and it's parameter under the Database Expert, I went to Field Explorer --->  Parameter Fields and found the parameter that I had created for the SQL Command.  But when I wanted to edit the parameter to make it a multiple value parameter, the multiple value option was fix grayed as single parameter and I couldn't change it to multiple parameter.  Is there any way that I can set a parameter that is attached to SQL Command as multiple value rather than single value?  Thanks.
    Cheers,
    Al

    Al,
    That's a feature that, apparently, is only available in CR 2008.  If you are using CR 2008, use this link to see how to do it.
    [https://boc.sdn.sap.com/node/19268]
    Cheers,
    Jason

  • Multiple values for Commodity Code/Import code number for  Foreign Trade

    Hi  Experts,
    Is it possible to enter the multiple values for Commodity Code/Import code number for  Foreign Trade field for plant/country specific data in transaction MM02 using any BADI/User Exit ?  If yes, suggest the name of the BADI/User Exit
    Thanks,
    Narayan

    how can one material in one plant have 2 commodity codes? This is not logical.

  • SSRS passing multiple values parameter

    Hi ,
    I have a multi select parameter that get values from a query in my SSRS report. The report works fine if i select a single value in drop down list. When trying to select All or select a multiple value i got an error. Any help is very much appreciated.
    thank you.
    By the way, i'm using Query type text not an stored procedure.
    Data in my @LineID parameter drop down list
    Select All
    Line1
    Line2
    Line3
    up to Line15
    I tried this approach and its not working. In dataset properties under parameter value expression, i made this approach
    =Join(parameter!Lineid.value,",") or =parameter!Lineid.value
    My Query:
    Select * from sample
    Where pt.Asuprodlineid IN (@LineID)

    1) You don't need to use JOIN in rdl pass simply "=parameter!Lineid.value". 
    2) And modify your query with below mentioned.
    select * from sample where pt.Asuprodlineid (SELECT WG.Param FROM fn_MVParam(@LineID) WG).
    It works for me.

  • Displaying All Values from a Multiple Value Parameter

    Hi,
    Using XI, I have a parameter field that allows the user to enter multiple values Eg. 01, 02, 13, 14.  I want to create a formula to display all the values the user has selected. 
    Is there a way to do this? 
    Thanks,
    Brian

    join({?Parameter},",")
    creates a string with the items in your parameter separated by commas

  • Enhancing standard (single select)search help for Multiple value selection

    Hi,
    Standard search help for Business Partner (in cProjects) allows only single value selection for input fields. I want to make this multiple selection.
    Is there a way to do it.
    I used an OVS and built a similar search but its difficult to get the standard options like saving to personal value list etc in it.
    It would be good if there is a way to modify the standard search help to allow multiple selection. Any ideas??
    Appreciate your help,
    Thanks,
    Sri
    Edited by: Sri on Sep 9, 2010 8:50 PM
    Edited by: Sri on Sep 9, 2010 8:52 PM

    As far as I know you can't make a standard ABAP dictionary search help return multiple entries - where you get this sort of functionality the searches don't use the standard Elementary search help framework (e.g. organisational structure searches)
    Given that the WDA search help relies on these dictionary based searches, I'd think very much that you couldn't enhance it to return multiple. how you could even return multiple entries into a single UI element input field is also confusing to me.
    I'd suggest creating a freely programmed value help, it would certainly take quite some effort to recreate those personal value lists etc, but it could be done - I don't like OVS, but that just me.

  • Can I use multiple values for a rollup key on the same Endeca record?

    We have a business need to to aggregate our records using different criteria, based on user navigation. We are thinking of using a rollup key with multiple values to help with the aggregation, but we are running into some issues.
    Here is a made-up xample of what we want to do: assume we have a group of products and these products can be organized into groups using parent-child relationships. We would like to create an aggregate record for each parent, and we want the aggregate record for each parent to include all the children for the parent. To achieve this, we use a field called "parent_rec_spec" that holds the parent record spec and we set the same value on the field for the parent and its children. When we do rollup using the parent_rec_spec as the rollup key, we are able to see one aggregate record for each parent (with its children).
    The previous setup worked perfectly for us so far. But now we are getting a business requirement that allows children nodes to be linked to multiple parents at the same time. We were hoping of using another dimension to limit the records based on user roles/characteristics , so that only applicable parents/children are displayed (for example, we can use "market" as an additional filtering property, and we decide to show all parents/children for "North America", while hiding the parents/children for other markets).
    This caused an odd behavior when children are linked to multiple parents. For example, assume that SKUs A and B were linked to parents in "North America" and "Europe" at the same time, and assume that the user chose the "North America" market. The navigation state would eliminate the parents/children that are no in North America, and will also cause the parents/children that are labeled for North America to show up and be aggregated correctly. This however will lead to the creation of additional aggregate records for the A and B using the parent_rec_spec values that would have linked them to the Europe parents (even though the parents are hidden away).
    Here is an example index file that we used to load the test data:
    Update||1
    Market||North America
    Record Type||Product
    Name||Parent 1
    rec_spec||P1
    parent_rec_spec||P1
    EOR
    Update||1
    Market||Europe
    Record Type||Product
    Name||Parent 2
    rec_spec||P2
    parent_rec_spec||P2
    EOR
    Update||1
    Market||North America
    Record Type||Product
    Name||Child A
    rec_spec||A
    parent_rec_spec||P1
    EOR
    Update||1
    Market||North America
    Market||Europe
    Record Type||Product
    Name||Child B
    rec_spec||B
    parent_rec_spec||P1
    parent_rec_spec||P2
    EOR
    Update||1
    Market||North America
    Market||Europe
    Record Type||Product
    Name||Child C
    rec_spec||C
    parent_rec_spec||P1
    parent_rec_spec||P2
    EOR
    Update||1
    Market||Europe
    Record Type||Product
    Name||Child D
    rec_spec||D
    parent_rec_spec||P2
    EOR
    In this setup, we have parent P1 marked for North America with children A, B and C, and parent P2 marked for Europe with B, C and D as children. When we use North America as a filter in the navigation state, and parent_rec_spec as the rollup key, then we will see an aggregate record for P1, A, B and C. But we will also see an aggregate record for B and C by itself (presumably because of the other parent_rec_spec value on these records).
    The actual data that we are testing with is more complicated, but the end result is similar. We also noticed that the additional aggregate records would not be created always, depending on the ordering of the records.
    The question that I need help with is this: is there a way to fine tune the rollup logic so that it can only include certain records (in the example above, we can change the rec_spec from PA and PB to PA_North_America and PB_Europe and then we would be interested in rolling up using values that end with NorthAmerica).
    By the way, we considered using separate rollup keys for each context (like parent_rec_spec_north_america and parent_rec_spec_europe), but the number of contexts is dynamic, and might grow large. So it is not easy for us to create the additional properties on the fly, and we are concerned about the possible large number of dimensions.

    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=2&threadid=1157850

  • Display Blank Tablix when using multi value parameter in SSRS 2008 R2

    I have a main report which contains tablix1 and tablix2. Tablix1 is using DataSet1 and Tablix2 is using DataSet2. I have a multi value parameter set up with 71 items to choose from. My company owns 71 convenience stores and what I am doing is comparing sales
    for a hard coded date in DataSet1 versus a hard coded date in DataSet2, sales for the same date 1 year ago. Pretty simple, works great when both datasets return data. However, we have a store that we opened up about 4 months ago. The data is displayed
    in Tablix1, but since the store did not exist 1 year ago, there is no data for Tablix2. I have tried the "No Row Message" and Repeating Column and Row Headers, etc. When I choose all stores that existed last year, the report runs great. When I choose
    a store that existed last year and our new store (#39) that did not, the report messes up. The below image, you can see Tablix1 is good, but Tablix2 should be blank and only show the column headers. Instead it moved Store #40's Tablix1 beside it. If I
    run the report and just select store #39, Tablix1 runs as it should and Tablix2 shows The column headers and a blank row. It disappears as soon as I select multiple values.
    When you click the next page button, you will see Store 40's Tablix2 where it's Tablix1 should be and then a blank space where Tablix2 should be.

    Hi BassMan75,
    According to your description, there is a main report with subreport, since the store did not exist one year ago, there is no data for the subreport. You want to show tablix grid even through there is no data in subreport, right?
    Report data comes from datasets, if there is no corresponding value in the dataset, only column headers will be displayed in the report, we could not set the rows to blank, so we can’t achieve your goal directly. As a workaround, we can put one text box
    in the report with the message: No data for the store. In this way, if there is no data meets search condition, the message will be displayed in the report. Please refer to the following steps:
    Click and select the tablix.
    In Properties window, in No Rows section, in NoRowsMessage text box, type No data for the store.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Using multiple value presentation variable in a formula

    I am using 11.1.1.5 version of OBIEE. I have a dashboard prompt that contains a value for a list of departments. I want the user to select multiple values. I am pushing these values into a presentation variable called deptname. I know would the multiple values in a formula. I want to do a filter using a statement like this. I don't get an error. It works for one value but not for many. I have tried to use it with an in clause but can't seem to get that to work either. Formula is below. I have also been playing around with quotes since these are strings. Any help is appreciated. I only want the value in the formula filtered not the whole report which is why I am doing it this way. The below works for one value. Returns blank for more than one value.
    FILTER( "Fact Class Enrollment"."Units Taken") USING "Academic Organization"."Academic Organization Level 5 Desc" = '@{deptname}{Sociology}' )

    Michael Nichols wrote:
    I am using 11.1.1.5 version of OBIEE. I have a dashboard prompt that contains a value for a list of departments. I want the user to select multiple values. I am pushing these values into a presentation variable called deptname. I know would the multiple values in a formula. I want to do a filter using a statement like this. I don't get an error. It works for one value but not for many. I have tried to use it with an in clause but can't seem to get that to work either. Formula is below. I have also been playing around with quotes since these are strings. Any help is appreciated. I only want the value in the formula filtered not the whole report which is why I am doing it this way. The below works for one value. Returns blank for more than one value.
    FILTER( "Fact Class Enrollment"."Units Taken") USING "Academic Organization"."Academic Organization Level 5 Desc" = '@{deptname}{Sociology}' )I don't have 11g so this is a shot in the dark. Try something like this:
    FILTER( "Fact Class Enrollment"."Units Taken") USING "Academic Organization"."Academic Organization Level 5 Desc" IN ('@{deptname}{Sociology}'))

  • Using multiple values in a where clause, for values only known at runtime

    Dear all
    I am creating a PL/SQL program which returns multiple rows of data but only where it meets a set id values that a user has previously chosen. The id values are stored in an associative array and are chosen by a user in the preceding procedure at run time.
    I know all the table and column names in advance. The only things I don't know are the exact number of ids selected from the id column and what their values will be. This will only be known at runtime. When the procedure is run by the user it prints multiple rows of data to a web browser.
    I have been reading the following posting, which I understand to a large extent, Query for multiple value search But I cannot seem to figure out how I would apply it to my work as I am dealing with multiple rows and a cursor.
    The code as I have currently written it is wrong because I get an error not found message in my web browser. I think the var_user_chosen_map_list_ids in the for cursor loop could be the problem. I am using the variable_user_chosen_map_list_ids to store all the id values from my associatative array as a string. Which I modified from the code that vidyadhars posted in the other thread.
    Should I be creating a OPEN FOR ref cursor and if so where would I put my associative array into it? At the moment I take the value, turning it into a string and IN part in the WHERE clause holds the string, allowing the WHERE clause to read all the values from it. I would expect the where clause to read everything in the string as 1 complete string of VARCHAR2 data but this would not be the case if this part of the code at least was correct. The code is as follows:
    --Global variable section contains:
    var_user_chosen_map_list_ids VARCHAR2(32767);
    PROCEDURE PROCMAPSEARCH (par_user_chosen_map_list_ids PKG_ARR_MAPS.ARR_MAP_LIST)
    IS
    CURSOR cur_map_search (par_user_chosen_map_list_ids IN NUMBER)
    IS
    SELECT MI.map_date
           MT.map_title,
    FROM map_info MI,
         map_title MT,
    WHERE MI.map_title_id = MT.map_title_id
    AND MI.map_publication_id IN
    (var_user_chosen_map_list_ids);
    var_map_list_to_compare VARCHAR2(32767) := '';
    var_exe_imm_map VARCHAR2(32767);
    BEGIN
    FOR rec_user_chosen_map_list_ids IN 1 .. par_user_chosen_map_list_ids.count
    LOOP
       var_user_chosen_map_list_ids := var_user_chosen_map_list_ids ||
       '''' ||
       par_user_chosen_map_list_ids(rec_user_chosen_map_list_ids) ||
    END LOOP;
    var_user_chosen_map_list_ids := substr(var_user_chosen_map_list_ids,
                                            1,
                                            length(var_user_chosen_map_list_ids)-1);
    var_exe_imm_map := 'FOR rec_search_entered_details IN cur_map_search
    LOOP
    htp.print('Map date: ' || cur_map_search.map_date || ' Map title: ' || cur_map_search.map_title)
    END LOOP;';
    END PROCMAPSEARCH;EXECUTE IMMEDIATE var_exe_imm_map;
    I would be grateful of any comments or advice.
    Kind regards
    Tim

    I would like to thank everyone for their kind help.
    I have now successfully converted my code for use with dynamic SQL. Part of my problem was getting the concept confused a little, especially as I could get everything work in a static cursor, including variables, as long as they did not contain multiple values. I have learnt that dynamic sql runs the complete select statement at runtime. However even with this I was getting concepts confused. For example I was including variables and the terminator; inside my select string, where as these should be outside it. For example the following is wrong:
         TABLE (sys.dbms_debug_vc2coll(par_user_chosen_map_list_ids))....
    AND MI.map_publication_id = column_value;';Where as the following is correct:
         TABLE (sys.dbms_debug_vc2coll('||par_user_chosen_map_list_ids||'))....
    AND MI.map_publication_id = column_value';PL/SQL is inserting the values and then running the select statement, as opposed to running the select statement with the variables and then accessing the values stored in those variables. Once I resolved that it worked. My revised code is as follows:
    --Global variable section contains:
    var_user_chosen_map_list_ids VARCHAR2(32767);
    var_details VARCHAR(32767);
    PROCEDURE PROCMAPSEARCH (par_user_chosen_map_list_ids PKG_ARR_MAPS.ARR_MAP_LIST)
    IS
    BEGIN
    FOR rec_user_chosen_map_list_ids IN 1 .. par_user_chosen_map_list_ids.count
    LOOP
       var_user_chosen_map_list_ids := var_user_chosen_map_list_ids ||
       '''' ||
       par_user_chosen_map_list_ids(rec_user_chosen_map_list_ids) ||
    END LOOP;
    var_user_chosen_map_list_ids := substr(var_user_chosen_map_list_ids,
                                            1,
                                            length(var_user_chosen_map_list_ids)-1);
    var_details := FUNCMAPDATAFIND (var_user_chosen_map_list_ids);
    htp.print(var_details);
    END PROCMAPSEARCH;
    FUNCTION FUNCMAPDETAILS (par_user_chosen_map_list_ids IN VARCHAR2(32767)
    RETURN VARCHAR2
    AS
    TYPE cur_type_map_search IS REF CURSOR;
    cur_map_search cur_type_map_search;
    var_map_date NUMBER(4);
    var_map_title VARCHAR2(32767);
    begin:
    OPEN cur_map_search FOR
    'SELECT MI.map_date,
           MT.map_title
    FROM map_info MI,
         map_title MT,
         TABLE (sys.dbms_debug_vc2coll(' || par_user_chosen_map_list_ids || '))
    WHERE MI.map_title_id = MT.map_title_id
    AND MI.map_publication_id = column_value';
    LOOP
    FETCH cur_map_compare INTO
    var_map_date,
    var_map_title;
    var_details := var_details || 'Map date: '||
                        var_map_date ||
                        'Map title: ' ||
                        var_map_title;
    EXIT WHEN cur_map_compare%NOTFOUND;
    END LOOP;
    RETURN var_details;
    END FUNCMAPDETAILS;Kind regards
    Tim

  • Help using multiple iphones and ipods on itunes

    Okay, is there any simple way to use multiple apple products thru itunes. I can log in on my account and sync my iphone/ipod, then I log out and log back in with my daughter's account info. I plug her itouch in and it wants to read all of my apps(some apps we both have on our devices). Have problems with music sharing as well. Still a PC user. Get very frustrated with itunes. spend way too much time trying to do things that should be simple. please help! Thank you!

    Are you using method 1 with different windows user accounts?
    http://support.apple.com/kb/HT1495
    Sounds like you are currently using method 2 and not happy with it.

  • Multiple values Parameter field Display

    I created a Parameter field that allows multiple values.
    When I put this field en the report (to display in the report the parameters selection) I only see the first value.
    How Can I do to display all the values of the Parameter field that the user chose ?
    Thanks,
    Gabriel

    If the parameter is of type string then create a formula with:
    join({?Your Parameter},", ");
    Display this formula instead of the parameter.  It will display all chosen values separated by a comma.

  • Search Help and Multiple Value Selection?

    Hello
    Is it possible to select more than one entry in a search help popup? If so, what do I have to do in the context attribute to be able to handle multiple return values from the search help popup?
    Regards,
      Mathias

    hi matthias.....
           you cannot select multiple lines in a search help. because... you are going to return to only one field... else what you can do is. have a small button which acts as a search help and pop up a window which has  a table in it. so you can select multiple values.
    ---regards,
       alex b justin

  • How to use multiple values in an IF condition in RTF

    Hi,
    I have a scenario as mentioned below.
    IF column value in ('A','B')
    display C;
    end if
    IF column value not in ('A','B')
    display D;
    end if
    My query is how to provide multiple values in an IF condition.?
    Thanks,
    Anand

    But suppose "x.jar" needs a library from "y.jar". How do you put another JAR on the classpath of an applet in a Web page?
    <applet code="z.class" archive="a.jar,b.jar,c.jar">

  • I need help using multiple content types in a wiki page library

    I currently trying to used multiple custom content types based off of the wiki page content type in one wiki page library. 
    EDIT: "Allow management of content types" has been enabled with the designer
    The way i would like this library to work is:
    Click the "Files" tab in the ribbon
    Click the "New Document" drop down menu
    Select one of the content types (Client, Contact, Project)
    SharePoint Will Ask for the Page Name and content type fields
    Click create
    Then it will take you to the new created page.
    This issue I'm currently having is when i click on one of the options (Client, Contact, Project) it will ask for a page name then you have to check it in to get to the edit form. The edit form it then loads is the default content type and not the selected
    content type.
    So my questions are.
    Is there any way i can combine the page name and edit steps together into one step?
    How can I get the edit form to pull from the selected content type?
    Thanks in advanced
    James T.F

    Wiki library isn't really designed for customizations... it's a "special" library that overrides a lot of default behavior... similar evidence can be found if you're trying to add metadata columns to wiki pages... they're just not really designed to handle
    it very well.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

Maybe you are looking for

  • Upload a file in KM repository with Web dynpro for abap

    Hi gurus, i´m trying to create a KM repository and then upload a file into this repository with Web dynpro for abap , but i can´t find any info. Can anyone help me with this problem, i have to solve it ASAP... Thanks for all.... Regards, Diego.

  • IPod Classic "Verifying" Makes Itunes freeze

    Well since the itunes 9 update or whatever whenever i plug in the USB cord to my ipod (not just mine I've tried all my friends) my itunes freezes up; but when i unplug the USB coord from the ipod itunes stops freezing and runs normally. So i cant eve

  • Url/link with an anchor

    Hallo, I have too pages. page 1 has a link to page 2 - page 2 has a lof of html text. I wan't to jump from page 1 to a spezial html point to page 2. I don't no the word in english - in german it ist an anchor. here my code: page 1 - region source: In

  • Negative stock and Stock below safety stock

    Hi, Both negative stock and stock below safety stock create procurement proposals - internal or external. But what is the difference between them? Thanks in advance.

  • Sync PC desktop manager to blackberry torch

    What does this error messgae mean? Error encountered. Error code - 0x8004fd28. Check documentation. How do I fix this error?