Getting JPA class attributes inside Visual JSFs
Hi,
I'm new her, so I'm deeply sorry if I'm writing this on the wrong place. But I have a small issue with the Visual JFSs in Netbeans.
I have created a project where a person can log in and see some data, all is done using Java persistence API. I was able to get the JPA attributes into a normal JSP. by doing something like this.
<body>
<f:view>
<h1><h:outputText value="You are now logged in" /></h1>
Welcome ${user.email} You've been loggedin successfully.
<h:form>
<h:commandButton id="logout" value="Logout" action="#{usermanager.logout}"/>
</h:form>
</f:view>
</body>it works fine and displays the correct result. But when I go and do this inside a Visual JSF, it does NOT give me any compiler errors. But it wont display anything. Just a blank screen. If I remove that particular code and put some label or text there, then it works. But NOT when I try to access the JPA attributes.
Why is this happening?. I basically need a way to retrieve the bean information which is stored in a Entity class which was created from the database. Can't I do it using this ${user.email} kind of notation. If so, then how to do it. Can someone please help me.
Thanks a lot.
Source is empty, But I checked the app server log after you suggested. It says something like this (among other things).
Caused by: javax.servlet.jsp.JspException: Can't write content above <f:view> tag Illegal to flush within a custom tag
so I tried out something like this.
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<webuijsf:page id="page1">
<webuijsf:html id="html1">
<webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/>
</webuijsf:head>
<webuijsf:body id="body1" style="-rave-layout: grid">
<webuijsf:form id="form1">
<webuijsf:label binding="#{user.email}" id="label1" style="position: absolute; left: 120px; top: 72px" text="Label"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>but still it doesn't work. There was a conversion error where #{user.email} returns a String but it could not be assigned to a label. so I tried it this way as well.
<webuijsf:body id="body1" style="-rave-layout: grid">
<webuijsf:form id="form1">
<webuijsf:staticText id="staticText1" binding="#{user.email}" style="position: absolute; left: 72px; top: 72px"/>
</webuijsf:form>
</webuijsf:body> Now there were no errors, But still it doesn't work.
I ONLY need a way to get the information inside the entity classes which was created from the database using Object Relational Mapping. My problem is this works fine inside regular JSP but not inside Visual JSF. ??? :(
Similar Messages
-
Get the class attributes name dynamically?
Hi all,
I have to call a transformation and give it as result parameter an internal table with ABAP_TRANS_RESBIND_TAB type.
How can I get the name & the adresse of the current class parameters ?
Thanks.
Edited by: Noureddine MOUTAA on Oct 20, 2008 2:01 PMI have to call a transformation and give it as result parameter an internal table type ABAP_TRANS_RESBIND_TAB.
And to fill this internal table, I need the name and the reference of the attribute
I mean by REFERENCE the result of this instruction GET REFERENCE OF, as shown below:
DATA: attribute TYPE string.
DATA: the_reference TYPE REF TO data.
GET REFERENCE OF attribute INTO the_reference.
Thanks.
Edited by: Noureddine MOUTAA on Oct 20, 2008 4:37 PM -
Get-aduser compare attributes inside the -filter parameter
Hello all,
What I would like to do is use the -filter parameter of get-aduser to compare 2 attributes within the search itself, instead of having to process the differences afterwards.
So here is how I normally use -filter:
get-aduser -filter {(name -like "*") -and (displayname -like "*")} -Properties displayname | `
Foreach-object{
If($_.name -eq $_.displayname){
"Match!"
As you can see, I have to get all the users and their properties first, and then subsequently I have to use a ForEach-Object loop to determine if there are any matches.
What I would like to do is do the comparison in the -filter parameter. Something like this:
get-aduser -filter {name -eq displayname}
However, I'm not aware of any way to compare attributes within -filter, and I wonder if anyone knows of a way? Or is a subsequent loop the only way to compare?Hi,
You can use -and in the filter:
Get-ADUser -Filter "SamAccountName -eq 'smithr' -and GivenName -eq 'Robert'"
I'm not exactly sure if this is what you're asking about though.
EDIT: I think I know what you're asking now. AFAIK, there is no way to use -Filter to return users who have the same DisplayName attribute as their Name attribute. You need to have something concrete to test against inside of the filter.
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing) -
How to find a classes attributes at runtime?
Hi,
I need to write a program that inspects a class and finds out what attributes it has and then converts them to an XML string. Any idea how to get the classes attributes at runtime? I want this to work with 3rd party API's hence the reason I don't just either code a toXML function in each class or have a method to return the attribute names.
Thanks
AndreHi,
I need to write a program that inspects a class and
finds out what attributes it has and then converts
them to an XML string. Any idea how to get the classes
attributes at runtime? I want this to work with 3rd
party API's hence the reason I don't just either code
a toXML function in each class or have a method to
return the attribute names.
Thanks
AndreYou might want to take a look at Java's reflection mechanism:
http://java.sun.com/docs/books/tutorial/reflect/index.html -
If I know a name of class , how can I get it's attribute and methods
If I know a name of class , how can I get it's attribute and methods as well as it's detail information by ABAP code ?
Best regards ,HI, Chandra ,
Thank you very much , I can get the result
Best regards,
DATA lo_class TYPE REF TO cl_oo_class.
DATA lt_attribs TYPE seo_attributes.
FIELD-SYMBOLS: <attrib> TYPE vseoattrib.
TRY.
CREATE OBJECT lo_class
EXPORTING
clsname = 'CLASS_NAME'.
CATCH cx_class_not_existent .
ENDTRY.
lt_attribs = lo_class->get_attributes( ).
BREAK-POINT. -
Getting problem in binding DropDown List with table data in visual JSF
Hi All,
I am new to visual JSF.
I am getting few problems while working over components.
I have succeeded in binding data of Person table in a drop down list .
By just drag drop ..it worked.
But while connecting to external DB this drag drop mechanism didn't work for me .
1st problem that i faced was by dragging method columns are not visible when i did right click-> bind to Data -> DataProvider window .
But i am successfully printed table Data in backend ie: by putting
for(int i=0; i<xn_white_listDataProvider.getAllRows().length;i++){
System.out.println(" value :"+xn_white_listDataProvider.getValue("SUB_ID",xn_white_listDataProvider.getRowKey(Integer.toString(i))));
}I am not getting how to set Items in dropdown1
I tried putting
HelloSh.xn_white_listDataProvider.options['XNODE.XN_WHITE_LIST.SUB_ID, XNODE.XN_WHITE_LIST.SUB_ID'but it didn't work while for person data table
items="#{HelloSh.personDataProvider.options['PERSON.PERSONID,PERSON.NAME']}"it is working
when i am writting items="24,28" in dropdown1 box
& printing its value in static text Like
<webuijsf:staticText id="staticText3" style="position: absolute; left: 72px; top: 120px" text="#{HelloSh.dropDown1.items}"/> it is printing fine .
Plz help me in this regard.
Any clarification if needed plz let me know.
Thanks in advance.<h:selectOneMenu id="menu1" styleClass="selectOneMenu">
<f:selectItems value="*#{selectitems.pc_DynamicPortletEdit.regList}*" />
</h:selectOneMenu>When we bind the list to the h:selectOneMenu the code in the JSP will be as given above.
My doubts here are
1) But when i tried to bind the list to a selectonemenu the code in the JSP is looking like this one
<h:selectOneMenu id="menu1" styleClass="selectOneMenu">
<f:selectItems value="*#{selectitems.pc_DynamicPortletEdit.regList.regList.toArray}*" />
</h:selectOneMenu>2) Also in the runtime instead of displaying the values in the dropdown, i am getting the object names (javax.faces.model.SelectItem@680d0ccc) in the drop down.
What am I doing wrong? Any help here would be usefull for me.
BTW,
the code in the backing bean for setting the values is like this
List dropListValue = new ArrayList();
for (int x=0; x<result.length; x++){ //where result is array of string values
SelectItem tempSelect = new SelectItem();
tempSelect.setLabel(result[x]);
tempSelect.setValue(result[x]);
dropListValue.add(result[x]);
this.setRegList(dropListValue );The bean is in request scope only. -
Accessing entity class field values in a visual JSF page
There is a convenient way to access a session values into a JSF visual page using the following:
String mySessionValue = (String) getValue("#{sessionScope.name}");Like the same, are there any ways to access entity class field values into a visual JSF page? Are there any concepts similar to "entityClassDataProvider" that can be linked to a table component in a visual JSF page?
Thank you.My question is about (Netbeans visual pack) Java Persistence API and how to display the information from an entity class to a JSF page. But the above mentioned tutorial is about the ordinary visual table presentation.
Thank you. -
Download Global Class attributes
Hi...
I want to download the global class attributes into an excel. when i checked the menu there is no such option.. Is that possible to do.. Can anyone guide me...
Thanks in advance.
Kalpanashri Rajendran.Hi,
Assuming you are asking specifically about the global class "Attributes" and not all information about the global class itself. To get the "Attributes" in a spreadsheet you can try this work-around:
1. Run transaction SE84 Repository Info System.
2. Expand the "Class Library" branch.
3. Double-click the "Attributes" node.
4. Enter your global class name and run the search.
5. Once the list of attributes is displayed, choose menu path System -> List -> Save -> Local File.
6. Choose "Spreadsheet" format in the popup.
7. Give a file path and name for your spreadsheet.
8. You should now have a spreadsheet with all the "Attributes" of your global class.
Best Regards,
Jamie -
How to get the column index inside a dataTable
Hello,
before I get staked, there are multiple threads handling familiar topics to the one I'm questioning about but none gives an anwer. If there is one, I'm propably to less skilled to see it.
So here is my Problem: I've build a web-interface to a time-recording system. The hours worked on a certain project are displayed in a dataTable component which is generated out of a mySQL Query. Each entry (column/row) contains a inputText component to display and edit the specific value.
Editing one of these inputText elements now fires a valueChangeEvent which reads the new value and stores it in the database. For that cause I need to know the row- and column-index of the inputText component that fired the event.
Using the getClientId method from the valueChangeEvent I get some Information which makes it possible to calculate the row/column index. A typical clientID looks like "form_table:mainTable:0:_id14". "form_table" is the ID of the form the dataTable is in. "mainTable" is the id of the dataTable component. "0" is the row the component is in. And finally "_id14" stands for the id randomly given to the inputText component by JSF.
My Problem is now, that though I can calculate the column out of the[i] "_id14", this calculation is hardcoded. So everytime I add a component in before the dataTable, the calculation needs to be adjusted in the code.
The Questions:
- How to force a sensefull id indicating a column-index for the inputText components inside the columns of a dataTable?
- Nicer since no workaround: How to get the column-index inside the dataTable on a natural way? (e.g. out of the valueChangeEvent the specific inputText component fires)
After some investigation here on the board and on the net I know multiple ways to get the row index, (Things like component-binding and so on) but I can't find a answer on how to get the column-index.
Thanks to all answers and/or links to things my eyes missed while searching for one....then index 0 becomes index 1 and my program doesn't work properlyThe program works properly, just not as you expect it to.
As you've noticed the table gives you the flexibility to move columns around. So if you move column 0 to column 1, why would you expect to still use 0 as the index? The table manages the reordering of columns for you to make sure the data being displayed in each table column comes from the correct column in the data model.
You can manage this yourself using one of the following methods (I forget which one):
table.convertColumnIndexToModel(int viewColumnIndex)
table.convertColumnIndexToView(int modelColumnIndex)
Or, you can get data from the data model directly:
table.getModel().getValueAt(row, 0); -
Field-symbols as class attribute
Hi Fellas,
Is there a way we can define a field-symbols as a class attribute ? My requirement is that i am dynamically constructing a structure at runtime in my model class and binding the component of this structure to my view fields. I am able to create the structure which is basically ref to cl_abap_structdescr and the problem is when i am binding to the model attribute, i need this to be a structure so that i can address the components as "//model/structure.component".
Please let me know how we can define a field-symbol as a class attribute.
Cheers,
Ram.Hi Ram,
Field-Symbol as class attribute is not possible. Your way to do this by REF TO DATA is the correct way for that.
By default data binding is only possible like this:
Simple field attribute
value=//<model>/<field name>
Structure attribute
value=//<model>/<structure name>.<field name>
Table attribute
value=//<model>/<table name>[<line index].<field name>
If you want to bind to your data reference you have to implement your own getter and setter methods. Read this <a href="http://help.sap.com/saphelp_nw70/helpdata/en/fb/fbb84c20df274aa52a0b0833769057/frameset.htm">http://help.sap.com/saphelp_nw70/helpdata/en/fb/fbb84c20df274aa52a0b0833769057/frameset.htm</a> for further information. In addition to that, you have to implement your own GET_M_S_xxx to return metadata of your structure. By doing all this it is possible to implement a completely dynamic data binding. In the view it looks like the regular Structure attribute: value=//<model>/<data-ref name>.<field name>
Regards,
Thilo -
Importing visual jsf page into another jsp page
Hi
I am developing a web application using jsp and struts. I want to embed a visual jsf page that Ive created into another jsp page (which is a normal jsp page, not a jsf one.)
Ive tried quite a few things but nothing seems to work..
<jsp:include page="Page2.jsp">
Ive surrounded the code in the f:subview tags. still doesnt work.
Ive tried using <jsp:useBean id="Page2" scope="page" class="visualwebapplication.Page2" > .. It does not give me an error, but does not embed the page as well. Do I need to some other code after this to use the above bean to display the page.
Any help would be greatly appreciated.
Regards
Sparsh AgarwalHi
This is the error message that is generated in the tomcat log once i try to load the homePage.do
Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Cannot forward after response has been committed
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: ServletException in '/view/main_right.jsp': Cannot forward after response has been committed
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:923)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Jul 31, 2008 2:27:47 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
javax.servlet.jsp.JspException: ServletException in '/view/main_right.jsp': Cannot forward after response has been committed
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:923)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619) -
Jar files and Main-Class attribute
Sorry, I know there are other topics regarding this argument but none of them helped me solving my problem.
I've tried a thousand time in every possible way, but I still can't run my application from a jar file. I've got a package called client, whose main class is called Client. The package contains a sub-package called Icons. I've put everything into a jar file and added this manifest:
Manifest version: 1.0
Name: client/
Sealed: True
Main-Class: client.Client
But it won't work. I've tried to erase the Sealed part, I've tried "Main-Class: Client" and also "client/Client", I've tried putting into the jar the client directory and I've tried omitting it, but the answer is always the same:
Failed to load main-class header etc.
Can anyone help me? Please, I'm almost desperate!
ThanksHere's the verbose-mode description of what I did.
jar -cfv client.jar clientaggiunto manifesto
aggiunta in corso di: client/(in = 0) (out= 0)(archiviato 0%)
aggiunta in corso di: client/.nbattrs(in = 767) (out= 310)(compresso 59%)
aggiunta in corso di: client/Client.class(in = 533) (out= 340)(compresso 36%)
aggiunta in corso di: client/Client.java(in = 288) (out= 140)(compresso 51%)
aggiunta in corso di: client/ClientForm$1.class(in = 691) (out= 383)(compresso 44%)
aggiunta in corso di: client/ClientForm$10.class(in = 678) (out= 380)(compresso 43%)
aggiunta in corso di: client/ClientForm$11.class(in = 689) (out= 385)(compresso 44%)
aggiunta in corso di: client/ClientForm$2.class(in = 686) (out= 379)(compresso 44%)
aggiunta in corso di: client/ClientForm$3.class(in = 686) (out= 381)(compresso 44%)
aggiunta in corso di: client/ClientForm$4.class(in = 686) (out= 380)(compresso 44%)
aggiunta in corso di: client/ClientForm$5.class(in = 686) (out= 383)(compresso 44%)
aggiunta in corso di: client/ClientForm$6.class(in = 718) (out= 399)(compresso 44%)
aggiunta in corso di: client/ClientForm$7.class(in = 718) (out= 400)(compresso 44%)
aggiunta in corso di: client/ClientForm$8.class(in = 718) (out= 399)(compresso 44%)
aggiunta in corso di: client/ClientForm$9.class(in = 718) (out= 398)(compresso 44%)
aggiunta in corso di: client/ClientForm.class(in = 33070) (out= 13510)(compresso 59%)
aggiunta in corso di: client/ClientForm.form(in = 131398) (out= 4521)(compresso96%)
aggiunta in corso di: client/ClientForm.java(in = 73435) (out= 6863)(compresso 90%)
aggiunta in corso di: client/Icons/(in = 0) (out= 0)(archiviato 0%)
aggiunta in corso di: client/Icons/brick.gif(in = 1044) (out= 1049)(compresso 0%)
aggiunta in corso di: client/Icons/corpo.gif(in = 4011) (out= 3400)(compresso 15%)
aggiunta in corso di: client/Icons/door.gif(in = 1092) (out= 1097)(compresso 0%)
aggiunta in corso di: client/Icons/floor.gif(in = 1102) (out= 1107)(compresso 0%)
aggiunta in corso di: client/Icons/mappa.gif(in = 20901) (out= 20575)(compresso 1%)
aggiunta in corso di: client/Icons/paesaggio.gif(in = 18962) (out= 18603)(compresso 1%)
aggiunta in corso di: client/Icons/sole.gif(in = 7063) (out= 6546)(compresso 7%)
aggiunta in corso di: client/Icons/trap.gif(in = 1062) (out= 1067)(compresso 0%)
aggiunta in corso di: client/Icons/void.gif(in = 842) (out= 847)(compresso 0%)
aggiunta in corso di: client/Listener.class(in = 1869) (out= 1136)(compresso 39%)
aggiunta in corso di: client/Listener.java(in = 2296) (out= 708)(compresso 69%)
aggiunta in corso di: client/manifesto.txt(in = 62) (out= 58)(compresso 6%)
aggiunta in corso di: client/ScorciatoieDialog$1.class(in = 740) (out= 391)(compresso 47%)
aggiunta in corso di: client/ScorciatoieDialog$PopupListener.class(in = 1579) (out= 773)(compresso 51%)
aggiunta in corso di: client/ScorciatoieDialog.class(in = 3524) (out= 1638)(compresso 53%)
aggiunta in corso di: client/ScorciatoieDialog.form(in = 8500) (out= 910)(compresso 89%)
aggiunta in corso di: client/ScorciatoieDialog.java(in = 5676) (out= 1222)(compresso 78%)
jar umf mainclass.txt client.jar[NOTE: mainclass.txt only contains the line "Main-Class: client.Client"]
java -jar client.jarFailed to load Main-Class manifest attribute from
client.jar
I've also tried to manually create a MANIFEST.MF file that only contained the following lines:
Manifest Version: 1.0
Main-Class: client.Client
guess what was the result?
java -jar client.jarException in thread "main" java.io.IOException: invalid manifest format
at java.util.jar.Manifest.read(Manifest.java:193)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at java.util.jar.JarFile.getManifest(JarFile.java:158)
>
the same procedure with the addition of "Name: client/" before the main-class attribute generated the usual "Failed to load Main-Class manifest attribute" result. So now what?!? I'm getting crazy.... -
Error : 'ResourceDictionary' root element is a generic type and requires a x:Class attribute to support the x:TypeArguments attribute specified on the root element tag.
Hi,
I get this error when i include some namespaces in my ResourceDictionary to specify a Style for a custom control.
Can anyone help me?
Thx
StardustyHi,
That's the whole point. I don't want to use x:TypeArguments on a ResourceDictionary but the compiler says it needs it.
And i don't know why.
This code give no error:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespaceystem;assembly=mscorlib">
</ResourceDictionary>
And by adding 3 namespaces it gives that weard error:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:MyTime.View.Controls"
xmlns:converters="clr-namespace:MyTime.View.Converters"
xmlns:validationrules="clr-namespace:MyTime.View.ValidationRules"
xmlns:sys="clr-namespaceystem;assembly=mscorlib">
</ResourceDictionary> -
How to get SINGLE-VALUE attribute definition?
I can get the attribute definition using the following code.
// Get an attribute of that type
Attributes attrs = ctx.getAttributes("cn=Ted Geisel, ou=People",
new String[]{"cn"});
Attribute cnAttr = attrs.get("cn");
// Get its attribute definition
DirContext cnSchema = cnAttr.getAttributeDefinition();
// Get cnSchema's attributes
Attributes cnAttrs = cnSchema.getAttributes("");but all I get is SYNTAX, NAME, X-ORGIN, NUMERICOID, and DESC. In Ldap Administrator I can view the schema and under attribute types I can see SINGLE-VALUE, USAGE etc... Can anyone tell me why I can't see these values or how I can retrieve them. Thanks.Hi Sima,
then another short hint to the WD_USAGE_INITIALIZE.
Go to the component workbench, open the component BT115QH_SLSQ. Go now to the component controller class, go to it's methods. You will see that in the coding of the Method WD_USAGE_INITIALIZE, on the class CL_BT115QH__BSPWDCOMPONEN_IMPL:
WHEN 'CUGSCM' OR 'CUGSCM_DET'.
CALL METHOD iv_usage->bind_context_node
EXPORTING
iv_controller_type = cl_bsp_wd_controller=>co_type_custom
" iv_name = 'ContentManagementCuCo' "Custom Controller Name
iv_name = 'BT115QH_SLSQ/CUGSCMGenCuCo' "Custom Controller Name
iv_target_node_name = 'CMBO' "Name of Node in this Custom Controller
iv_node_2_bind = 'CMBUSOBJ'. "Name of Node in used component GS_CM
CALL METHOD iv_usage->bind_context_node
EXPORTING
iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_name = 'BT115QH_SLSQ/CUGSCMGenCuCo'"#EC NOTEXT
iv_target_node_name = 'ATTRIBUTES' "#EC NOTEXT
iv_node_2_bind = 'ATTRIBUTES'. "#EC NOTEXT
Now I checked the context on the component controller and it contains the statusH, the node which you want to use in the component GS_CM. So make sure to prepare the GS_CM component by adding the Status context, and afterwards just add the binding in the code I pointed out above.
Best regards,
Erika -
Set text in Visual JSF textfield from javascript
HI,
I want to pass a variable from a javascript to put into a visual jsf textfield that is connected to a Bean variable like this:
<webuijsf:textField id="myLat" style="left: 96px; top: 336px; position: absolute" text="#{CreateNewPage.latitude}"/>
I use this library: xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
I found a guide for this using regular jsf-tags, but that doesn't work for the visual jsf tags. Link: http://balusc.blogspot.com/2009/05/javajspjsf-and-javascript.html
I managed though to change the field to some sort of text by using:
var lat = 'text';
document.getElementById("form1:myLat").textContent = lat;
in my javascript. But this just replaces the textfield to some stand alone text, and the variable in my Bean isn't changed at all. I tried using .value and .text instead of .textContent but it doesn't work. What am I doing wrong here? I'm new to JSF by the way. Thankful for any help.I've now read the article and understand everything better. Also funny that I got a reply from the author of it here :)
Sadly I have to use javascript I believe since I'm using a google maps api that uses it.
Anyway, I still can't get it to work properly.
now my jsp look like:
<webuijsf:form id="myForm">
<webuijsf:textField id="my2" style="left: 528px; top: 0px; position: absolute" text="#{EditPage.latFromMap}"/>
</webuijsf:form>
and in my JS:
document.getElementById("myForm:my2").text = 'text';
document.getElementById("myForm").submit();
I now get to the setLatFromMap() setter Method for my variable in my EditPage bean, but when I do a print out of it it's null. Also the textfield on my page becomes blank after the refreshing of the page. of Am I still missing some of the concepts? thx
Maybe you are looking for
-
Purchase Requesition to Purchase Order
Hi Good Morning Friends I am facing some problem whicle using ME59 and ME59n (Automatic creation of purchase order from requesition) We are generation Req from Service Order or sales Order where Fixed vendor is coming by default but when we want to u
-
Hi, Please help me, I need to make a ALV report, which is having one field editable. I want a code , when i will give input in editable field in ALV report , it should be save in my internal table. Please give me a sample program , like take a intern
-
My iPod nano 5th generation got wet and now the backlight is so weak I can barley read anything on it. Also, it won't turn on unless it is plugged in (i.e. to a stero or my Mac), so I cant listen to it anywhere but in my house! Help!
-
I run windows 8 and have trouble loading elements 10. I get this error message as displayed in this screen dump. Any idea how to fix it?
-
How do I know if my Mac pro has new viruses?
While im working with my laptop my trackpad starts to automatically open up other folders without me clicking on it. Is this a sign of having a virus on my laptop or is there a problem with my trackpad?