[codenameone-discussions] i have a list view with swipeble container i want to know how to handle action if im swiping container then a button will appear and if im clicking a new form will be shown
i have a list view with swipeble container i want to know how to handle action if im swiping container then a button will appear and if im clicking a new form will be shown how can i handle this this is my code * ArrayList am = gs.getAllm();* *for (Membre i : am) {* *Container ctn1 = new Container(new BoxLayout(BoxLayout.X_AXIS));* *Container ctn2 = new Container(new BoxLayout(BoxLayout.Y_AXIS));* *Label lblSurnom = new Label("Surnom : " + i.getNom());* *ctn2.add(new Label("Nom : " + i.getUsername() + " " + i.getPrenom()));* *ctn2.add(lblSurnom);* *lblSurnom.addPointerReleasedListener(ev -> {* *//display detail* *new MembreForm().displayDetailMember(i, theme, member);* *});* *ctn1.setLeadComponent(lblSurnom);* *Image imgServer = theme.getImage(i.getProfil_pic());* *ImageViewer imgProfile = new ImageViewer(imgServer);* *ctn1.add(imgProfile);* *ctn1.add(ctn2);* *Button btndelete = new Button();* *btndelete.setIcon(theme.getImage("delete.png"));* *btndelete.setUIID("container");* *SwipeableContainer sp = new SwipeableContainer(btndelete, ctn1);* *member.add(sp);* If you are experiencing an issue please mention the full platform your issue applies to: IDE: NetBeans/Eclipse/IDEA Desktop OS Simulator Device IDE: NetBeans Simulator -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/a6f37189-fbde-4c98-b8e5-347bdbb1837e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [codenameone-discussions] Re: why my function is always returning null object
i find out that the action performed method is executing after the return statement thats why it return null always 2017-04-26 13:41 GMT+01:00 b.wassim Rmd : > its the same thing > > 2017-04-26 13:27 GMT+01:00 steve nganga : > >> Try the following >> >> NetworkManager.getInstance().addToQueue*AndWait*(con); and uncomment the >> line >> >> >> Connection also provides the addArgument method so instead of appending >> the id to the url use the >> >> ConnectionRequest con = new ConnectionRequest(); >> con.setUrl("http://localhost/piService/getUserById.php";); >> con.addArgument("userId",id); >> >> >> >> >> >> On Wed, Apr 26, 2017 at 3:00 PM, b.wassim Rmd >> wrote: >> >>> this is what i get when im testing >>> >>> Le mercredi 26 avril 2017 02:27:25 UTC+1, b.wassim Rmd a écrit : >>>> >>>> If you are experiencing an issue please mention the full platform your >>>> issue applies to: >>>> IDE: NetBeans >>>> Simulator >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "CodenameOne Discussions" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to codenameone-discussions+unsubscr...@googlegroups.com. >>> Visit this group at https://groups.google.com/grou >>> p/codenameone-discussions. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/codenameone-discussions/679a6adc-944a-4245-8134-d0a4e060 >>> 497d%40googlegroups.com >>> <https://groups.google.com/d/msgid/codenameone-discussions/679a6adc-944a-4245-8134-d0a4e060497d%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "CodenameOne Discussions" group. >> To unsubscribe from this topic, visit https://groups.google.com/d/to >> pic/codenameone-discussions/ig4na33zc3U/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> codenameone-discussions+unsubscr...@googlegroups.com. >> Visit this group at https://groups.google.com/grou >> p/codenameone-discussions. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/codenameone-discussions/CAOfyKqY5iMwKeXq3DPVAX29pVo%2B9H >> o31bWBezvcDYA7%3DQYL8sg%40mail.gmail.com >> <https://groups.google.com/d/msgid/codenameone-discussions/CAOfyKqY5iMwKeXq3DPVAX29pVo%2B9Ho31bWBezvcDYA7%3DQYL8sg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAD%3DdA6CUfLbewFXz0iipnJDB6k_-utgeyLJ_KWn9X3B1WuG%2BWA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [codenameone-discussions] Re: why my function is always returning null object
its the same thing 2017-04-26 13:27 GMT+01:00 steve nganga : > Try the following > > NetworkManager.getInstance().addToQueue*AndWait*(con); and uncomment the > line > > > Connection also provides the addArgument method so instead of appending > the id to the url use the > > ConnectionRequest con = new ConnectionRequest(); > con.setUrl("http://localhost/piService/getUserById.php";); > con.addArgument("userId",id); > > > > > > On Wed, Apr 26, 2017 at 3:00 PM, b.wassim Rmd > wrote: > >> this is what i get when im testing >> >> Le mercredi 26 avril 2017 02:27:25 UTC+1, b.wassim Rmd a écrit : >>> >>> If you are experiencing an issue please mention the full platform your >>> issue applies to: >>> IDE: NetBeans >>> Simulator >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "CodenameOne Discussions" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to codenameone-discussions+unsubscr...@googlegroups.com. >> Visit this group at https://groups.google.com/grou >> p/codenameone-discussions. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/codenameone-discussions/679a6adc-944a-4245-8134-d0a4e060 >> 497d%40googlegroups.com >> <https://groups.google.com/d/msgid/codenameone-discussions/679a6adc-944a-4245-8134-d0a4e060497d%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "CodenameOne Discussions" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/codenameone-discussions/ig4na33zc3U/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > codenameone-discussions+unsubscr...@googlegroups.com. > Visit this group at https://groups.google.com/ > group/codenameone-discussions. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/codenameone-discussions/CAOfyKqY5iMwKeXq3DPVAX29pVo% > 2B9Ho31bWBezvcDYA7%3DQYL8sg%40mail.gmail.com > <https://groups.google.com/d/msgid/codenameone-discussions/CAOfyKqY5iMwKeXq3DPVAX29pVo%2B9Ho31bWBezvcDYA7%3DQYL8sg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAD%3DdA6AgfLVH-7oSRD2vbyD1siQn4Ea5y%2B-fKW-GF3a9oMBmKA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[codenameone-discussions] Re: why my function is always returning null object
this is what i get when im testing Le mercredi 26 avril 2017 02:27:25 UTC+1, b.wassim Rmd a écrit : > > If you are experiencing an issue please mention the full platform your > issue applies to: > IDE: NetBeans > Simulator > -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/679a6adc-944a-4245-8134-d0a4e060497d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[codenameone-discussions] why my function is always returning null object
If you are experiencing an issue please mention the full platform your issue applies to: IDE: NetBeans Simulator -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/162dbb4a-994b-40c8-a3af-acab803b928f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package serviceImpl; import com.codename1.io.CharArrayReader; import com.codename1.io.ConnectionRequest; import com.codename1.io.JSONParser; import com.codename1.io.NetworkEvent; import com.codename1.io.NetworkManager; import com.codename1.ui.events.ActionListener; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import model.Membre; /** * * @author wassim */ public class MembreService { public Membre me ; public Membre aux; public MembreService() { } public Membre getPubMember(int id) { me = new Membre(); ConnectionRequest con = new ConnectionRequest(); con.setUrl("http://localhost/piService/getUserById.php?userId="; + id); con.addResponseListener(new ActionListener() { @Override public void actionPerformed(NetworkEvent evt) { try { JSONParser j = new JSONParser(); Map users = j.parseJSON(new CharArrayReader(new String(con.getResponseData()).toCharArray())); Map obj = (Map) users.get("users"); me.setId(Integer.parseInt(obj.get("id").toString())); me.setUsername(obj.get("username").toString()); me.setEmail(obj.get("email").toString()); me.setAge(Integer.parseInt(obj.get("age").toString())); me.setNom(obj.get("nom").toString()); me.setPrenom(obj.get("prenom").toString()); me.setProfil_pic(obj.get("profile_pic").toString()); aux = me; } catch (IOException ex) { //Logger.getLogger(MembreService.class.getName()).log(Level.SEVERE, null, ex); } } }); //NetworkManager.getInstance().addToQueue(con); System.out.println(aux); return me; } }
[codenameone-discussions] how to populate menulist with data from database ?
If you are experiencing an issue please mention the full platform your issue applies to: IDE: NetBeans Simulator -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/d5af1983-15c8-44cc-860e-d7a0c2783a4f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.