IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

how to get a field content inside - jsp page

  • 1.  how to get a field content inside - jsp page

    Posted Sun August 17, 2008 06:14 PM

    hi

    how can i get a field content inside “jsp page”

    An exaple from old framework

    “”

    how it’s work now ??

    thank you

    Gideon


    #Mainframe-Integration
    #ApplinX
    #webMethods


  • 2.  RE: how to get a field content inside - jsp page

    Posted Mon August 18, 2008 09:16 AM

    Hi Gidon,
    You are talking about the methodology of the old JSP framework but now Applinx is working differently.
    The methodology of the new JSP framework is to get the screen properties like field content in the code behind (java class) and to bind the value with the JSP side.
    If you like to do some logic against the field content like display or remove some area in the JSP page, you should wrap the area with


    #ApplinX
    #Mainframe-Integration
    #webMethods


  • 3.  RE: how to get a field content inside - jsp page

    Posted Mon August 18, 2008 10:35 AM


  • 4.  RE: how to get a field content inside - jsp page

    Posted Mon November 28, 2011 01:13 PM

    hi,

    sorry to dig up this topic, but i can’t find the best way to retreive in my jsp data coming from the back ground screen.

    i found something, but i don’t know if it’s a good way.

    in the java class associated with the jsp (gx_onInit() method) i put a link to “GXScreenBasedJspContext.getGXForm()” into request attribute.
    getRequest().setAttribute(“GXForm”, getGXForm());

    in the jsp i declare
    <%!
    public String gxField(GXScreenBasedJspContext gxForm, String field) {
    String fieldValue=null;
    try {
    fieldValue=gxForm.getAppFieldContent(field);
    } catch (com.sabratec.applinx.baseobject.GXGeneralException e) {
    }
    return (fieldValue==null)?“”:fieldValue;
    }
    %>
    <% GXScreenBasedJspContext gx=(GXScreenBasedJspContext)request.getAttribute(“GXForm”); %>

    then i do <%=gxField(gx,“EMAIL”)%> to have the email data which was previously identified in the background screen

    Is there a problem when doing do
    Is there a better way to do that ?
    You spoke about methodology for old JSP framework… Which is the new methodology ?

    thanks for your help


    #ApplinX
    #Mainframe-Integration
    #webMethods


  • 5.  RE: how to get a field content inside - jsp page

    Posted Tue November 29, 2011 07:48 AM

    Hi Pascal,

    The new methodology is having all you server-side (JAVA) code in the java class associated with the JSP file.

    In addition, host screen data can be easily retrieved by defining the field in the screen entity and then on the JSP Page placing either a gx:span... or gx:input... with an ID attribute value that is exactly the same as the name of the field in the Screen entity.

    example: <gx:span id=“Email”></gx:span>

    When the host gets to this particular screen (lets call it screenX) the web application will automatically load screenX.jsp and fill it the SPAN with the appropriate host content.

    Hope this helps,
    regards,
    Ohad


    #ApplinX
    #webMethods
    #Mainframe-Integration


  • 6.  RE: how to get a field content inside - jsp page

    Posted Tue November 29, 2011 08:05 AM

    Hi Ohad M.,

    Thanks for your respons.

    In fact, i want a link to the email, so i do this:

    <a href=“mailto:<%=gxField(gx,“EMAIL”)%>”>
    <gx:span id=“EMAIL” cssClass=“gx_uf”></gx:span>

    Method “gxField” explained previously.

    Is there a beter way to do that ? It should be great to have a tag that could do that.

    best regards


    #Mainframe-Integration
    #webMethods
    #ApplinX