JAXB - when java beans contain lists of each other

I have two classes:
class A {
private List<B> bList;
class B {
private List<A> aList;
}It is like this due to the relationships they have in the database and our beans are mapped that way. When putting through JAXB , however, I would like the XML to only have A as the parent and then the list of B, not each B to list it's list of A, if that makes any sense.
So I want
<A>
<B>
<B>
</A>
not
<A>
<B>
<A>
</A>

I have two classes:
class A {
private List<B> bList;
class B {
private List<A> aList;
}It is like this due to the relationships they have in the database and our beans are mapped that way. When putting through JAXB , however, I would like the XML to only have A as the parent and then the list of B, not each B to list it's list of A, if that makes any sense.
So I want
<A>
<B>
<B>
</A>
not
<A>
<B>
<A>
</A>

Similar Messages

  • N my house we have 2 iphone 4, and everytime we get the same contact list freom each other, how can we unsync the contacts so each user keeps thir own contact list?

    n my house we have 2 iphone 4, and everytime we get the same contact list freom each other, how can we unsync the contacts so each user keeps thir own contact list?

    Hi user 1724, before icloud, we had the same issue.... 
    so yes,  the solution was to  each log  into the mac separately.
    i kept the main itunes library and apple id, and my son made his own itunes library (which linked to the main itunes/apple id)   - so we were able to maintain separate contacts lists.
    but then w/ the cloud i guess we assumed the cloud would know we each have different contact lists on diff. phones, but it seems the cloud just lumped it all together -

  • Cursor hilight zone when java bean works

    Hello
    I have a problem with a forms that allows to get data in a text field but also contain a java bean that works periodically (every 5 sec).
    When the java bean makes a work, the cursor hilights the field and seems to select the datas of the zone.
    So it 's not possible continue to write data inside the field because the next action often destroy the selected data.
    Is there a way to force form to leave the cursor in a textfield zone even if a java bean works ?
    thank's for your help.
    Mike.

    Hello,
    Why don't you put the Keep cursor position property to yes on the Text Item ?
    Francois

  • Problem in moving the java beans code from computer to other

    Hi,
    I am working on building a webservice. I started building the EJB teir compnents like (Entity beans, Sessions beans, data base schemas) using the SUN ONE STUDIO 5 and SUN ONE App Server 7.0.
    The problem, if I want to move the same entity beans code from one computer to other computer.
    I am using same platform except the operating system (XP, and Windows 2000), apart from this every thing is same (Sun one studio 5, sun one app server 7.0). The Entity beans are working on the source computer and tested the beans. But When I moved the code to other computer, I compiled the entity beans code and it compiled perfectly. Then I tested the entity bean, I generated the test client, and deployed it. Till now no problem. When I tried to excute it and invoke the functions then it giving the following error:
    Is there any solution, so that I can avoid coding from scrath again when I want to use same on other computer.
    [22/Sep/2003:10:29:39] SEVERE ( 1616):
    javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:615)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:247)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.jdoGetInstance(AppNumInfoBean_535499553_ConcreteImpl.java:905)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.ejbLoad(AppNumInfoBean_535499553_ConcreteImpl.java:693)
    at com.sun.ejb.containers.EntityContainer.callEJBLoad(EntityContainer.java:2372)
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1362)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.getDatelastapp(AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.java:113)
    at Data._AppNumInfo_Stub.getDatelastapp(Unknown Source)
    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:324)
    at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:136)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1378)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_53
    [22/Sep/2003:10:32:00] INFO ( 1616): Bean AppNumInfo method ejbLoad:
    com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:615)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:247)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.jdoGetInstance(AppNumInfoBean_535499553_ConcreteImpl.java:905)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.ejbLoad(AppNumInfoBean_535499553_ConcreteImpl.java:693)
    at com.sun.ejb.containers.EntityContainer.callEJBLoad(EntityContainer.java:2372)
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1362)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.setDatelastapp(AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.java:138)
    at Data._AppNumInfo_Stub.setDatelastapp(Unknown Source)
    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:324)
    at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:136)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    [22/Sep/2003:10:32:00] SEVERE ( 1616): EJB5017: Exception while running preinvoke : ejbName = [AppNumInfo]
    [22/Sep/2003:10:32:00] SEVERE ( 1616):
    javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:615)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:247)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.jdoGetInstance(AppNumInfoBean_535499553_ConcreteImpl.java:905)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.ejbLoad(AppNumInfoBean_535499553_ConcreteImpl.java:693)
    at com.sun.ejb.containers.EntityContainer.callEJBLoad(EntityContainer.java:2372)
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1362)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.setDatelastapp(AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.java:138)
    at Data._AppNumInfo_Stub.setDatelastapp(Unknown Source)
    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:324)
    at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:136)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1378)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_53

    There appears to be either a portion that didn't get recompiled, or perhaps a hard-coded GUID-type number within the application. Carefully go over the elements in the application that were hard-coded to run on the other machine -- were they have all been migrated?

  • IMessage works fine for me and my friend when talking with other Apple guys but doesn't work when we want to chat with each other

    Hello. Both me and my friend has got an iPhone. We both have the newest version of iOS7. We both have iMessage turned on and it works for both of us while we want to chat with other iPhone/iPad/iPod friends. But... when we want to send each other an iMessage... it doesn't work. Let's say my friend's contact name is "D" so i go to Messages -> New Message and in the recipient field i write D. I can choose her number and if it was iMessage "D" would obviously turn in blue like it does. But no, it turnes green and forces me to send normal SMS as if she didn't have an Apple device. Please help, klejbroda.

    Make sure the send address you are using for the friend (and vice versa) are actually one of those you have set for iMessage.

  • I just upgraded to the new OS.  Now my wife and I are getting each others texts, and when we send a text to each other, it duplicates.  How can we separate our text messages?

    My wife and I are getting each other's text messages.  How do I turn that off so I get mine and she gets hers?

    On each Device, go to Settings>Messages>Send and Receive...  and make certain that each device only has 2-items with check marks your phone number and your email address.  click on the other persons number and email address such that it is not checked.

  • Parallelly scrolling two list with each other.

    Hi All,
    I am new in windows phone 8 development. MY issue is i want to scroll two list simultaneously with other. Means if i scroll first list then other list should be scroll parallelly with first list ,so that we can display data of same index of both list parallelly.
    How can achieve this in windows phone 8.
    In Android and Iphone they are able to do this features. 
    Please help me.
    Thanks in advance.

    Thanks Vineet for your response.
    Can you please show me your xaml code where i have to put scrollviewer in listbox. I am unable to scroll second list with first list. My xaml code is below for first listbox.
    <ListBox Grid.Row="1" Background="#1D1C1A" Name="lstChannelList" VerticalAlignment="Top" ItemsSource="{Binding}"
    ScrollViewer.VerticalScrollBarVisibility="Visible" SelectionChanged="lstChannelList_SelectionChanged" LayoutUpdated="lstChannelList_LayoutUpdated" >
    <ListBox.ItemTemplate>
    <DataTemplate>
    <ScrollViewer VerticalAlignment="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" >
    <StackPanel Orientation="Horizontal">
    <Grid Margin="0,0,3,0" Grid.Row="0" Background="{Binding color}" >
    <Grid.RowDefinitions>
    <RowDefinition Height="60"/>
    <RowDefinition Height="5"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="50"/>
    <ColumnDefinition Width="10*"/>
    </Grid.ColumnDefinitions>
    <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" Text="{Binding number}" Foreground="{Binding forcolor}" FontWeight="Bold"/>
    <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Text="{Binding channel_name}" Foreground="White" HorizontalAlignment="Left"/>
    <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Background="Gray" Width="800" Height="3"/>
    </Grid>
    </StackPanel>
    </ScrollViewer>
    </DataTemplate>
    </ListBox.ItemTemplate>
    <ListBox.ItemContainerStyle>
    <Style TargetType="ListBoxItem">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>
    </ListBox.ItemContainerStyle>
    </ListBox>
    and second list xaml are below.second list data are static.
    <ListBox Grid.Row="1" Background="#1D1C1A" Name="lstChannel" VerticalAlignment="Top" ItemsSource="{Binding}"
    ScrollViewer.VerticalScrollBarVisibility="Visible" >
    <ListBox.ItemTemplate>
    <DataTemplate>
    <ScrollViewer VerticalAlignment="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" Width="480">
    <StackPanel Orientation="Vertical">
    <Grid Margin="0,0,3,0" Grid.Row="0" Background="{Binding forcolorside}">
    <Grid.RowDefinitions>
    <RowDefinition Height="60"/>
    <RowDefinition Height="5"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    <ColumnDefinition Width="1*"/>
    <ColumnDefinition Width="3"/>
    </Grid.ColumnDefinitions>
    <StackPanel Background="Gray" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Width="3" />
    <Grid Grid.Row="0" Grid.Column="1" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </Grid>
    <StackPanel Background="Gray" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right" Width="3" />
    <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="3" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </StackPanel>
    <StackPanel Background="Gray" Grid.Row="0" Grid.Column="4" HorizontalAlignment="Right" Width="3" />
    <Grid Grid.Row="0" Grid.Column="5" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </Grid>
    <StackPanel Background="Gray" Grid.Row="0" Grid.Column="6" HorizontalAlignment="Right" Width="3" />
    <Grid Grid.Row="0" Grid.Column="7" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </Grid>
    <Grid Background="Gray" Grid.Row="0" Grid.Column="8" HorizontalAlignment="Right" Width="3" />
    <Grid Grid.Row="0" Grid.Column="9" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </Grid>
    <Grid Background="Gray" Grid.Row="0" Grid.Column="10" HorizontalAlignment="Right" Width="3" />
    <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="11" Background="{Binding forcolorside}">
    <TextBlock VerticalAlignment="Center" Text="Pluto pick's 2014" Foreground="White" TextTrimming="WordEllipsis" HorizontalAlignment="Left"/>
    </StackPanel>
    <Grid Background="Gray" Grid.Row="0" Grid.Column="12" HorizontalAlignment="Right" Width="3" />
    <StackPanel Grid.Row="1" Grid.ColumnSpan="13" Background="Gray" Width="500" Height="3"/>
    </Grid>
    </StackPanel>
    </ScrollViewer>
    </DataTemplate>
    </ListBox.ItemTemplate>
    <ListBox.ItemContainerStyle>
    <Style TargetType="ListBoxItem">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>
    </ListBox.ItemContainerStyle>
    </ListBox>
    Both list have six rows. and second list i am displaying above first list. So i want to parallelly rotate item of both list if any list scrolling. Please show me your XAML.
    I am unable to scroll second list if first list is scrolling above.
    Thanks once again vineet.

  • Java Lottery - relating arrays to each other

    Hello all and thank you for taking the time to read my problem.
    I am trying to create a program that asks the user for their name, then how man tickets they would like, then they enter 6 numbers for each ticket.
    The maximum amount of 6 number tickets that can be bought is 20.
    So for example user1 could get three tickets, user2 could get 10 tickets and user3 could get 7 tickets (20 in total).
    My main headache is how to relate the ticket numbers entered with the persons username.
    I assume that if user1 gets three tickets these are stored in an array [6] [20] but then when user2 puts their lines on how do I print out at the end who has which tickets?
    Also the maximum array size for tickets is [6] [20]...but what if only one user buys 3 tickets and does not use up the remaining 17 tickets, does this affect how I define the array?
    Thanks again, all help welcome!

    This is sort of what they were talking about, this is an object oriented approach.
    There should be no 2D arrays, just arrays of Objects that contain data about themselves or perhaps more Objects.
    Try to make your code look more like this.
    import java.util.*;
    public class Lottery {
        private LinkedList<Person> line = new LinkedList<Person>();
        public Person nextInLine() {
            line.add( new Person() );
            return line.getLast();
        public void showTicketsPurchased() {
            System.out.println( "\nTickets Purchased:");
            for( Person p: line ) {
                p.showTicketsPurchased();
        class Person {
            private LinkedList<Ticket> tickets= new LinkedList<Ticket>();
            void buyTicket( int num1, int num2, int num3, int num4, int num5, int num6 ) {
                try {
                    tickets.add( Ticket.sellTicket( num1, num2, num3, num4, num5, num6 ) );
                    System.out.println( "Bought Ticket: " + tickets.getLast() );
                } catch (NoSuchElementException nsee) {
                    System.out.println( nsee.getMessage() );
                    System.out.println( "Could not buy ticket, it's sold out");
            public void showTicketsPurchased() {
                for ( Ticket t: tickets ) {
                    System.out.println( t );
        public static void main( String[] args ) {
            Lottery lottery = new Lottery();
            Person servingThisPerson;
            //First person in line
            servingThisPerson = lottery.nextInLine();
            servingThisPerson.buyTicket( 1,2,3,4,5,6 );
            servingThisPerson.buyTicket( 2,3,4,5,6,7 );
            //Second person in line
            servingThisPerson = lottery.nextInLine();
            servingThisPerson.buyTicket( 10, 20, 30, 40, 50, 60 );
            servingThisPerson.buyTicket( 20, 30, 40, 50, 60, 70 );
            lottery.showTicketsPurchased();
    import java.util.*;
    public class Ticket {
        public static final int MAX_NUM_TICKETS = 20;
        private static int numTicketsSold = 0;
        private int[] numbers;
        private Ticket( int num1, int num2, int num3, int num4, int num5, int num6 ) {
            numbers = new int[]{ num1, num2, num3, num4, num5, num6 };
            numTicketsSold++;
        public static Ticket sellTicket( int num1, int num2, int num3, int num4, int num5, int num6 ) {
            if( numTicketsSold < MAX_NUM_TICKETS ) {
                return new Ticket( num1, num2, num3, num4, num5, num6 );
            } else {
                throw new NoSuchElementException("Tickets sold out");
         * Don't want people to change the tickets numbers after it has been created.
         * @return copy of tickets numbers, not the original array
        public int[] getTicketNumbers() {
            return Arrays.copyOf( numbers, numbers.length );
        public String toString() {
            return Arrays.toString( numbers );
    }Brushfire,

  • Synchronizing multiple lists with each other

    Hi,
    here's my use case, which I am having trouble to solve properly:
    In a chat application there are contacts on a roster. From each contact the user can receive messages, which are indicated with a blinking circle near the contact as long as they are unread (similar to Skype).
    There are other events like chat invitations, contact requests, multi-user-chat messages.
    All of them are currently maintained in separate lists, e.g. each contact and each chat room has a list of unread messages.
    Now I want to display ONE "super/global" list of ALL unread messages, i.e. a list which is a accumulation of all "small" lists.
    contact1 => 2 unread messages
    contact2 => 3 unread messages
    chatroom1 => 7 unread messages
    global list => 12 unread messages.
    If I remove one item from the global list it shall also be removed from the associated "small" list. And if remove an item from a small list it should also be removed from the global list.
    How can I do this in the most clever way?
    Another thought I had: Maybe I should only maintain the global list and let each "small" list register on that list to watch for changes. Actually the small lists are only "views" or "filtered lists" of the global one.
    Things I've had in mind to look for:
    FilteredList
    Extractors (FXCollections.observableArrayList(new Callback<T, Observable[]>)
    Bindings.bindContent
    Thanks for sharing your ideas!

    Turn off Facetime on iPhone or iPad. Go to Setting -> Facetime.
    Turn off the one you don't want to use facetime.

  • Best approach for building dialogs based on Java Beans

    I have a large amount of Java Beans with several properties each. These represent all the "data" in our system. We will now build a new GUI for the system and I intend to reuse the beans as far as possible. My idea is to automatically generate the configuration dialogs for each bean using the java.beans package.
    What is the best approach for achieving this? Should I use PropertyEditors or should I make my own dialog-generator using the Introspetor class or are there any other suitable solutions?
    All suggestions and tips are very welcome.
    Thanks!
    Erik

    Definitely, it is better for you to use JTable. Why not try it?

  • Missing Enterprise Java Beans Node

    I downloaded the Studio Creator 30 day trial version.
    But In the server navigator pane there is no Enterprise Java Beans node listed.
    How can I enable the Enterprise Java Beans Node in Studio Creator? Or is it a limited version?
    Please reply asap.
    Thanks in advance

    Hi.
    Porduct version information was as follows....
    Java Studio Creator(Build 040903).
    Does this mean that I need to upgrade my IDE to update 7?
    Thanks a lot for the reply. I almost spent half a day trying to enable the Enterprise Java Beans Node using creator options.
    And can I deploy an ear file to creator which I have compiled using JDK1.5?
    Thanx again.
    Look forward to hearsing from u soon,
    Kevin

  • How to configured different AD sites mailbox user able to send & receive mail to each other?

    I have 2 system in one system i configured DC=Yahoo.com + Xchange07 & on 2nd sytem i configured DC=Google.com + Xchange 07 successfully configured (in VMware)
    I already made entry of Both DC's DNS entry of New Host record & NewMail Exchanger (MX)
    both DC ping each other with DC name i.e. yahoo.com DC ping to google.com & vice-versa.
    Same AD site mailbox user able to send & receive mail but google.com mailbox user can't send & receive mail from yahoo.com as vice-versa.

    Hi,
    I recommend you check if you can telnet the other CAS/HT server on port 25 from each side.
    If it connects, is there any error message or NDR when sending or receiving email from each other?
    If it fails, please check if port 25 is open. If you have a firewall enabled, please make sure that port 25 is open. Besides, please check whether the DNS records have been configured correctly.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • HT4191 Notes - my ipad and mac are synching to each other but not to iCloud?

    i believe i have set up icloud properly. My Ipad and my Mac are synching Notes to each other but they are not synching properly to Icloud.
    I have also set up Calendar to synch on all of the 2 devices and the Icloud and those three things all synch fine.
    any thoughts?

    As long as both devices are compatible with iCloud, it should work. When you say they sync with each other, does that mean via iTunes? Go to iCloud.com and check what if any content is being synced.
    http://www.apple.com/support/icloud/

  • Problems with the ActiveX bridge for Java beans when using third-party .jar

    I encountered the following problem when using the ActiveX bridge for a java bean:
    I am using JDK 1.4.2_09 and MS Visual Basic 6.0 (SP6). I wrote a java bean called ProcessViewer (my class ProcessViewer inherits from JComponent and implements the interfaces Serializable and AdjustmentListener) which I would like to use within a VB 6.0 application. I used the ActiveX bridge (packager.exe) to generate a DLL (ProcessViewer.dll) and registered it successfully. The java bean GUI-control works fine within my VB 6.0 application unless my java bean (ProcessViewer.jar) uses any third-party .jar files.
    But when I tried to add a reference to some third-party class (com.sap.xxx.xxx....) I got some problems. I could solve the problem with packager.exe by setting the correct CLASSPATH. But at runtime my VB 6.0 application does not work. It crashes or it reports an error like this: "The control ... could not be loaded from axbridge.dll" (although I deployed my .jar file correctly to the directory C:\Programme\Java\j2re1.4.2_09\axbridge\bin and lib). Setting the CLASSPATH environment variable before calling my VB 6.0 application (exe) did not solve the problem.
    How can I teach my VB 6.0 application (containing the Java bean ActiveX control) where to find the third-party .jar file? Copying the third-party .jar file to the JRE lib-folder or to the axbridge\lib folder did not solve the problem either.
    I studied the documentation about the ActiveX bridge given at:
    http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    but I am missing informations on how the third-party .jar files can be found during runtime of the ActiveX container (e. g. a VB 6.0 application).

    See how to solve your problem with JNI:
    http://codeproject.com/cpp/OOJNIUse.asp
    More examples (for SWING) in tools setup:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]94368[SiteID]simtel.net
    http://www.simtel.net/product.php[id]93174[SiteID]simtel.net

  • Run oracle form 6i contain java bean in web?

    i have already made oracle form 6i contain java bean when i run it in client/server
    there is no errors but there is no bean to appear when i invoke it?
    and i'd like to put this form in the oracle application suite

    I think it is better for you to ask this question in Oracle Forms/Oracle Forms Server development forum.
    This issue would better addressed in Development forums.
    Just my 0.02£
    Yury

Maybe you are looking for

  • For loop interrupt

    Attached please find my test vi(i use while loop instead of for loop,cause my labview version is 8.2, which don't have interrupt condition item in for loop. ) i wanted to stop the vi while the vi was running, such as i pressed the stop button when i

  • TELNET commands doesnt't work

    Hi, We're trying to develop an interface using the Telnet feature within JDeveloper. We've done a simple interface (jspx page) wihch has a simple Command_link pointing to another jsp page. When we test this project within Telnet, the link doesn't wor

  • MAC Address Vendor Codes for Apple?

    Does anyone know if there's a current list of MAC address vendor codes that have been assigned to Apple? I've found a few by searching but I'm not sure how recent they are.

  • Upgrading ODI 10.1.3.4.6 to 10.1.3.5.0

    How to upgrade ODI agent and ODI repository to 10.1.3.5.0? Currently we have ODI agent and repository with version 10.1.3.4. --- Thanks, B

  • HTML template

    Hi, Could any one let me know what's this HTML template 'GENERALHTMLB_DEF'  purpose for ?? While going through HTML templates in SE80 transaction, whereever i come across any def. like '~service = strMask(~service);' **  and once i double click this,