Netui Form Tag Missing DOM Name Attribute

Without a way to specify the HTML name or DOM id of the form, you cannot access
the form in JavaScript. Both tag attributes (name, id) are already used for something
totally unrelated. Is this going to be fixed in the next service pack?
Thanks,
Troy

Vindhyachal,
You didn't include your checkbox tag code but I expect that you may not be
binding to the correct value which would be something like
"actionForm.checkBoxValue. I have attached code to an example that you can
play with. Remember that in page flows the form is scoped to request by
default.
If you are using 8.1 sp2 you should consider using page flow scoped forms if
you need to keep the form and its values around for more than a single
request.
I hope this example helps you.
- john
"vindhyachal" <[email protected]> wrote in message
news:4044a5e1$[email protected]..
>
Hi,
Iam first time using BEAPortal8.1,my probleum is i have a form inthat iam
using
<netui:form name="sri" scope="request or session" method="get"action="addUpdateRoleAction"
type="mytest.mytestController$FormAction" > this will call followingaction on
controller
* @jpf:action
* @jpf:forward name="success" path="index.jsp"
protected Forward addUpdateRoleAction(FormAction form)
try{
session = getRequest().getSession(false);
System.out.println("Value of check box "+form.adminrole);
System.out.println("Value of check box beforeFWD"+form.getAdminrole());
>
>
>
>
}catch(Exception e)
e.printStackTrace();
form.setAdminrole(true);
return new Forward( "success", form );
In this iam setting the value of adminrole to true but when the requestis forward
to index JSP value its displaying is false.So can u please tell me how tohandle
this probleum.If iam not using name,scope and type atrribute od<netui:form> then
its working fine.
Thanks[Controller.jpf]
[index.jsp]

Similar Messages

  • Netui form tag - onLoad

    How can I execute some javascript when the jsp loads. Basically something like
    what the onLoad would do?
    -Joe

    Vindhyachal,
    You didn't include your checkbox tag code but I expect that you may not be
    binding to the correct value which would be something like
    "actionForm.checkBoxValue. I have attached code to an example that you can
    play with. Remember that in page flows the form is scoped to request by
    default.
    If you are using 8.1 sp2 you should consider using page flow scoped forms if
    you need to keep the form and its values around for more than a single
    request.
    I hope this example helps you.
    - john
    "vindhyachal" <[email protected]> wrote in message
    news:4044a5e1$[email protected]..
    >
    Hi,
    Iam first time using BEAPortal8.1,my probleum is i have a form inthat iam
    using
    <netui:form name="sri" scope="request or session" method="get"action="addUpdateRoleAction"
    type="mytest.mytestController$FormAction" > this will call followingaction on
    controller
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    protected Forward addUpdateRoleAction(FormAction form)
    try{
    session = getRequest().getSession(false);
    System.out.println("Value of check box "+form.adminrole);
    System.out.println("Value of check box beforeFWD"+form.getAdminrole());
    >
    >
    >
    >
    }catch(Exception e)
    e.printStackTrace();
    form.setAdminrole(true);
    return new Forward( "success", form );
    In this iam setting the value of adminrole to true but when the requestis forward
    to index JSP value its displaying is false.So can u please tell me how tohandle
    this probleum.If iam not using name,scope and type atrribute od<netui:form> then
    its working fine.
    Thanks[Controller.jpf]
    [index.jsp]

  • Form bean with int property and netui:select tag

    Hi,
    I've recently started using WebLogic 8.1 for a client project. There's
    been a bit of a learning curve, but I've been able to find most of my
    answers in the docs or on the dev2dev site. This one, though, I've been
    unable to manage.
    I have a database table, call it foo. In it I have columns for id
    (numeric) and name (string). I created a database control to read that
    data:
    select id, name
    from foo
    I then want to use this data to populate a select list in a form, which
    is going to be used to submit new records for another table. For the data:
    id     name
    1     Foo
    2     Bar
    3     Bletch
    I want to generate a select list (this is the output HTML, not the netui
    tags):
    <select name="foo">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Bletch</option>
    </select>
    My first question is what the best way to do this is. I was able to get
    this working by creating a database control, which returns an array of a
    custom Foo class. I then pass that array into a utility method which
    converts it into a Map, and pass that map to the netui:select tag in the
    optionDataSource attribute. This works, but it seems rather roundabout,
    so I'm wondering if there's a better way to do it, without needing the
    conversion utility method in the middle. I tried playing around with
    the control, I tried using different netui tags (I thought I could do it
    with a repeater and netui:selectOption tags, but that didn't work), and
    nothing else worked.
    The second problem arose when I was tying the result to a Form Bean. I
    created a bean with all the data that I was reading from the form, and
    at first, I just made everything in the form bean be a String. For this
    select, though, the values are ids, so I thought I'd just make them be
    ints in the form bean instead. However, when I did that, WL decided
    that it wanted to add in a default option with a value of 0:
    <select name="foo">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Bletch</option>
    <option value="0" selected>0</option>
    </select>
    I've tried to find a way to get rid of that 0, and I can't. Is there a
    way to prevent it from sticking in a default value like that? Or do I
    have to just leave it as a String in the form bean to get it to work the
    way I want?
    Thanks in advance for your help.
    Joe Robins                    Tel: 212-918-5057
    Thaumaturgix, Inc.               Fax: 212-918-5001
    19 W. 44th St., Suite 810          Email: [email protected]
    New York, NY 10036               http://www.tgix.com
    thau'ma-tur-gy, n. the working of miracles.

    wrt your 2nd problem, in the jpf, for the form bean, are you declaring your id
    like this:
    private int id;
    if so, try declaring it w/ a valid value, like:
    private int id = 1;
    -tanya
    Joe Robins <[email protected]> wrote:
    Hi,
    I've recently started using WebLogic 8.1 for a client project. There's
    been a bit of a learning curve, but I've been able to find most of my
    answers in the docs or on the dev2dev site. This one, though, I've been
    unable to manage.
    I have a database table, call it foo. In it I have columns for id
    (numeric) and name (string). I created a database control to read that
    data:
    select id, name
    from foo
    I then want to use this data to populate a select list in a form, which
    is going to be used to submit new records for another table. For the
    data:
    id     name
    1     Foo
    2     Bar
    3     Bletch
    I want to generate a select list (this is the output HTML, not the netui
    tags):
    <select name="foo">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Bletch</option>
    </select>
    My first question is what the best way to do this is. I was able to
    get
    this working by creating a database control, which returns an array of
    a
    custom Foo class. I then pass that array into a utility method which
    converts it into a Map, and pass that map to the netui:select tag in
    the
    optionDataSource attribute. This works, but it seems rather roundabout,
    so I'm wondering if there's a better way to do it, without needing the
    conversion utility method in the middle. I tried playing around with
    the control, I tried using different netui tags (I thought I could do
    it
    with a repeater and netui:selectOption tags, but that didn't work), and
    nothing else worked.
    The second problem arose when I was tying the result to a Form Bean.
    I
    created a bean with all the data that I was reading from the form, and
    at first, I just made everything in the form bean be a String. For this
    select, though, the values are ids, so I thought I'd just make them be
    ints in the form bean instead. However, when I did that, WL decided
    that it wanted to add in a default option with a value of 0:
    <select name="foo">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Bletch</option>
    <option value="0" selected>0</option>
    </select>
    I've tried to find a way to get rid of that 0, and I can't. Is there
    a
    way to prevent it from sticking in a default value like that? Or do
    I
    have to just leave it as a String in the form bean to get it to work
    the
    way I want?
    Thanks in advance for your help.
    Joe Robins                    Tel: 212-918-5057
    Thaumaturgix, Inc.               Fax: 212-918-5001
    19 W. 44th St., Suite 810          Email: [email protected]
    New York, NY 10036               http://www.tgix.com
    thau'ma-tur-gy, n. the working of miracles.

  • Netui:form in edit mode

    Hi,
    I am trying to use netui:form in the JSP of the edit mode like this :
    <netui:form action="testAction">
         <netui:button value="Valider" type="submit"/>
         <netui:button value="Annuler" type="reset"/>
    </netui:form>
    but I always get the following error : Action 'testAction' is not a valid action
    If I try to use netui:form tag in another JSP (not in the edit mode, for example the JSP displayed after the begin action), it works fine.
    And it works fine in the edit mode with a netui:anchor tag. The action specified is called.
    Here is the PageFlow Controller :
    @Jpf.Controller()
    public class favorisController extends PageFlowController {
         @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "/site_unisvers/favoris/favoris.jsp") })
         public Forward testAction(TestActionFormBean form) {
              System.out.println("je suis testAction");
              System.out.println(form.getTextBox());
              Forward forward = new Forward("success");
              return forward;
    Here is the portlet xml file :
    <?xml version="1.0" encoding="UTF-8"?>
    <portal:root xmlns:netuix="http://www.bea.com/servers/netuix/xsd/controls/netuix/1.0.0"
    xmlns:portal="http://www.bea.com/servers/netuix/xsd/portal/support/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/servers/netuix/xsd/portal/support/1.0.0 portal-support-1_0_0.xsd">
    <netuix:portlet definitionLabel="favoris" title="Favoris">
    <netuix:titlebar>
    <netuix:maximize/>
    <netuix:minimize/>
    <netuix:help contentUri="/site_unisvers/favoris/help.jsp"/>
    <netuix:edit contentUri="/fr/su/unv/unisvers/ihm/favorisController.jpf" action="edit"/>
    </netuix:titlebar>
    <netuix:content>
    <netuix:pageflowContent contentUri="/fr/su/unv/unisvers/ihm/favorisController.jpf"/>
    </netuix:content>
    </netuix:portlet>
    </portal:root>
    Anybody can help me ?

    My code works fine. WebLogic just didn't update well the config files.
    Thomas

  • Netui:fileUpload tag and unicode

    when i attach files using netui:fileUpload tag, korean file names are broken.
    charset of my jsp page is UTF-8.
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    chinese and japanese can be used, so default charset can not be changed to EUC-KR.
    but other data of netui:textBox or netui:select are normal.
    and when using normal html tag(<input type="file">), that file name is normal.
    how can i solve this problem..?
    in advance, thanks~

    when i attach files using netui:fileUpload tag, korean file names are broken.
    charset of my jsp page is UTF-8.
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    chinese and japanese can be used, so default charset can not be changed to EUC-KR.
    but other data of netui:textBox or netui:select are normal.
    and when using normal html tag(<input type="file">), that file name is normal.
    how can i solve this problem..?
    in advance, thanks~

  • Name attribute not giving the desired result in form tag

    Hi,
    I am using struts and the name attribute in form tag is not giving me the desired reuslt. The code is
    <html:form name="loginActionForm" type="source.form.LoginActionForm" action="/login.do" method="post">
    </html:form>
    when I am trying to use the name in javascript then I am getting an error
    "document.loginActionForm " is null or not an object.Where am I going wrong?

    I did so but the name I have used in the form tag is the same as what i have used in javascript.I dont think that it is a javascript error and it must be some mistake I made in the form tag.Also one more thing is it necessary to use the type attribute if you use the name attribute.

  • Netui: anchor tag with target attribute.

    I am using the netui:anchor tag inside an iframe to post to an action. But the
    resulting page is displayed within the iframe. Will the target attribute of the
    netui:anchor tag help solve the problem. What is a valid value of the target
    attribute.
    thanks,
    Shankar

    does the action have a formSubmit = true? If not then your modal dialog should be shown via the onclick and you have to javascript the link click (based on your modal dialog options)
    If you do have a formSubmit=true, then you'd have the onclick show the modal dialog and you would have to write additional javascript to submit the form (Along with setting its action)
    regards
    deepak

  • Error in form submit through netui:anchor tag onClick event

    Hello,
    I am working on a portal application. Below is my jsp code of a simple search screen. The search parameter is customername.
    <netui:form action="searchCustomer" style="form" tagId="myForm">
    <netui:textBox dataSource="{actionForm.customerName}"></netui:textBox>
    <netui:anchor onClick="sayHello(); return false;" styleClass="button" action="searchCustomer" formSubmit="true"> Search</netui:anchor>
    </netui:form>
    I have an onClick event as I want to implement some customer logic on click of the anchor tag.
    function sayHello(){
    // customer implementation here
    document.forms[getNetuiTagName("myForm",this)].method="POST";
    document.forms[getNetuiTagName("myForm",this)].action="/searchCustomer.do";
    document.forms[getNetuiTagName("myForm",this)].submit();
    In the searchCustomer method of the controller, the form has zero parameters. The customerName has null value.
    Can anyone tell me what am I doing wrong here.
    Any help is appreciated.
    Thanks
    Manju

    I also want to add a confirm() dialog before submitting. However, setting the onClick handler overrides the one generated when formSubmit="true". I worked around this by calling the generated function directly:
    <... onClick="if (confirm('[msg]')) { anchor_submit_form(getNetuiTagName('[formName]'), this.href) } return false;">
    Where [msg] is the message to display and [formName] is the name of the form containing the anchor.
    Hope this helps someone.

  • Netui anchor tag in netui:form

    I have some code like following:
    <netui:form action="action1" >
    <netui:anchor action="action2">Check</netui:anchor>
    </netui:form>
    Action1 and action2 willl be finally redirected to the same JSP(for example one.jsp).
    The weird thing is that: according to log output, it seems that one.jsp has been hit twice when user click "check" link.
    Is it possible that when user click "check" link, weblogic not only trigger action2 but also trigger action1? forsubmit attribute is not set to true explicitly for netui:anchor tag.
    Thanks in advance

    hi
    verify from a browser trace tool (e.g. livehttpheaders, fiddler or firebug) how many requests your browser is making. (or you can inspect the code that portal generates in the HTML). Once we have determined whether its the browser making the two requests or something on the server, we can see if there are workarounds.
    regards
    deepak

  • How to use form name in struts html:form tag

    Hi,
    I want to validate text box value, if it is ordinary html form I would have done like this <form name="myform" action="xxxx.jsp" onsubmit="return validate()">
    But am using struts html:form tags. In this case how can I use/specify name for a form.
    Can any one help me.
    Thanks

    The name of the form comes from the actionForm you have defined backing it.
    View source on the generated page to see what HTML it constructs.
    You are able to use the onsubmit event with the <html:form> tag just like the standard one, so if all you want to do is that:
    <html:form action="/saveUser" onsubmit="return validate()">
    ...You can also give it a styleId, which will generate an id in the HTML.
    See the tag documentation for details: http://struts.apache.org/1.2.x/userGuide/struts-html.html#form

  • Problem in onClick attribute of the netui:anchor tag

    Hi,
    I have a String object to be passed to the javascript function with onClick attribute.
    eg: <%String st = new String("helo");%>
    <netui:anchor action="display" onClick="display()">
    I want to pass the object st to the java script so that I can do some validations. how can I do that. If I say,
    onClick="display('<%=st%>')" it is not working. can you please suggest me a solution.
    Regards,
    Satish.

    I haven't tried this with the netui:anchor tag, but it works with the netui:button tag.
    <%
    String onCl = "display('" + st + "')";
    %>
    <netui:anchor action="display" onClick="<%=onCl%>">
    Apparently, you can place a scriptlet inside the onClick attribute, but you cannot intermingle the scriptlet with plain text.
    Also, the onclick attribute appears not to support XScript ({request.whatever}). I find that weird.

  • The "MIDlet-Name" attribute is missing."

    Jul 23
    This started yesterday when my app world was constantly freezing trying to download an app. I read online to simply delete and reinstall the app world.
    Upon deleting it and attempting to reinstall I got the error message "Error: Invalid manifest or application descriptor.
    The "MIDlet-Name" attribute is missing."
    I have no idea what this means. Trying to look into it, reading through other peoples scenerios, I saw something that I thought would've maybe worked. Downgrading to OS 7.0.
    I tried doing this via Desktop Manager to no avail. I then looked into wiping the OS from the device and reinstalling. Which didn't work either and almost bricked my phone.
    I'm now back at OS 7.1 and still without the Blackberry World receiving the same error message.
    I've tried battery pulls several times, soft resets, hard resets, everything I can think of.
    H E L P M E P L E A S E!!! I love my Blackberry, but this is driving me to switch to another device.

    Avoid posting multiple threads containing the same issue : http://supportforums.blackberry.com/t5/Downloaded-applications/The-quot-MIDlet-Name-quot-attribute-is-missing-quot/m-p/3119633

  • MIDlet-Name attribute is missing on bold9700

    i just reinstalled a new os on my bold9700, but there is always the message whenever i try to update any app or even install them on my device:   "Error: Invalid manifest or applicat descriptor."                                                   The "MIDlet-Name" attribute is missing i have tried every single trick and i'm in a jam right now can anyone help me resolve this issue. Thank you

    waleynazz wrote:
    Pls am also having the same problem....can anybody pls help me out....been distrub coz I love my 9930 so much.....pls pls plsHi and Welcome to the Community!
    With a strong carrier network signal (e.g., not merely WiFi), I suggest the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2 each should result in a message coming to your BB...please wait for that before proceeding to the next step):
    1) Register HRTKB00510 How to register a BlackBerry smartphone with the wireless networkPlease wait for one "registration" message to arrive to your Messages app2) Resend Service BooksKB02830 Send the service books for the BlackBerry Internet ServicePlease wait for "Activation" Messages, one per already configured email account, to arrive in your Messages. If you have no already configured email accounts, please wait 1 hour.3) RebootWith power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes.See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure.Hopefully that will get things going again for you! If not, then you should contact your mobile service provider for formal support.
    Good luck!

  • Helpp! The 'MIDlet-Name' attribute is missing

    i cant use my app world because i have to upgrade it but everytime i try it says
     'inavlid manifest or applicationdescriptor'
     The 'MIDlet-Name' attribute is missing
    i have a bb 9360 i just got it yesterday, what should i do? please help mee

    Options > Device > Applications, scroll to BlackBerry AppWorld and delete it.
    Do a simple reboot on the BlackBerry in this manner: With the BlackBerry device POWERED ON, remove the battery for a minute, and then reinsert the battery to reboot.
    Now, using your BlackBerry browser, go to www.blackberry.com/appworld and download AppWorld again. It will update your BlackBerryID as well.
    Login.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • MIDlet-name attribute missing

    Despite deleting appworld and bbm I tried to downloading them back on my curve9320 but it writes MIDlet-name attribute is missing. What can I do please help!

    Have you tried a security wipe of the device?
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

Maybe you are looking for