Infopath arraylist property

Hi, I want to create an ArrayList property in an Infopath form. When I try to add values to the property I get "The name 'xxxxx' does not exist in the current context". Any help please? thanks
PROPERTY
private ArrayList Xxxxx
get
ERROR >>> return xxxxx;
set
ERROR >>> xxxxx = value;
public void FormEvents_Loading(object sender, LoadingEventArgs e)
try
ArrayList xxxxx = new ArrayList();
METHOD
public void drpChantier_Changed(object sender, XmlEventArgs e)
try
string qstrReferenceForm = FormState["_qstrReferenceForm"].ToString();
Xxxxx.Add(qstrReferenceForm);

Hi,    
According to the code you provided, it seems that the
xxxxx is not declared before using in the Xxxxx accessors.
Here is a documentation about Accessors
for your reference:
http://msdn.microsoft.com/en-us/library/aa287786(v=vs.71).aspx
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • How to pass attribute of type java.util.ArrayList Property to a Tag

    How do I pass an attribute of type, java.util.ArrayList<my.entity.Property> to a Tag implementation class?
    Please advise!
    Thanks,
    Joe
    package my.tags;
    import java.io.IOException;
    import java.util.ArrayList;
    import javax.servlet.jsp.tagext.SimpleTagSupport;
    import javax.servlet.jsp.JspException;
    import my.entity.Property;
    public class PropertiesTag extends SimpleTagSupport {
        private ArrayList<Property> properties;
        public void setProperties(ArrayList<Property> properties) {
              this.properties = properties;
         public void doTag() throws JspException, IOException {
    <?xml version="1.0" encoding="utf-8" ?>
    <taglib ...>
         <tag>
              <name>propertiesTag</name>
              <tag-class>my.tags.PropertiesTag</tag-class>
              <body-content>empty</body-content>
              <description>Displays the product selection left menu</description>
              <attribute>
                   <name>properties</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
                   <type>java.util.ArrayList<my.entity.Property></type>
              </attribute>
         </tag>
    </taglib>Here's the error message:
    org.xml.sax.SAXParseException: The element type "my.entity.Property" must be terminated by the matching end-tag "</my.entity.Property>".

    802826 wrote:
    How do I pass an attribute of type, java.util.ArrayList<my.entity.Property> to a Tag implementation class?
    Please advise!
    As already pointed out, there is no way to specify a generic type in a tag library descriptor. You may however specify an Object type in your tld and still have the variable in your tag as a parameterized generic type.
    In your tld change the type to Object.
    <type>java.lang.Object</type>.
    The properties tag itself needs no change and can continue to use parameterized types.
    cheers,
    ram.

  • Please help me! Error setting property 'out' in bean of type null

    I got this "nice" exception 2 days ago, but I realy can't find the problem.
    As you can see next all beans have setters/getters and are initializated.
    Please help me:
    index.jsp:
    f:view>
    <h:dataTable value="#{DataBaseReaderBean.todayArticles}" var="articleBean">
    <h:column>
    <h:outputText binding="#{articleBean.out}"/>
    </h:column>
    </h:dataTable>
    </f:view>
    <faces-config>
    <component>
    <component-type>articleComponentType</component-type>
    <component-class>news.UiArticle</component-class>
    </component>
    <managed-bean>
    <description>
    Reads articles from database
    </description>
    <managed-bean-name>DataBaseReaderBean</managed-bean-name>
    <managed-bean-class>news.DataBaseReaderBean</managed-bean-class>
    <managed-bean-scope>application</managed-bean-scope>
    <managed-property>
    <property-name>todayArticles</property-name>
    <property-class>java.util.ArrayList</property-class>
    <value>#{todayArticles}</value>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>ArticleBean</managed-bean-name>
    <managed-bean-class>news.ArticleBean</managed-bean-class>
    <managed-bean-scope>none</managed-bean-scope>
    <managed-property>
    <property-name>out</property-name>
    <property-class>javax.faces.component.html.HtmlOutputText</property-class>
    <value>#{out}</value>
    </managed-property>
    </managed-bean>
    <lifecycle/>
    <application>
    <locale-config/>
    </application>
    <factory/>
    </faces-config>
    public class DataBaseReaderBean implements Serializable{
    private ArrayList todayArticles=new ArrayList();
    public DataBaseReaderBean() {
    todayArticles.add(new ArticleBean(new Article("First news","this is my first news","articlesimage/1.jpg","First img"),new Boolean(true)));
    todayArticles.add(new ArticleBean(new Article("Second news","this is my second news","articlesimages/2.jpg","Second img"),new Boolean(true)));
    todayArticles.add(new ArticleBean(new Article("Third news","this is my third news","articlesimages/3.jpg","Third img"),new Boolean(false)));
    todayArticles.add(new ArticleBean(new Article("Last news","this is my last news","articlesimages/4.jpg","Last img"),new Boolean(false)));
    public ArrayList getTodayArticles() {
    return todayArticles;
    public void setTodayArticles(ArrayList todayArticles) {
    this.todayArticles = todayArticles;
    public class ArticleBean implements Serializable {
    private Boolean collapsed;
    private news.UiArticle myUIArticle;
    private Article article;
    private HtmlOutputText out;
    public void setOut(HtmlOutputText out) {
    this.out = out;
    public HtmlOutputText getOut() {
    out.setValue("myText");
    return out;
    public ArticleBean() {
    out=new HtmlOutputText();
    }

    hi frank,
    I cross checked, all the entries in the bean, with those in the JSPX source code, and chceked in the auto comment of the JSPX page the name of the bean, i have checked the faces config, i am going to remove the the new models and re-add them, just tell me if i need to add any files other than those:
    MODEL X folder, which contains the model
    JSPX folder, which contans the pages
    SRC folder in view controller
    And the faces config to web-inf
    thanks in advance man
    regards
    Halim

  • F:selectItems and List Managed Property

    I am trying to use a managed property list-entries to initialize a List that an f:selectItems is bound to.
    <f:selectItems value="#{RowsPerPage.rows}"/>
    Here is the managed bean from faces-config
            <managed-bean>
                <managed-bean-name>RowsPerPage</managed-bean-name>
                <managed-bean-class>com.stlouiscity.jsf.util.RowsPerPage</managed-bean-class>
                <managed-bean-scope>none</managed-bean-scope>
                <managed-property>
                    <property-name>rows</property-name>
                    <property-class>java.util.ArrayList</property-class>
                    <list-entries>
                        <value-class>java.lang.Integer</value-class>
                        <value>1</value>
                        <value>5</value>
                        <value>10</value>
                        <value>25</value>
                        <value>50</value>
                        <value>100</value>           
                    </list-entries>
                </managed-property>
            </managed-bean>Here is the class
        package com.stlouiscity.jsf.util;
        import java.util.List;
        public class RowsPerPage {
            private List rows;
            public RowsPerPage() {
            public List getRows() {
                return rows;
            public void setRows(List rows) {
                this.rows = rows;
        }Here is the stack trace
        ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/BudgetApplicationADF].[jsp]] Servlet.service() for servlet jsp threw exception
        java.lang.ClassCastException: java.lang.Integer
             at oracle.adfinternal.view.faces.renderkit.uix.SelectItemSupport.addSelectItems(SelectItemSupport.java:280)
             at oracle.adfinternal.view.faces.renderkit.uix.SelectItemSupport.getSelectItems(SelectItemSupport.java:81)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.encodeAllAsElement(SimpleSelectOneRenderer.java:235)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:48)
             at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.delegateRenderer(CoreRenderer.java:271)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:115)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer._renderFieldCell(LabelAndMessageRenderer.java:293)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:163)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:94)
             at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)
             at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
             at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:236)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.DesktopTableRenderer.renderControlBar(DesktopTableRenderer.java:601)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.TableRenderer._renderControlBar(TableRenderer.java:582)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.TableRenderer.renderNavigationHeaderBars(TableRenderer.java:530)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.TableRenderer.encodeAll(TableRenderer.java:232)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.DesktopTableRenderer.encodeAll(DesktopTableRenderer.java:79)
             at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)
             at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
             at oracle.adf.view.faces.component.UIXCollection.encodeEnd(UIXCollection.java:438)
             at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)
             at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)
             at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)
             at oracle.adfinternal.view.faces.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(ContextPoppingUINode.java:224)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
             at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
             at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.HeaderRenderer.renderContent(HeaderRenderer.java:482)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
             at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
             at oracle.adfinternal.view.faces.ui.laf.base.xhtml.BorderLayoutRenderer.renderIndexedChildren(BorderLayoutRenderer.java:42)
             at oracle.adfinternal.view.faces.ui.laf.base.xhtml.BorderLayoutRenderer.renderContent(BorderLayoutRenderer.java:71)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
             at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
             at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
             at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
             at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
             at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.renderWithNode(UINodeRenderer.java:90)
             at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.render(UINodeRenderer.java:36)
             at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.PageLayoutRenderer.render(PageLayoutRenderer.java:76)
             at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)
             at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)
             at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
             at oracle.adfinternal.view.faces.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:54)
             at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:232)
             at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:255)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:65)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:117)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:147)
             at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)
             at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)
             at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
             at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
             at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
             at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:100)
             at org.apache.jsp.AccountList_jsp._jspx_meth_afh_body_0(AccountList_jsp.java:266)
             at org.apache.jsp.AccountList_jsp._jspx_meth_f_view_0(AccountList_jsp.java:165)
             at org.apache.jsp.AccountList_jsp._jspService(AccountList_jsp.java:123)
             at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
             at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
             at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
             at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
             at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
             at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
             at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
             at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
             at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
             at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
             at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
             at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
             at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
             at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:595)
        2006-10-04 08:52:43,656 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/BudgetApplicationADF].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
        javax.faces.FacesException: java.lang.Integer
             at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
             at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
             at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
             at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
             at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
             at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
             at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:595)
        Caused by: org.apache.jasper.JasperException: java.lang.Integer
             at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
             at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
             at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
             at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
             at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
             at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
             at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
             at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
             ... 28 more

    Looks like I and BalusC interpreted your questions differently.
    The way I have implemented this case is to have get and set methods for the selectedProperty in my bean.
    I also have the change propertyChanged method that sets the session attribute whenever the user changes the selection.
           public String getSelectedPropertyType() {
                return this.selectedPropertyType;
           public void setSelectedPropertyType(String selectedPropertyType) {
                this.selectedPropertyType = selectedPropertyType;
                HttpServletRequest request = getHttpRequest();
                request.getSession().setAttribute("selectedPropertyType", selectedPropertyType);
           public void propertyTypeSelectionChanged(ValueChangeEvent event) {
                if (event.getNewValue() == null) return;
                String newValue = (String) event.getNewValue();
                setSelectedPropertyType(newValue);
           }Whenever you need the currently selected property, you would just need to get the #(myBean.selectedProperty).
    If you find a simpler solution than this, please let me know.

  • How to show static values in h:selectOneListbox

    Hi
    i would like to show static values in <h:selectOneListbox>
    how do i that ??
    <managed-bean>
    <managed-bean-name>Options</managed-bean-name>
    <managed-bean-class>java.util.ArrayList</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <list-entries>
    <value>val1</value>
    <value>val2</value>
    <value>val3</value>
    </list-entries>
    </managed-bean>
    or some how i define a <managed-property> ??
    <managed-property>
    <property-name>options</property-name>
    <property-class>java.util.ArrayList</property-class>
    <list-entries>
    <value>val1</value>
    <value>val2</value>
    <value>val3</value>
    </list-entries>
    </managed-property>

    Hi Swetlin,
    I have this format in the main window.
    textaaaaaaaaaaaaaaaaa
    textfffffffffffffff
    123
    1234
    1234
    5667
    1234
    textweeeeeeeeeeeeeeeeeeeeee
    texttryrtyrtuyrturtur
    now when i am doing as you suggested
    the last texts are coming in the next page.
    What i want is to show overflow of numeric data in next page and the remaining last text should remain as it is in the first page only.
    i mean
    textaaaaaaaaaaaaaaaaa
    textfffffffffffffff
    123
    1234
    1234
    5667
    1234
    textweeeeeeeeeeeeeeeeeeeeee
    texttryrtyrtuyrturtur
    and in the next page
    4567
    4568
    8790
    Thanks and regards
    Mave

  • Passing parameters to external Crystal 2008 report

    I have to invoke the viewer.reportsource twice in order for the parmeters to a Crystal Report to take effect.
    Here is my environment:
    CR 2008
    VS 2005
    VB
    SQL Server 2008
    External Crystal Report
    I am using the Report Document Object.  Here is the code I am using
    ' The following is a Class used to configure a Crystal report Document
    '    Structure struRptParms '
            ' This structure will be used to hold Crystal Reports Parameter Keys and Parmeter Values
            Public strRptParmKey As String
            Public aryRptParmValues As ArrayList
        End Structure
        ' aryRptParms is an ArrayList property of this class that contains the ParmKeysAndValues for the report
            ' Step 1 - Instantiate a Crystal report document for the Report and then
            '           load the report into the report document
            '   a) instantiate the ReportDocument class.      
            docCrystalReportDocument = New ReportDocument
            '   b) Load the report by a Call to the Load() method of the ReportDocument instance
            '       and pass it the reportPath string variable.
            docCrystalReportDocument.Load(strRptPathAndName)
            ' Step 2 - Create the links to the Data Source for the Report
            '   a)instantiate the ConnectionInfo class
            Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
            '   b) set the ServerName property of the ConnectionInfo instance.
            myConnectionInfo.ServerName = strRptDataSource.ToString
            '   c) Set the DatabaseName and IntegratedSecurity properties of the ConnectionInfo instance.
            myConnectionInfo.DatabaseName = strRptDataBase.ToString
            myConnectionInfo.IntegratedSecurity = True
            ' Step 3) Connect the report to the datasource by entering a call to the
            '           SetDBLogonForReport() method, by passing in the ConnectionInfo instance and the Crystal report.
            SetDBLogonAndDataSourceForReport(myConnectionInfo, docCrystalReportDocument)
            ' Step 3a) Connect subreports to the datasource by entering a call to the
            '           SetDBLogonForReport() method, by passing in the ConnectionInfo instance and the Crystal report.
            Dim mySubReportDocument As ReportDocument
            For Each mySubReportDocument In docCrystalReportDocument.Subreports
                SetDBLogonAndDataSourceForReport(myConnectionInfo, mySubReportDocument)
            Next
            ' Step 4) Pass the parameter keys and parameter values to the report by calling
            '           the SetParameterValue() method from the Report Document class. Do this for
            '           each instance of parameter keys and values passed in via aryRptParms property
            Dim struMyRptParms As New struRptParms
            For Each struMyRptParms In aryRptParms
                docCrystalReportDocument.SetParameterValue(struMyRptParms.strRptParmKey.ToString, struMyRptParms.aryRptParmValues.ToArray())
            Next
            ' Step 5) Connect the Crystal Report to the report viewer by binding the ReportSource property of the
            '       CrystalReportViewer to the ReportDocument instance
            Me.vwrCrystalReport.ReportSource = docCrystalReportDocument
            Me.vwrCrystalReport.ReportSource = docCrystalReportDocument

    Jonathon,
    Thank you for reading my post and taking the time to reply. 
    The report design does not have Save Data turned on.
    I moved the parameter passing before logging on to the data base - that did not fix the problem.
    Thank you again for taking the time.

  • Bean not behaving as expected

    OK, I have a JSP running the following script section.
    <% irCollection mgrq = new irCollection(); 
          mgrq.setMgrid("Chris Novish");
          mgrq.populateCollection();
          int pagenum;
          if (request.getParameter("p") != null) {
            String pagedatum=request.getParameter("p");
            pagenum = Integer.parseInt(pagedatum);
          } else { pagenum = 0; }
          for (int i=0;i<10;i++) {
            int rownum = pagenum * 10 + i;
            InquireRecord currec = mgrq.getCurRecords(rownum);
            out.println(currec.getID()); %>irCollection has an ArrayList property that stores a several InquireRecord objects. It gets this data from a database using the mgrid as (set in line 2 there) as the matching term.
    But I'm getting an IndexOutOfBounds exception on what appears here as line 11.
    I've done some tests, and I'm pretty sure that it's because populateCollection() isn't getting things done. I have a getSize method that gives me a size of 0.
    I made a test class in Eclipse to make sure all my methods were working:
    package com.serco.inquire;
    public class test {
         public static void main (String[] args) {
              String mgr = "Chris Novish";
              irCollection bob = new irCollection();
              bob.setMgrid(mgr);
              bob.populateCollection();
              InquireRecord fred = bob.getCurRecords(1);
              System.out.println(fred.getID());
    }That test class produces exactly what I'd expect.
    Other than the names of some of the local variables, I can't see what I'm doign different in the JSP.
    So... tell me, what noobish mistake did I make?
    for the sake of being thorough, here's the populateCollection() method:
    public void populateCollection() {
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   String filename = "inquire.mdb";
                   String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
                   database+= filename.trim() + ";DriverID=22;READONLY=true}";
                   Connection con = DriverManager.getConnection( database ,"","");
                   Statement s = con.createStatement();
                   s.execute ("SELECT * FROM inquiries WHERE manager = '" + mgrid + "'");
                   ResultSet rs = s.getResultSet();
                   int cur;
                   if (rs != null) {
                   while (rs.next()) {
                        cur = rs.getRow();
                        cur -- ;
                        int curID = rs.getInt("ID");
                        this.newIR.setID(curID);
                        String cursub = rs.getString("submitter");
                        this.newIR.setSubmitter(cursub);
                        this.iRecords.add(cur, this.newIR);
                   this.size = iRecords.size();
                   this.pages = this.size / 10;
                   int remain = this.size % 10;
                   if (remain > 0) { this.pages++; }
                             } else { System.out.println("no records."); }
              catch (Throwable e) {
                   System.out.println(e);
         }Edited by: EJP on 21/06/2011 09:15: added {noformat}{noformat} tags. Please use them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    But I'm getting an IndexOutOfBounds exception on what appears here as line 11.Line 11 of what? You've posted three separate pieces of code.
                   Statement s = con.createStatement();
                   s.execute ("SELECT * FROM inquiries WHERE manager = '" + mgrid + "'");
    PreparedStatement s = con.prepareStatement("SELECT * FROM inquiries WHERE manager = ?'", Statement.NO_GENERATED_KEYS);
    s.setObject(1, mgrid);
                   ResultSet rs = s.getResultSet();
                   int cur;
                   if (rs != null) { 'rs' cannot be null. Test is pointless.
                        cur = rs.getRow();
                        cur -- ;
    cur = rs.getRow()-1;
                        this.iRecords.add(cur, this.newIR);
    this.iRecords.add(this.newIR);'newIR' mustn't be a member variable, it should be local, and refer to a newly created instance every time around the loop. At the moment you are overwriting previous elements of 'iRecords'.
                   this.pages = this.size / 10;
    this.pages = (this.size+9)/10;
                   if (remain > 0) { this.pages++; }
                             } else { System.out.println("no records."); }Wrong message. If 'remain' is zero there may be any multiple of 10 records. You can remove this entire block: adding 9 above does all you need.

  • H:datatable..select multiple rows

    Hi all, i'm trying to select multiple rows but couldn't do it.. can you please help me to solve this trouble?
    Here the code..
    kbankMainView.jsp
    function doCount() {
              button = document.getElementById('formProcedurelist:buttonCount');
              button.click();
    <h:commandButton id="buttonCount" style="visibility:hidden" action="#{MainViewBean.getSelectedItems}"></h:commandButton>
    <h:dataTable id="tableProcedurelist" value="#{MainViewBean.procedureList}" rendered="#{!empty MainViewBean.procedureList}" var="procedure" border="1" headerClass="heading" columnClasses="col0,col1,col2,col3,col4,col5">
                                <h:column>
                                     <f:facet name="header">
                                       <f:verbatim>Sel.</f:verbatim>
                                  </f:facet>
                                     <h:selectBooleanCheckbox value="#{MainViewBean.selectedIds[procedure.idProcedura]}" style="cursor:pointer" onclick="javascript:doCount()"/>
                                </h:column>Here my bean..
    MainViewBean
    private List<TKbankProcedure> selectedProcedureList;
    private Map<Integer, Boolean> selectedIds = new HashMap<Integer, Boolean>();
    private ArrayList<TKbankProcedure> procedureList;
    public void getSelectedItems() {
             // Get selected items.
             selectedProcedureList = new ArrayList<TKbankProcedure>();
            for (TKbankProcedure procedure : procedureList) {
                if (selectedIds.get(procedure.getIdProcedura()).booleanValue()) {
                     selectedProcedureList.add(procedure);
                    selectedIds.remove(procedure.getIdProcedura()); // Reset
            System.out.println("number sel. items = " + selectedProcedureList.size());
        }and here my faces-config.xml:
    <managed-property>
                   <property-name>selectedIds</property-name>
                   <property-class>java.util.Map</property-class>
                   <map-entries>
                        <key-class>java.lang.Integer</key-class>
                        <value-class>java.lang.Boolean</value-class>
                   </map-entries>
              </managed-property>
              <managed-property>
                   <property-name>selectedProcedureList</property-name>
                   <property-class>java.util.List</property-class>
                   <list-entries>
                        <value-class>databaseKbank.TKbankProcedure</value-class>
                   </list-entries>
              </managed-property>
              <managed-property>
                   <property-name>procedureList</property-name>
                   <property-class>java.util.ArrayList</property-class>
                   <list-entries>
                        <value-class>databaseKbank.TKbankProcedure</value-class>
                   </list-entries>
              </managed-property>I can't understand why returns me 0 elements selected..i really hope in your help!
    However, thanks BalusC for the help you gave me in the other post!!
    Edited by: emergencyDeveloper on Dec 22, 2008 7:52 AM

    BalusC, i've removed entries and seemed to work..but still doesn't!
    Returns me these Exceptions:
    ERROR [InvokeApplicationPhase] #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
    javax.faces.FacesException: #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         ... 26 more
    Caused by: java.lang.NullPointerException
         at m2u_kbank.MainViewBean.getSelectedItems(MainViewBean.java:251)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 27 more
    11:32:37,698 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
    javax.faces.FacesException: #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         ... 26 more
    Caused by: java.lang.NullPointerException
         at m2u_kbank.MainViewBean.getSelectedItems(MainViewBean.java:251)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 27 moreCan't found data in procedureList ArrayList, i think error is there..
    Bean:
    public void getSelectedItems() {
             // Get selected items.
             selectedProcedureList = new ArrayList<TKbankProcedure>();
             Iterator it = procedureList.iterator();
            while (it.hasNext()) {
                 TKbankProcedure procedure = (TKbankProcedure)it.next();
                if (selectedIds.get(procedure.getIdProcedura()).booleanValue()) {
                     selectedProcedureList.add(procedure);
                    selectedIds.remove(procedure.getIdProcedura()); // Reset
        }Hope in your suggest!
    Thanks

  • htm:radio button doubt

    Hi,
    can someone please explain this for the <html:radio> tag for struts:
    "When the idName attribute is used the radio-tag's value-attribute denotes a property in the bean given by idName"
    <html:radio idName="arrayList" property="list" value="value"/>
    So does "value" property exists in the arrayList given by idName ???
    Thanks

    Yes its under iterate tag i.e:
    <logic:iterate id="arrayList" name="readForm" property="bookList">
    In short,I read in the values of the books into an "arrayList" .Now,its
    automatically reading the values and creates that many radio buttons.
    But I just want to create a single radio button depending upon the values entered
    by the user:
    For example,if the user enters "1",then the first radio button should be displayed
    with arraylist[0] values,and similarly for 2,3,4 and so on....can someone please
    tell me how to do this...
    thanks

  • No search result using managed property from a column of a published infopath form

    Hi,
    I'm trying to use a managed property in the advanced search to retrieve only words from a column of a published InfoPath form. We are using FAST Search and verify that the column are being crawled by checking the crawled property in Central Admin but still
    cannot retrieve search result for the managed property. We also do a full crawl before testing the search. Thank you..

    Hi Rommel,
    When we create a column from a list (not site column), then we need create list item with this column value, then we need to full crawl, then the the crawled propery ows_listColumnName will be generated, then create a managed property to map this
    crawled property(start a full crawl again if needed), then add the custom managed property in advance search web part property, then check again.
    Here is an article about how to add the custom managed proerpty in advanced search web part, you can take a look.
    http://waelmohamed.wordpress.com/2011/05/31/add-custom-search-properties-in-your-advanced-search-sharepoint-2010/
    Thanks
    Daniel Yang
    TechNet Community Support

  • Update Property Promotion Column Value in InfoPath Document Library

    Hello All,
    I just tried to update a property promotion value using this code:
    using (SPSite site = new SPSite(webName))
                        using (SPWeb objweb = site.OpenWeb())
                            SPList spList = objweb.Lists["XYZ"];
                            SPQuery qry = new SPQuery();
                            qry.Query = @"<Where>" +
                          "<Eq>" +
                          "<FieldRef Name='ServiceR' /><Value Type='WorkflowStatus'>17</Value>" +
                          "</Eq>" +
                          "</Where>";
                            qry.ViewFields = @"<FieldRef Name='Title' /><FieldRef Name='Evaluation_x0020_Status' />";
                            SPListItemCollection listItems = spList.GetItems(qry);
                            objweb.AllowUnsafeUpdates = true;
                            if (listItems.Count > 0)
                                foreach (SPListItem item in listItems)
                                    if (item["Evaluation_x0020_Status"] == null)
                                        item["Evaluation_x0020_Status"] = "Evaluation Completed";
                                        item.Update();
                            objweb.AllowUnsafeUpdates = true;
    The code exexuted but the value does not updated !!
    Any Answer ?

    I resolve the issue using this link:
    http://nanettevb.blogspot.com/2011/03/cannot-update-promoted-fields-from.html
    Omar Attari

  • How to get an ArrayList Object in servlet from JSP?

    How to get an ArrayList Object in servlet from JSP?
    hi all
    please give the solution for this without using session and application...
    In test1.jsp file
    i am setting values for my setter methods using <jsp:usebean> <jsp:setproperty> tags as shown below.
    After that i am adding the usebean object to array list, then using request.setAttribute("arraylist object")
    ---------Code----------
    <jsp:useBean id="payment" class="com.common.PaymentHandler" scope="request" />
    <jsp:setProperty name="payment" property="strCreditCardNo" param="creditCardNumber" />
    <%-- <jsp:setProperty name="payment" property="iCsc" param="securityCode" /> --%>
    <jsp:setProperty name="payment" property="strDate" param="expirationDate" />
    <jsp:setProperty name="payment" property="strCardType" param="creditCardType" />
    <%--<jsp:setProperty name="payment" property="cDeactivate" param="deactivateBox" />
    <jsp:setProperty name="payment" property="fAmount" param="depositAmt" />
    <jsp:setProperty name="payment" property="fAmount" param="totalAmtDue" /> --%>
    <jsp:useBean id="lis" class="java.util.ArrayList" scope="request">
    <%
    lis.add(payment);
    %>
    </jsp:useBean>
    <%
    request.setAttribute("lis1",lis);
    %>
    -----------Code in JSP-----------------
    In testServlet.java
    i tried to get the arraylist object in servlet using request.getAttribute
    But I unable to get that arrayObject in servlet.....
    So if any one help me out in this, it will be very helpfull to me..
    Thanks in Advance
    Edward

    Hi,
    Im also facing the similar problen
    pls anybody help..
    thax in advance....
    Litty

  • InfoPath 2010 does not work in claims authentication mode on SharePoint 2010

    Hi everyone,
    I created an Infopath 2010 Forms published on a Claims-based authentication site collection. This form has an external datasource plugged on the
    _vti_bin/UserProfileService.asmx webservice (within the same site collection). This datasource is queried when the form opens. When I check this form with Infopath designer preview, everything works fine.
    But once this forms is published, an error "Error while trying to contact Web Service" occured when opening a new form.
    Here ere an extract of the logs:
    The following query failed: GetUserProfileByName (User: DOMAIN\username, Form Name: library, IP: , Connection Target: , Request: http://server/_layouts/FormServer.aspx?xsnLocation=http://server/library/forms/template.xsn?DefaultItemOpen=1&Source=http://server/page.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:library:-myXSD-2010-01-12T23-08-28 Type: DataAdapterException, Exception Message: The remote server returned an error: (500) Internal Server Error.
    Server was unable to process request. ---> Attempted to perform an unauthorized operation.
    The remote server returned an error: (500) Internal Server Error.)
    Here is an extract of my IIS log:
    2010-11-25 13:45:30 fe80::b9ab:23d9:ff9e:bb23%11 POST /_vti_bin/userprofileservice.asmx - 50000 - fe80::b9ab:23d9:ff9e:bb23%11 InfoPathDA 500 0 0 41
    Additionnaly, you have to know :
    If we set the web application authentication mode in "Classic mode", everything work fine
    As soon as we set "Claim mode authentication", we reproduce the issue and this even if we are using a Windows integrated  account or an external account (SQL Memberships, Claims/AD)
    We reproduce this issue in different SharePoint FARM.
    It seems that this issue is generic with "Claims mode authentication" and i'm not shure that other forum can help us.
    How can I make this WebService works for my form?
    Thanks in advance.
    Seb Nicot

    I am not sure but a Code Solution might work ... I assume InfoPath 2010 is not Claims-Based aware.
    I am on SP1 and June 2011 CU but still had no luck
    If you only need the current user’s login name, then in the “FormEvents_Loading” event, you can retrieve the current user name with a call to the “Application.User.LoginName” property.  Here is an example:
            public void FormEvents_Loading(object sender, LoadingEventArgs e)
                XPathNavigator codeUserNameXPN = this.CreateNavigator().SelectSingleNode(
                    "/my:myFields/my:CodeRetrievedUserName", this.NamespaceManager);
                codeUserNameXPN.SetValue(this.Application.User.LoginName);
    OR ----------------
            public void FormEvents_Loading(object sender, LoadingEventArgs e)
                //A place to write the results
                XPathNavigator codeUserNameXPN = this.CreateNavigator().SelectSingleNode(
                    "/my:myFields/my:CodeRetrievedUserName", this.NamespaceManager);
                //codeUserNameXPN.SetValue(this.Application.User.LoginName);
                try
                    //ThresholdAuthentication is the web service reference to the
                    //https://test:24575/_vti_bin/authentication.asmx web service
                    GetUserName.ThresholdAuthentication.Authentication authenticationWS =
                        new GetUserName.ThresholdAuthentication.Authentication();
                    //Call the web service's Login method and pass the username and password of a site
                    //administrator so we have rights to read all user profiles
                    authenticationWS.Url = "https://test:24575/_vti_bin/authentication.asmx";
                    authenticationWS.CookieContainer = new System.Net.CookieContainer();
                    GetUserName.ThresholdAuthentication.LoginResult result = authenticationWS.Login(
                        "Admin", "Pa$$w0rd");
                    if (result.ErrorCode == GetUserName.ThresholdAuthentication.LoginErrorCode.NoError)
                        //If we authenticated correctly, then set up a call to the user profile service
                        //ThresholdUserProfileService is the web service reference to the
                        //https://test:24575/_vti_bin/userprofileservice.asmx web service
                        GetUserName.ThresholdUserProfileService.UserProfileService userProfileWS =
                            new GetUserName.ThresholdUserProfileService.UserProfileService();
                        //Pass the authentication cookies we got back from the authentication web service
                        userProfileWS.Url = "https://test:24575/_vti_bin/userprofileservice.asmx";
                        userProfileWS.CookieContainer = authenticationWS.CookieContainer;
                        //Try to find the user profile information of the current
                        GetUserName.ThresholdUserProfileService.PropertyData[] resultData =
                            userProfileWS.GetUserProfileByName(this.Application.User.LoginName);
                        //Enumerate through the properties
                        foreach (GetUserName.ThresholdUserProfileService.PropertyData property in resultData)
                            //Pick out the "AccountName" property and display it
                            if (property.Name == "AccountName")
                                codeUserNameXPN.SetValue(property.Values[0].Value.ToString());
                    else
                        //If we failed to authenticate properly, display the reason why
                        codeUserNameXPN.SetValue(result.ErrorCode.ToString());
                catch (System.Exception ex)
                    //If an exception occurred, report it.
                    codeUserNameXPN.SetValue(ex.Message);
    Note that in order for this code to work, you will need to make your form template fully-trusted in the “Security” section of the “Form Options” dialog, and then publish your form template to SharePoint as an Administrator-Approved form
    template

  • Windows 8.1 and IE11 - Critical Error: Object doesn't support property or method 'addEventListener'

    Our SharePoint 2010 sites don't work very well in Windows 8.1/IE11!!
    When opening list items or forms etc we get Critical Error : Object doesn't support property or method 'addEventListener'. It looks like it's possibly linked to InfoPath forms. Given that a large chunk of our users will probably be upgrading
    to Windows 8.1 as we speak this is slightly worrying!
    Has anyone else noticed this, or is it something to do with our deployment?  We're running SP2010 SP2 with latest CU.

    In older versions of IE, attachEvent is
    used to attach an event handler for some event on some element. But as per the update , starting with IE11, attachEvent is
    deprecated and you should use addEventListener instead.
    IE has included support for addEventListener from
    IE9 and above only. So if you still need to support IE8, I suggest you use some cross-browser library like jQuery to bind event handlers instead of vanilla javascript.
    As you're already using jQuery, you can bind events like below
    $('#yourElement').on('click', function(){
    // do something when you click on yourElement

  • The security validation for this page is invalid – Infopath 2010

    Hello Experts,
    I have created browser enabled Infopath form and written a custom code (infopath 2010). I have a “Save” button on a form that submits the data into multiple relational sharepoint list. While debugging through VSTA everything goes well and successfully submits
    the data, but after publishing a form(browser enabled) I am not able to save a data to sharepoint list. When I Clicked on save button, it just refreshing a page, even the same was getting after
     made it to full trust and approved by Admin.
    Before this I was using “Submit” button to submit a form, that time I was getting a popup with the message “There has been an error while processing the form”. And in log files it was showing error message as “The security validation
    for this page is invalid”.
    I referred many blogs regarding validation error and tried almost everything in every way, some of shortly mentioned below,
    Formdigest (It not works for me)
    Security Validation (It works perfectly)
    The second option is working for me.  (But this is not a good practice and also not recommended)
    Just want to know “Without making Security Validation Off” how can I resolved this validation issue from infopath 2010 form.
    Please share your thoughts on this. Any help is appreciated.
    Regards,
    Uday

    Hi Uday,
    Have you tried SPWebapplication.FormDigestSettings.Enabled = false to turn off the digest setting property for the web application? See this blog for the details.
    http://ktskumar.wordpress.com/2009/03/09/the-security-validation-for-this-page-is-invalid-click-back-in-your-web-browser-refresh-the-page-and-try-your-operation-again/
    Thanks & Regards,
    Emir
    Emir Liu
    TechNet Community Support

Maybe you are looking for

  • Can we Install siebel crm latest version on Windows  7 (64 bit )

    Hai to all May i know the Latest Version of Siebel CRM ? Can we install Siebel Crm on windows 7 (64) bit operating system. And i downloaded some of the files from oracle e-delivery cloud. its and all jar files how can i convert into .Exe Files ? Can

  • G5 GeForce FX 5200 graphics and third party monitor

    I need to buy a new monitor on which I can change manual settings, to work with a G5 1.6GHz using a GeForce FX 5200 card. Unfortunately the new Mac displays (24") only use a mini display port. And the 20" cinema displays are no longer sold. I have se

  • Downloaded videos play for 10 seconds then iTunes shuts down

    Have downloaded 2 videos from Music Store. They work well on my new iPod 30GB, but will not play on my PC. Reasonably good spec PC - AMD Athlon XP2000+ processor, 512 RAM, 128MB Graphics RAM (nVididia GeForce fx5200)and I have no problem playing DVDs

  • Spark ComboBox in mx control - Disappearing DropDown Menu

    Hey Everyone! I have a problem displaying a spark combobox as an item editor in an mx data grid. Since I've been trying to figure it out for some time without any luck I thought one of you guys might have a hint for me. The situation: One of my colum

  • Photo booth only records partial Video no matter how long it is...Help!!

    ok so i wanted to make a funny video to send to my friend. I turned on Photo booth, chose the video option, and hit record. I proceeded to completely embarrass myself on camera for about 5 mins, and i clicked stop. When it stopped, only like the 1st