Posts

How to use more than one JSF form -

i have java ee 7 project , in web application part trying open jsf forms. however when run it, sees initial form. how can enable reach other forms? small example code: <body> <h:form id="firstform" prependid="false"> ... </h:form> <h:form id="secondform" prependid="false"> ... </h:form> </body> this answer helped me lot. , there referance problem. after correcting them, can see form structure. i know code above not nested form structure, other people curious issue, cannot make nested forms in html5 (for both <h:form> , <form> ). careful template. good luck!

php - want to write code for popup window from my given code -

i have simple website written php code. have detect button on page , given below code writen function problem need popup window when detect link clicked. have tired set code in created code not able .kindly please me solve problem. <?php /*echo "permessi".$permessi; echo "<br>id".$id_nome;*/ if($action=='canc'){?> <h1>are sure want delect course?</h1> <form action="<?=$_server['php_self']?>" method="post" name="canc1" style="float: left; margin-left:25px;"> <input type="hidden" name="idcorsocanc" value="<?=$canc_id?>"> <input type="hidden" name="action" value=""> <input type="submit" name="ok" value="si,cancella" class="puls_invia"> </form> <form action="<?=$_server['php_self']?>" method="post" name...

java - GSON exclusionStrategy shouldSkipField need to know field's concrete class -

i having trouble gson exclusionstrategy implemenation.i need implement gson serialization filtering based on template. in gson. in gson exclusionstrategy , shouldskipfield , need know field's concrete class, in class hierarchy my class structure following:- class a{ string id; } class b{ string bb; string bbb; } class c extends a{ string cval; b bobj; } i want access 'id' field via class c, id field's declaring class comes instead of c. thanks in advance, preeti

delphi - How to show DBGrid.Hint when hovering with the mouse on a cell? -

while following code correctly set form1.caption text of cell mouse over, not display dbgrid.hint unless click on cell. what wrong picture? type thackgrid = class(tdbgrid); // expose protected datalink property procedure tform1.dbgrid1mousemove(sender: tobject; shift: tshiftstate; x, y: integer); var cell: tgridcoord; actrec: integer; begin cell := dbgrid1.mousecoord(x, y); if dgindicator in dbgrid1.options dec(cell.x); if dgtitles in dbgrid1.options dec(cell.y); if thackgrid(dbgrid1).datalink.active , (cell.x >= 0) , (cell.y >= 0) begin actrec := thackgrid(dbgrid1).datalink.activerecord; try thackgrid(dbgrid1).datalink.activerecord := cell.y; caption := dbgrid1.columns[cell.x].field.asstring; // form1.caption shows fine! dbgrid.hint := dbgrid1.columns[cell.x].field.asstring; // <== hint shows when click cell! thackgrid(dbgrid1).datalink.activerecord := actrec; end; end; end; call app...

python - Django model export on MySql server -

i imported external database project , thereby converting models.py file using python manage.py inspectdb > models.py command. now have edited models.py file adding class. how can export models.py file onto mysql server without hampering data in database? follow screen cast http://pressedweb.com/tutorials/django-djourney-introduction-to-south/ then search in google or stackoverflow requirements. there have threads regrading matter in stackoverflow. before doing south migration don't forget backup database.

java - Google App Engine query filter by date -

how gae filter query results date? i'm trying pass datestamp through query can't work. in google dashboard datastore viewer date field stored gd:when type format: yyyy-mm-dd hh:mm:ss when displayed on webpage displays mon jul 15 20:15:35 utc 2013. i request string mon jul 15 20:15:35 utc 2013 jsp page , parse filter isn't working. string strdatestamp = req.getparameter("stamp"); string formatstring = "eee mmm dd hh:mm:ss z yyyy"; date datestamp = null; try { datestamp = new simpledateformat(formatstring).parse(strdatestamp); } catch (parseexception e) { e.printstacktrace(); } filter filter = new filterpredicate ("date", query.filteroperator.equal, datestamp); query query = new query("example", key).setfilter(filter); date in computer systems represented time, in particular case it's internally represented unix time in milliseconds. see...

python - Getting World Coordinates with mouse in pygame -

i having trouble updating mouse position , checking entity collisions (between mouse , entity) due level scrolling. have used camera function question: how add scrolling platformer in pygame i have tried use camera function on mouse this: def update(self, target, target_type, mouse): if target_type != "mouse": self.state = self.camera_func(self.state, target.rect) else: new_pos = self.camera_func(mouse.rect, target.rect) mouse.update((new_pos[0], new_pos[1])) print mouse.rect but mouse.rect consistently set 608, 0 . can me this? mouse class looks this: class mouse(entity): def __init__(self, pos): entity.__init__(self) self.x = pos[0] self.y = pos[1] self.rect = rect(pos[0], pos[1], 32, 32) def update(self, pos, check=false): self.x = pos[0] self.y = pos[1] self.rect.top = pos[1] self.rect.left = pos[0] if check: ...