[JBoss Portal] - Re: urgent help required for showing portlet
by maruthig
Hi
To add window to existing portal use this example
Here iam adding child window to the parent portlet
For this u hav to configure 3 xml files
Portlet.xml
Portletinstance.xml
Defaultobject.xml
| portlet.xml
| ....................................
| <portlet>
| <portlet id="child">
| <portlet-name>childPortlet</portlet-name>
| <portlet-class>
| com.counterpane.dashboard.portal.controller.jspportlet.JspPortlet
| </portlet-class>
| <init-param>
| <name>default-view</name>
| <value>/jsf/child.jsp</value>
| </init-param>
| <portlet-preferences>
| <preference>
| <name>contentPage</name>
| <value>/jsf/child.jsp</value>
| </preference>
| </portlet-preferences>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| </supports>
| <portlet-info>
| <title>child</title>
| </portlet-info>
| </portlet>
| portlet-instance.xml
| ........................................
| <deployment>
| <instance>
| <instance-id>childPortletInstance</instance-id>
| <portlet-ref>childPortlet</portlet-ref>
| </instance>
| </deployment>
| defaultobject.xml
| .......................................
| <page>
| <page-name>parent</page-name>
| <properties/>
| <window>
| <window-name>NavigationPortletWindow</window-name>
| <instance-ref>NavigationPortletInstance</instance-ref>
| <region>navigation</region>
| <height>0</height>
| <properties>
| <property>
| <name>theme.windowRendererId</name>
| <value>emptyRenderer</value>
| </property>
| <property>
| <name>theme.decorationRendererId</name>
| <value>emptyRenderer</value>
| </property>
| <property>
| <name>theme.portletRendererId</name>
| <value>emptyRenderer</value>
| </property>
| </properties>
| </window>
| <window>
| <window-name>child</window-name>
| <instance-ref>childPortletInstance</instance-ref>
| <region>choose any reion in ur project</region>
| <height>0</height>
| </window>
| </page>
Note:in the tag choose any region in ur project
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100659#4100659
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100659
17Â years, 2Â months
[JNDI/Naming/Network] - Re: Need to configure JNDI
by waynebaylor
i just copied cluster-service.xml to my deploy dir, you can get in the server/all/deploy dir. if you look about halfway down it you'll see the HA-JNDI specific stuff.
once that was deployed, i restarted jboss with something like
C:\> run.bat -b 0.0.0.0 -g myGroupName the -b tells jboss which ip to bind to (0.0.0.0 means 'i don't know just figure it out'). the -g tells jboss which cluster group to join, the default group is DefaultPartition ( you can replace myGroupName with whatever you want).
you can use an application client to test this. just use the following to get a Context and then perfom a lookup.
Properties p = new Properties();
| p.put(Context.INITIAL_CONTEXT_FACTORY,
| "org.jnp.interfaces.NamingContextFactory");
| p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
| p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI port.
| return new InitialContext(p);
you can also pass a list of URLsp.put(Context.PROVIDER_URL, "server1:1100,server2:1100,server3:1100,server4:1100");
instead of specifying the servers in the group, you can just specify the groupp.put("jnp.partitionName", "myGroupName");
hope this helps
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100655#4100655
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100655
17Â years, 2Â months
[JBossCache] - Migrating to 2.0.0 using PropertyConfigurator
by shelly2k
Hi
We have an 1.x installation of JBoss cache and are looking to move to the 2.0.0 branch.
We configure the cache using a well know remote location, i.e. we serve out the config.xml file from a webserver. All chache clients know the location of the server and configure themselves using the xml file returned via a http request:
| public CacheManager( final InputStream is, final String clusterName ) throws Exception {
| PropertyConfigurator configurator = new PropertyConfigurator();
| TreeCache cache = new TreeCache();
| configurator.configure( cache, xmlConfigUrl );
| configurator.configure( cache, is );
| cache.setFetchInMemoryState( true );
| if ( clusterName != null )
| {
| cache.setClusterName( clusterName );
| }
| cache.start();
| ...
| }
|
How do we do this in 2.0.0. The createCache calls provided by the factory only only seem to take string references or a bool to start it.
I would be very grateful of a pointer in the right direction.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100652#4100652
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100652
17Â years, 2Â months
[JBoss Seam] - dataModel dataModelSelection first row
by hager
hello,
I'm using datamodel and dataModelSelection. I always have the first row selected!
this is my code :
bean.java:
| @DataModel(value = "listeChargesRegies")
| private List<ChargeAssignable> listeChargesRegies;
|
| @DataModelSelection(value = "listeChargesRegies")
| @Out(required = false)
| private ChargeAssignable selectedChargeRegie;
| ....
| public Float getNombreJoursFacturesChargeRegie() {
|
| nombreJoursFactures = new Float(0);
| List<Facture> listeFacture = this.factureList.getResultList();
| Facture facture = null;
| facture = FactureService.trouverFacturePourUnChargeAssignable(listeFacture, this.selectedChargeRegie.getId(), this.selectedChargeRegie.getDiscriminator());
| System.out.println("selectedRegie "+this.selectedChargeRegie.getDiscriminator()+"\t"+this.selectedChargeRegie.getId());
| if(facture != null)
| {
| nombreJoursFactures = facture.getNbJoursFactures();
| System.out.println("nombreJoursFactures facture "+nombreJoursFactures);
| }
| else
| {
| nombreJoursFactures = this.selectedChargeRegie.getChargeEffective();
| System.out.println("nombreJoursFactures facture "+nombreJoursFactures);
| }
| return nombreJoursFactures;
| }
| public void setNombreJoursFacturesChargeRegie(Float nombreJoursFactures)
| {
| this.nombreJoursFactures = nombreJoursFactures;
| this.factureHome.getInstance().setNbJoursFactures(this.nombreJoursFactures);
| }
page.xhtml
<h:dataTable
value="#{listeChargesRegies}"
var="chargeRegie" styleClass="table_s" columnClasses="table_s"
headerClass="th_s" rowClasses="td1_s,td2_s">
<h:column>
<f:facet name="header">
<h:outputText value="#{msgConditionsGenerales.nbJoursFactures}" />
</f:facet>
<h:outputText value="#{reportAvenant.nombreJoursFacturesChargeRegie}" />
</h:column>
</h:dataTable>
when i run my application, I always have the first selectedRegie.What's wrong?? do we must have commandLink ?... because I'm using outputText
please help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100648#4100648
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100648
17Â years, 2Â months