cant retrieve my parameter -- urlParam - Websphere

This is a discussion on cant retrieve my parameter -- urlParam - Websphere ; Hi all, i've been waisting a lot of time trying to understand why this code is not working.. Can somebody please help? In my banner.jspf <portal-logic:if loggedIn="yes" portletSolo="no"> <portal-navigation:urlGeneration contentNode="CC.CCTestPage" layoutNode="CC.myPortlet"> <portal-navigation:urlParam type="render" name="searchCriteria" value="test" /> <button class="button" onClick="ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: cant retrieve my parameter -- urlParam

  1. cant retrieve my parameter -- urlParam

    Hi all,
    i've been waisting a lot of time trying to understand why this code is not working..
    Can somebody please help?
    In my banner.jspf
    <portal-logic:if loggedIn="yes" portletSolo="no">
    <portal-navigation:urlGeneration contentNode="CC.CCTestPage" layoutNode="CC.myPortlet">
    <portal-navigation:urlParam type="render" name="searchCriteria" value="test" />

    <button class="button" onClick="ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', '<% wpsURL.write(out); %>', 'Ajax Win Title', 'width=650px,height=400px,left=300px,top=100px,res ize=0,scrolling=1'); return false">Go</button>
    </portal-navigation:urlGeneration>
    </portal-logic:if>


    in my faces portlet :
    if(portletRequest.getParameter("searchCriteria")!=null)
    System.out.println("The value from theme::"+portletRequest.getParameter("searchCriteria").toString());
    else
    System.out.println("nothing from the theme");

  2. Re: cant retrieve my parameter -- urlParam

    I used the helper to generate the URl , and when i open a new window :
    ServletURLGenerator
    i can retrieve the param ... but when i use my javascript fct : dhtmlwindow.open .... i cant retrieve my param.. is there a special way to pass URLs to js fcts .. ?

    Thanks

  3. Re: cant retrieve my parameter -- urlParam

    well when you use the helper the param is going to be passed encoded as part of the portlet params, if in your javascript tied to your portlet you can use the renderrequest to retrieve the param.



    Is the javascript in the theme or the portlet?





    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM


  4. Re: cant retrieve my parameter -- urlParam

    the javascript is in the theme ..

  5. Re: cant retrieve my parameter -- urlParam

    this is my js file

  6. Re: cant retrieve my parameter -- urlParam

    well a few things.


    1. if you are using the generator and targeting a specific portlet then the params will only be available to a specific portlet that is targetted.


    2. if you are targetting the page and not a portlet they should be available. But when just targeting a page you can go ahead and just add them as params onto the end of the url if you want and then you can see them in your theme.


    3. is this a case where you need the theme and the portlets to both be able to see the same param?


    Jim



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM


  7. Re: cant retrieve my parameter -- urlParam

    Hi, the param is sent from the theme to the portlet .. and my page contains only one portlet (the one im targeting)

  8. Re: cant retrieve my parameter -- urlParam

    well urls cannot be cached, are you holding onto it for more than one request cycle? can you show us what exact method you are using to generate the url?


    It should not matter how it is as long as the portlet is targetted it should work, can you put up an example that works and an exmaple that does not



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM


  9. Re: cant retrieve my parameter -- urlParam

    <%

    HashMap map = new HashMap();
    String[] value1 = {"testthisONE"};
    map.put("searchCriteria", value1);
    String URL = ServletURLGenerator.generateUrlStringServlet("CC.CCTestPage","CC.myportlet", map, request, response);

    %>

    CC.myportlet is the unique name i gave using xmlaccess.
    thanks

  10. Re: cant retrieve my parameter -- urlParam

    So above you state when you open a new window you can retrieve the param, but when you use the js code you cannot? is that correct


    What is different between them?

    If you want you can email me directly with the theme jsp, and the portlet and the xmlaccess and I can take a look. Please also provide the rendered html



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM


+ Reply to Thread