[JBoss Seam] - <h:selectOneRadio> inside <h:dataTable>
by asookazian
using Seam 1.2.1.GA and JBoss 4.0.5.GA with MyFaces, I'm able to render the Yes/No radio button outside of a dataTable but not inside one. Anybody know what I'm doing wrong here?? I duplicated some member variables and methods in both .java classes to "try things" since it wasn't rendering the radio buttons inside the dataTable.
In h:dataTable, it doesn't make a difference if I reference the backing bean or the Car POJO for the currentCar and carRadioButtons getter EL methods... Any tips would be appreciated. thx.
test3.xhtml:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| template="layout/template.xhtml">
|
| <ui:define name="body">
|
| <h:dataTable value="#{carBean.myCars}" var="myRow" >
|
| <h:column>
| <f:facet name="header">VIN</f:facet>
| <h:outputText value="#{myRow.VIN}"/>
| </h:column>
|
| <h:column>
| <f:facet name="header">model</f:facet>
| <h:outputText value="#{myRow.model}"/>
| </h:column>
|
| <h:column>
| <f:facet name="header">make</f:facet>
| <h:outputText value="#{myRow.make}"/>
| </h:column>
|
| <h:selectOneRadio value="#{myRow.currentCar}">
| <f:selectItems value="#{myRow.carRadioButtons}" />
| </h:selectOneRadio>
| </h:dataTable>
| outside datatable
|
| <h:selectOneRadio value="#{carBean.currentCar}">
| <f:selectItems value="#{carBean.carRadioButtons}" />
| </h:selectOneRadio>
|
|
| </ui:define>
| </ui:composition>
CarBean.java session-scoped backing bean:
package com.cox.beans.session;
|
| import java.util.ArrayList;
| import java.util.List;
|
| import javax.faces.model.SelectItem;
|
| import com.cox.beans.entity.Car;
|
| public class CarBean {
|
| private List<SelectItem> myRadioButtonList;
|
| private List<Car> myCarList;
|
| private String currentCar;
|
| public List<SelectItem> getCarRadioButtons() {
| myRadioButtonList = new ArrayList<SelectItem>();
| myRadioButtonList.add(new SelectItem("1", "Yes", "Yes it is"));
| myRadioButtonList.add(new SelectItem("2", "No", "No it isn't"));
| return myRadioButtonList;
| }
|
| public void setCarRadioButtons(List<SelectItem> myRadioButtonList) {
| this.myRadioButtonList = myRadioButtonList;
| }
|
| public void setCurrentCar(String currentCar) {
| this.currentCar = currentCar;
| }
|
| public String getCurrentCar() {
| return currentCar;
| }
|
| public List getMyCars() {
| myCarList = new ArrayList<Car>();
| Car car1 = new Car("123", "Diablo", "Lamborghini");
| Car car2 = new Car("456", "Corolla", "Toyota");
| Car car3 = new Car("789", "Accord", "Honda");
| myCarList.add(car1);
| myCarList.add(car2);
| myCarList.add(car3);
| return myCarList;
| }
|
| }
Car.java POJO:
package com.cox.beans.entity;
|
| import java.util.ArrayList;
| import java.util.List;
|
| import javax.faces.model.SelectItem;
|
|
| public class Car {
|
| private String VIN;
|
| private String model;
|
| private String make;
|
| private List<SelectItem> myRadioButtonList;
|
| private String currentCar;
|
| public List<SelectItem> getCarRadioButtons() {
| myRadioButtonList = new ArrayList<SelectItem>();
| myRadioButtonList.add(new SelectItem("1", "Yes", "Yes it is"));
| myRadioButtonList.add(new SelectItem("2", "No", "No it isn't"));
| return myRadioButtonList;
| }
|
| public void setCarRadioButtons(List<SelectItem> myRadioButtonList) {
| this.myRadioButtonList = myRadioButtonList;
| }
|
| public void setCurrentCar(String currentCar) {
| this.currentCar = currentCar;
| }
|
| public String getCurrentCar() {
| return currentCar;
| }
|
|
| public Car(String VIN, String model, String make) {
| this.VIN = VIN;
| this.model = model;
| this.make = make;
| }
|
| public String getVIN(){
| return VIN;
| }
|
| public void setVIN(String VIN) {
| this.VIN = VIN;
| }
|
| public String getModel(){
| return this.model;
| }
|
| public void setModel(String model) {
| this.model = model;
| }
|
| public String getMake(){
| return this.make;
| }
|
| public void setMake(String make) {
| this.make = make;
| }
|
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090848#4090848
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090848
18Â years, 6Â months
[JBossWS] - wsdl based web-service (like a paypal simulator)?
by rocken7
Kind of confused, so I'll explain.
I'm trying to simulate the paypal soap stack by using the paypal wsdl file.
I generate the source from the wsdl and can use the @WebServiceClient against the paypal sandbox web service and works great.
I can't seem to roll my own @WebService of that for a number of reasons.
Here are my service annotations:
| @Stateless
| @WebService(endpointInterface="ebay.api.paypalapi.PayPalAPIAAInterface", name = "PayPalAPIAA", targetNamespace = "urn:ebay:api:PayPalAPI", wsdlLocation="http://localhost:8080/txs/wsdl/PayPalSvc.wsdl")
| @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
| public class PaypalSoapSimulator implements PayPalAPIAAInterface { ... }
|
Here is a working (against the true paypal sandbox) paypal client service class (annotations):
| @WebServiceClient(name = "PayPalAPIInterfaceService", targetNamespace = "urn:ebay:api:PayPalAPI", wsdlLocation = "http://localhost:8080/txs/wsdl/PayPalSvc.wsdl")
| public class PayPalAPIInterfaceService extends Service { ... }
|
Now I deploy an .ear with an embedded and working .war that does have the wsdl + xsd files in the web root (/txs). I have a .jar with ejb3 entity pkgs and my PaypalSoapSimulator class (this might be an issue).
Note: a copy of the wsdl and xsd files is in the webroot under the /wsdl folder. I have hard-coded the xsd import(s) to use an absolute url but I've also tried using the default local filename.
When jboss-4.0.5.GA (with jbossws 2.0.1.GA) starts up it hangs:
2007-10-02 21:52:19,590 DEBUG [org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder] processSOAPBinding on: ebay.api.paypalapi.PayPalAPIAAInterface
| 2007-10-02 21:52:19,590 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] setParameterStyle: BARE
| 2007-10-02 21:52:19,606 DEBUG [org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory] parse: http://localhost:8080/txs/wsdl/PayPalSvc.wsdl
| 2007-10-02 21:58:59,903 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
| 2007-10-02 22:06:29,903 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
|
It hangs forever and ever and nothing deploys .... can't see the wsdl file in the browser either (404).
Can someone point me to a valid example of creating wsdl-based @WebService, and how to implement the service interface, and the proper annotations (esp. for specific wsdlLocation, even a file based location would be super cool as that seems like black magic b/c noone shows how its done).
Also a layout of the deploy bundle for this: does my ejb3 .jar require specifics to roll the @WebService or are the annotations enough?
Should my @WebService be in the .war with something special in the web.xml file for mapping?
Is this a bug in the sense that jboss hangs forever?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090846#4090846
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090846
18Â years, 6Â months